Skip to content

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

Merged
merged 1 commit into from
Jun 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Copy link
Preview

Copilot AI Jun 1, 2025

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.


- name: Run tests and collect coverage
run: |
Expand Down
3 changes: 1 addition & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
tasks:
- init: |
python -m pip install --upgrade pip
pip install .
pip install -r requirements-dev.txt
pip install .[dev]
Copy link
Preview

Copilot AI Jun 1, 2025

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.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ clang-tidy-hook = "cpp_linter_hooks.clang_tidy:main"
source = "https://github.com/cpp-linter/cpp-linter-hooks"
tracker = "https://github.com/cpp-linter/cpp-linter-hooks/issues"

# ... other project metadata fields as specified in:
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
[project.optional-dependencies]
dev = [
"coverage",
"pre-commit",
"pytest",
]
Comment on lines +47 to +52
Copy link

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.


[tool.setuptools]
zip-safe = false
Expand Down
3 changes: 0 additions & 3 deletions requirements-dev.txt

This file was deleted.

Loading