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

feat(pep621): use packaging-based PEP 508 parser #925

Merged

Conversation

mkniewallner
Copy link
Collaborator

@mkniewallner mkniewallner commented Oct 29, 2024

Closes #735.

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added or modified a feature, documentation in docs is updated

Description of changes

In #913, we've changed the way we parse dependencies from requirements by switching to requirements-parser. This partly replaces what was done in #735.

Since the dependency we added itself depends on packaging, we can leverage it to parse dependencies defined in PEP 621, without adding a new dependency.

@mkniewallner mkniewallner changed the title feat(pep621): use packaging-based PEP 508 parser feat(pep621): use packaging-based PEP 508 parser Oct 29, 2024
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.0%. Comparing base (0781758) to head (d996cc6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #925     +/-   ##
=======================================
+ Coverage   92.7%   93.0%   +0.2%     
=======================================
  Files         37      37             
  Lines        992     991      -1     
  Branches      98      97      -1     
=======================================
+ Hits         920     922      +2     
+ Misses        56      55      -1     
+ Partials      16      14      -2     

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

@mkniewallner mkniewallner force-pushed the feat/parse-pep-508-in-pep-621-deps-with-packaging branch from 67ef35d to 591ffd4 Compare October 29, 2024 18:09
@@ -15,7 +15,7 @@ def test_dependency_getter(tmp_path: Path) -> None:
"qux",
"bar>=20.9",
"optional-foo[option]>=0.12.11",
"conditional-bar>=1.1.0; python_version < 3.11",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was never valid in the first place.

@mkniewallner mkniewallner marked this pull request as ready for review October 29, 2024 19:11
@mkniewallner mkniewallner requested a review from fpgmaas October 29, 2024 19:12
@mkniewallner mkniewallner force-pushed the feat/parse-pep-508-in-pep-621-deps-with-packaging branch from 736d52e to 2aa3979 Compare October 30, 2024 11:29
@mkniewallner mkniewallner added this to the 0.21.0 milestone Oct 30, 2024
@mkniewallner mkniewallner force-pushed the feat/parse-pep-508-in-pep-621-deps-with-packaging branch from 2aa3979 to a3a1311 Compare November 3, 2024 16:22
@mkniewallner mkniewallner force-pushed the feat/parse-pep-508-in-pep-621-deps-with-packaging branch from a3a1311 to d996cc6 Compare November 7, 2024 08:32
@mkniewallner mkniewallner enabled auto-merge (squash) November 7, 2024 08:32
@mkniewallner mkniewallner merged commit 975ee16 into main Nov 7, 2024
22 checks passed
@mkniewallner mkniewallner deleted the feat/parse-pep-508-in-pep-621-deps-with-packaging branch December 19, 2024 22:18
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.

2 participants