-
Notifications
You must be signed in to change notification settings - Fork 19
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
Allow specifying which groups under [project.optional-dependencies] are considered development dependencies #628
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #628 +/- ##
=======================================
+ Coverage 90.4% 90.7% +0.3%
=======================================
Files 33 33
Lines 970 986 +16
Branches 189 198 +9
=======================================
+ Hits 877 895 +18
+ Misses 79 74 -5
- Partials 14 17 +3 ☔ View full report in Codecov by Sentry. |
This works for my project, |
Perhaps deptry should warn / error if the given group does not exist. |
Good suggestion! It will now display a warning if there are any groups listed that are not detected:
|
I'd be happy with this being released :) |
We'll aim for a release this weekend! I want to give @mkniewallner some more time to review if he wants, I know he is a bit busy these days :) |
Co-authored-by: Edgar Ramírez Mondragón <16805946+edgarrmondragon@users.noreply.github.com>
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.
Since PDM also is able to define PDM 621 optional dependencies, I think we should handle the new parameter for it as well. I made #637 to handle that, let me know if you disagree with that (if not, we still have to fix the logging issues that the PR also fixes).
In any case, having this new option will definitely be helpful!
* refactor: move dependencies logging to `core` * feat(pdm): handle PEP 621 dev groups
Co-authored-by: Mathieu Kniewallner <mathieu.kniewallner@gmail.com>
Co-authored-by: Mathieu Kniewallner <mathieu.kniewallner@gmail.com>
Thanks, great suggestion and good catch on the issue with logging. I merged your PR and added one small commit on top of it. |
PR Checklist
docs
is updatedDescription of changes
For projects that use PEP 621 without
Poetry
orPDM
, all dependencies under[project.dependencies]
and[project.optional-dependencies]
are extracted as regular dependencies. This PR adds the--pep621-dev-dependency-groups
argument, so users can specify which groups defined under[project.optional-dependencies]
should be treated as development dependencies instead.For example, consider a project with the following
pyproject.toml
:By default,
https
,pytest
andmatplotlib
are extracted as regular dependencies. By specifying--pep621-dev-dependency-groups=test
,the dependency
pytest
will be considered a development dependency instead.