-
Notifications
You must be signed in to change notification settings - Fork 23
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?
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Summary of ChangesHello @devendra1973, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces dedicated setup scripts for both Windows (PowerShell) and Linux/macOS (Bash) environments. The primary goal is to significantly accelerate and simplify the onboarding process for new developers by automating the creation and configuration of a Python virtual environment, upgrading pip, and installing project dependencies. This change aims to reduce manual setup time and potential configuration errors, ensuring a consistent development environment across different operating systems. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| $ErrorActionPreference = "Stop" | ||
|
|
||
| python -m venv .venv | ||
| .\.venv\Scripts\Activate.ps1 |
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.
Bug: Venv Activation Not Sticking
The virtual environment activation won't affect subsequent commands in the script. Calling Activate.ps1 directly runs it in a child scope, so the PATH modifications don't persist. This causes python and pip commands on lines 5 and 8 to use the system Python instead of the virtual environment, defeating the purpose of creating the venv.
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.
Code Review
This pull request introduces setup scripts for developers, which is a great addition for streamlining local development. My review focuses on making these scripts more robust and user-friendly. I've suggested using a more specific python command on Windows, installing a more complete set of dependencies by default, and providing clearer instructions to the user on how to activate the virtual environment after the script has run. These changes should improve the onboarding experience for developers.
| @@ -0,0 +1,11 @@ | |||
| $ErrorActionPreference = "Stop" | |||
|
|
|||
| python -m venv .venv | |||
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.
| if (Test-Path "requirements.txt") { | ||
| pip install -r requirements.txt | ||
| } |
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.
The script currently only installs dependencies from requirements.txt. The repository also contains openspp-requirements.txt, which seems to be the primary file for a full development setup as it includes other requirement files. To make the setup script more comprehensive, it would be better to prioritize openspp-requirements.txt if it exists.
if (Test-Path "openspp-requirements.txt") {
pip install -r openspp-requirements.txt
} elseif (Test-Path "requirements.txt") {
pip install -r requirements.txt
}
| pip install -r requirements.txt | ||
| } | ||
|
|
||
| Write-Host "✅ Environment Ready" |
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.
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.
Write-Host "✅ Environment Ready"
Write-Host "Now activate the virtual environment by running: .\.venv\Scripts\Activate.ps1"
| if [ -f "requirements.txt" ]; then | ||
| pip install -r requirements.txt | ||
| fi |
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.
The script currently only installs dependencies from requirements.txt. The repository also contains openspp-requirements.txt, which seems to be the primary file for a full development setup as it includes other requirement files. To make the setup script more comprehensive, it would be better to prioritize openspp-requirements.txt if it exists.
| if [ -f "requirements.txt" ]; then | |
| pip install -r requirements.txt | |
| fi | |
| if [ -f "openspp-requirements.txt" ]; then | |
| pip install -r openspp-requirements.txt | |
| elif [ -f "requirements.txt" ]; then | |
| pip install -r requirements.txt | |
| fi |
| pip install -r requirements.txt | ||
| fi | ||
|
|
||
| echo "✅ Environment Ready" |
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.
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.
| echo "✅ Environment Ready" | |
| echo "✅ Environment Ready" | |
| echo "Run 'source .venv/bin/activate' to activate the virtual environment." |
|



Adds venv setup scripts for faster local development onboarding.
Note
Add cross-platform dev setup scripts to create/activate a Python venv and install requirements for local development.
scripts/dev_setup.sh(bash): creates/activates Python venv, upgradespip, installs fromrequirements.txtif present, and prints readiness + Postgres/Odoo run hint.scripts/dev_setup.ps1(PowerShell): creates/activates Python venv, upgradespip, installs fromrequirements.txtif present, and prints readiness.Written by Cursor Bugbot for commit 29bb53e. This will update automatically on new commits. Configure here.