-
Notifications
You must be signed in to change notification settings - Fork 1
chore: move deps from requirements-dev.txt
to pyproject.toml
#120
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
|
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
Consolidate developer dependencies into pyproject.toml
and update install commands to use the new extras.
- Removed
requirements-dev.txt
and added a[project.optional-dependencies]
dev group. - Updated Gitpod and GitHub Actions to install using
pip install .[dev]
.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
requirements-dev.txt | Removed file after moving dev dependencies to pyproject.toml |
pyproject.toml | Added dev extra under [project.optional-dependencies] |
.gitpod.yml | Replaced pip install -r requirements-dev.txt with . [dev] install |
.github/workflows/python-test.yml | Replaced -r requirements-dev.txt install with . [dev] install |
Comments suppressed due to low confidence (2)
.gitpod.yml:8
- The
command
step was removed, so the workspace won't reinstall the package on start. Re-add acommand: pip install -e .[dev]
to match the install inbefore
.
command: pip install -e .
pyproject.toml:44
- The
dev
extra is missingflake8
, which was previously inrequirements-dev.txt
. Add "flake8" to ensure linting tools are installed.
"pre-commit",
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #120 +/- ##
=======================================
Coverage 95.42% 95.42%
=======================================
Files 7 7
Lines 284 284
=======================================
Hits 271 271
Misses 13 13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
WalkthroughThe changes consolidate Python development dependency management by defining a Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant Environment (GitHub Actions/Gitpod)
participant pip
participant pyproject.toml
Developer->>Environment (GitHub Actions/Gitpod): Trigger setup (CI run or workspace start)
Environment->>pip: pip install .[dev] or pip install -e .[dev]
pip->>pyproject.toml: Read [project.optional-dependencies].dev
pip->>Environment: Install main package + 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: 0
🧹 Nitpick comments (2)
pyproject.toml (1)
41-46
: Enhance the dev extras group and update documentation.
The newdev
extras look good, but since the project configures MyPy (see[tool.mypy]
), consider adding"mypy"
to this list so the type checker is installed automatically. Also, don’t forget to update the README and any docs to replace references torequirements-dev.txt
with the newpip install .[dev]
command..github/workflows/python-test.yml (1)
40-40
: Quote the extras spec to avoid shell globbing.
Unquoted brackets (.[dev]
) can be interpreted as a glob pattern in Unix shells. Wrap the extras in quotes to prevent this:- python3 -m pip install .[dev] + python3 -m pip install ".[dev]"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/python-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
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
.gitpod.yml (1)
7-7
:❌ Incorrect review comment
Verify Gitpod task key for dependency installation.
Thebefore
field may not be a valid key in Gitpod’s tasks spec. Please confirm it executes as intended; otherwise, move thepip install -e .[dev]
step into a supported stage (e.g.,init
orcommand
) to ensure dependencies are installed reliably.
Sure—let’s inspect the
.gitpod.yml
around thetasks:
andbefore:
lines to confirm how it’s defined.
🏁 Script executed:
#!/bin/bash set -e # Show the 'tasks:' block and surrounding lines rg -n "tasks:" .gitpod.yml -C5 || true # Show any 'before:' entries nearby rg -n "before:" .gitpod.yml -C2 || trueLength of output: 523
To confirm whether
before
is valid in the Gitpod tasks spec, let’s check the official Gitpod docs:
🌐 Web query:
Does Gitpod .gitpod.yml tasks support a 'before' key?
💡 Result:
Yes, Gitpod's
.gitpod.yml
tasks support abefore
key. This key is used to define preparatory steps that should run before theinit
andcommand
tasks. For example, you can use thebefore
task to set up tools or permissions necessary for your project. (gitpod.io)Here's an example of how to use the
before
key in your.gitpod.yml
file:tasks: - before: | echo 'Running preparatory steps...' # Add your preparatory commands here - init: | echo 'Running initialization steps...' # Add your initialization commands here - command: | echo 'Running main command...' # Add your main command hereIn this configuration, the
before
task runs first, followed by theinit
task, and then thecommand
task. Each task runs in its own terminal, and thebefore
task is expected to terminate upon completion. (gitpod.io)For more detailed information on configuring tasks in Gitpod, you can refer to the official documentation. (gitpod.io)
Citations:
- 1: https://www.gitpod.io/docs/enterprise/configure/workspaces/tasks?utm_source=openai
- 2: https://www.gitpod.io/docs/enterprise/configure/workspaces/tasks?utm_source=openai
- 3: https://www.gitpod.io/docs/enterprise/configure/workspaces/tasks?utm_source=openai
No action needed:
before
is valid in Gitpod tasks
The Gitpod tasks spec supports abefore
key for preparatory steps, so keepingtasks: - name: Setup & Install before: pip install -e .[dev] init: pre-commit installis correct.
Likely an incorrect or invalid review comment.
Summary by CodeRabbit