-
Notifications
You must be signed in to change notification settings - Fork 3
chore: move deps from requirements-dev.txt
to pyproject.toml
#68
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
Conversation
requirements-dev.txt
to pyproject.toml
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
=======================================
Coverage 77.92% 77.92%
=======================================
Files 3 3
Lines 77 77
=======================================
Hits 60 60
Misses 17 17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
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.
Pull Request Overview
This PR moves the development dependencies from requirements-dev.txt into the pyproject.toml file and updates installation commands accordingly.
- Removed development dependencies from requirements-dev.txt
- Added a [project.optional-dependencies] section named "dev" in pyproject.toml
- Updated dependency installation in .gitpod.yml and .github/workflows/test.yml to use the new dev group
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
requirements-dev.txt | Removed development dependencies |
pyproject.toml | Added optional dependencies under the "dev" key |
.gitpod.yml | Updated pip install command to use .[dev] |
.github/workflows/test.yml | Updated pip install command to use .[dev] in CI workflow |
@@ -7,5 +7,4 @@ | |||
tasks: | |||
- init: | | |||
python -m pip install --upgrade pip | |||
pip install . | |||
pip install -r requirements-dev.txt | |||
pip install .[dev] |
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.
Update the local development documentation to reflect the new dependency installation command using the optional 'dev' group.
Copilot uses AI. Check for mistakes.
@@ -26,8 +26,7 @@ jobs: | |||
- name: Install dependencies | |||
run: | | |||
python -m pip install --upgrade pip | |||
pip install . | |||
pip install -r requirements-dev.txt | |||
pip install .[dev] |
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.
Ensure the CI/CD documentation is updated to capture the change from requirements-dev.txt to the new installation command using the 'dev' group.
Copilot uses AI. Check for mistakes.
WalkthroughThe changes consolidate development dependency management by introducing a Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Environment (GitHub Actions/Gitpod)
participant pip
participant pyproject.toml
User->>Environment: Trigger workflow/start workspace
Environment->>pip: pip install .[dev]
pip->>pyproject.toml: Read [dev] optional dependencies
pip->>Environment: Install package and dev dependencies (coverage, pre-commit, pytest)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.gitpod.yml (1)
10-10
: Consolidate dev install with.[dev]
—nice and DRY
Usingpip install .[dev]
in Gitpod aligns with the new extras. To guard against shell glob expansion in different environments, you may want to quote the extras specifier, e.g.:pip install ".[dev]"
If you prefer a live-reload workflow, you can also use editable mode:
pip install -e ".[dev]"
.github/workflows/test.yml (1)
28-30
: Simplify CI step withpip install .[dev]
Great consolidation of base + dev deps into one command. As above, quote the extras to avoid unintended shell globbing:pip install ".[dev]"
And don’t forget to update any project README or CONTRIBUTING guide that previously instructed
requirements-dev.txt
.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/test.yml
(1 hunks).gitpod.yml
(1 hunks)pyproject.toml
(1 hunks)requirements-dev.txt
(0 hunks)
💤 Files with no reviewable changes (1)
- requirements-dev.txt
[project.optional-dependencies] | ||
dev = [ | ||
"coverage", | ||
"pre-commit", | ||
"pytest", | ||
] |
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.
🛠️ Refactor suggestion
Add dev
extras group under PEP 621—good move
This consolidates development dependencies into the standard [project.optional-dependencies]
extras table. To further harden reproducibility and avoid surprises from breaking releases, consider adding minimal version constraints (e.g. "pytest>=7.0.0"
, "pre-commit>=2.20.0"
, etc.)—similar to how you pinned clang-tools
. Also be sure to remove the now-obsolete requirements-dev.txt
file and update any docs or scripts still referencing it.
🤖 Prompt for AI Agents
In pyproject.toml around lines 47 to 52, the dev optional dependencies lack
minimal version constraints, which can cause unpredictable builds. Add minimal
version specifiers to each package in the dev list, for example, "pytest>=7.0.0"
and "pre-commit>=2.20.0". After that, remove the obsolete requirements-dev.txt
file and update any documentation or scripts that still reference it to ensure
consistency.
Summary by CodeRabbit