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

Refactor: split the build() into smaller pieces #543

Merged
merged 4 commits into from
Jul 19, 2021
Merged

Conversation

frostming
Copy link
Collaborator

Pull Request Check List

  • 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.

  • Split the build() function into smaller pieces: prepare(), metadata() and build().
  • Call prepare_metadata* hook to get the metadata, instead of building the whole wheel.
  • Switch to importlib.metadata to parse the metadata.

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2021

Codecov Report

Merging #543 (33e8c43) into main (085d2b7) will decrease coverage by 0.02%.
The diff coverage is 79.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #543      +/-   ##
==========================================
- Coverage   82.94%   82.91%   -0.03%     
==========================================
  Files          68       68              
  Lines        5500     5497       -3     
  Branches      982      968      -14     
==========================================
- Hits         4562     4558       -4     
- Misses        656      662       +6     
+ Partials      282      277       -5     
Flag Coverage Δ
unittests 82.77% <78.22%> (-0.09%) ⬇️

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

Impacted Files Coverage Δ
pdm/resolver/providers.py 95.40% <50.00%> (ø)
pdm/utils.py 71.11% <66.66%> (-0.37%) ⬇️
pdm/models/candidates.py 75.22% <71.22%> (-7.55%) ⬇️
pdm/models/requirements.py 93.93% <90.47%> (-0.79%) ⬇️
pdm/builders/__init__.py 100.00% <100.00%> (ø)
pdm/builders/base.py 91.72% <100.00%> (+0.05%) ⬆️
pdm/builders/editable.py 86.66% <100.00%> (ø)
pdm/builders/sdist.py 100.00% <100.00%> (ø)
pdm/builders/wheel.py 100.00% <100.00%> (ø)
pdm/cli/actions.py 75.64% <100.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 085d2b7...33e8c43. Read the comment docs.

@frostming frostming merged commit aa325c5 into main Jul 19, 2021
@frostming frostming deleted the refactor/prepare branch July 19, 2021 13:07
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