Skip to content

Conversation

@devendra1973
Copy link

@devendra1973 devendra1973 commented Nov 10, 2025

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:
    • Add scripts/dev_setup.sh (bash): creates/activates Python venv, upgrades pip, installs from requirements.txt if present, and prints readiness + Postgres/Odoo run hint.
    • Add scripts/dev_setup.ps1 (PowerShell): creates/activates Python venv, upgrades pip, installs from requirements.txt if present, and prints readiness.

Written by Cursor Bugbot for commit 29bb53e. This will update automatically on new commits. Configure here.

@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Windows Setup Script: A new PowerShell script, dev_setup.ps1, has been added to automate the setup of the development environment on Windows, including virtual environment creation, activation, pip upgrade, and dependency installation.
  • Linux/macOS Setup Script: A new Bash script, dev_setup.sh, has been added to automate the setup of the development environment on Linux and macOS, covering virtual environment creation, activation, pip upgrade, and dependency installation.
  • Automated Dependency Management: Both scripts automatically install project dependencies listed in requirements.txt if the file exists, streamlining the initial setup process.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@cursor cursor bot left a 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
Copy link

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.

Fix in Cursor Fix in Web

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

On Windows, using the Python launcher py -3 is a more robust way to ensure you're using a Python 3 interpreter, as python could point to an older version or a Microsoft Store stub. This helps prevent potential environment setup issues.

py -3 -m venv .venv

Comment on lines +7 to +9
if (Test-Path "requirements.txt") {
pip install -r requirements.txt
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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"

Comment on lines +8 to +10
if [ -f "requirements.txt" ]; then
pip install -r requirements.txt
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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 "✅ Environment Ready"
echo "✅ Environment Ready"
echo "Run 'source .venv/bin/activate' to activate the virtual environment."

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants