-
Notifications
You must be signed in to change notification settings - Fork 24
Chore: Add developer setup scripts (#770) #866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 17.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| $ErrorActionPreference = "Stop" | ||
|
|
||
| python -m venv .venv | ||
| .\.venv\Scripts\Activate.ps1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Venv Activation Not StickingThe virtual environment activation won't affect subsequent commands in the script. Calling |
||
| python -m pip install --upgrade pip | ||
|
|
||
| if (Test-Path "requirements.txt") { | ||
| pip install -r requirements.txt | ||
| } | ||
|
Comment on lines
+7
to
+9
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The script currently only installs dependencies from |
||
|
|
||
| Write-Host "✅ Environment Ready" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The script successfully prepares the environment, but the virtual environment activation doesn't persist in the user's shell after the script finishes. It would be helpful to add a message instructing the user on how to activate it manually for their development work. |
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||||||||||||||
| #!/usr/bin/env bash | ||||||||||||||||||
| set -e | ||||||||||||||||||
|
|
||||||||||||||||||
| python3 -m venv .venv | ||||||||||||||||||
| source .venv/bin/activate | ||||||||||||||||||
| python -m pip install --upgrade pip | ||||||||||||||||||
|
|
||||||||||||||||||
| if [ -f "requirements.txt" ]; then | ||||||||||||||||||
| pip install -r requirements.txt | ||||||||||||||||||
| fi | ||||||||||||||||||
|
Comment on lines
+8
to
+10
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The script currently only installs dependencies from
Suggested change
|
||||||||||||||||||
|
|
||||||||||||||||||
| echo "✅ Environment Ready" | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After the script runs, the user needs to activate the virtual environment to use the installed packages. It would be helpful to explicitly state this as the next step.
Suggested change
|
||||||||||||||||||
| echo "Now create Postgres DB and run Odoo with addons-path pointing to this repo." | ||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Windows, using the Python launcher
py -3is a more robust way to ensure you're using a Python 3 interpreter, aspythoncould point to an older version or a Microsoft Store stub. This helps prevent potential environment setup issues.