Skip to content
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

fix: ensure dev-dependencies are added to the correct group #3393

Merged
merged 4 commits into from
Feb 13, 2025

Conversation

dalbitresb12
Copy link
Contributor

@dalbitresb12 dalbitresb12 commented Feb 12, 2025

Pull Request Checklist

  • A news fragment is added in news/ describing what is new.
  • Test cases added for changed code.

Describe what you have changed in this PR.

Before this change, the group variable containing the group the user requested was being overridden with the last group processed from the tool.pdm.dev-dependencies table, making PDM add dev-dependencies to the wrong group.

This is a draft PR since #3392 also mentions the duplication of groups between tool.pdm.dev-dependencies and dependency-groups. I'll be adding the news fragment and test cases in another commit once I finish setting up the dev environment. Finished!

Fixes #3392.

Before this change, the `group` variable containing the group the user requested was being overridden with the last group processed from the `tool.pdm.dev-dependencies` table, making PDM add dev-dependencies to the wrong group.
…ginal table

This change prevents groups defined in `tool.pdm.dev-dependencies` from being copied to the `dependency-groups` table.
@dalbitresb12 dalbitresb12 marked this pull request as ready for review February 13, 2025 03:44
@dalbitresb12
Copy link
Contributor Author

@frostming I believe this is now ready for review. :)

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.23%. Comparing base (c582a94) to head (ad55084).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3393   +/-   ##
=======================================
  Coverage   85.23%   85.23%           
=======================================
  Files         112      112           
  Lines       11493    11494    +1     
  Branches     2520     2520           
=======================================
+ Hits         9796     9797    +1     
  Misses       1172     1172           
  Partials      525      525           
Flag Coverage Δ
unittests 85.03% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@frostming frostming merged commit 000ef5f into pdm-project:main Feb 13, 2025
21 checks passed
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.

pdm add uses wrong dependency group name if tool.pdm.dev-dependencies table exists
2 participants