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: add --only-keep option to sync command #1191

Merged
merged 3 commits into from
Jul 1, 2022
Merged

feat: add --only-keep option to sync command #1191

merged 3 commits into from
Jul 1, 2022

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.

@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2022

Codecov Report

Merging #1191 (75ef5cf) into main (77528ff) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1191      +/-   ##
==========================================
- Coverage   85.46%   85.45%   -0.01%     
==========================================
  Files          78       78              
  Lines        6831     6834       +3     
  Branches     1564     1565       +1     
==========================================
+ Hits         5838     5840       +2     
  Misses        660      660              
- Partials      333      334       +1     
Flag Coverage Δ
unittests 85.22% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
pdm/cli/commands/sync.py 100.00% <ø> (ø)
pdm/cli/options.py 91.26% <ø> (ø)
pdm/cli/actions.py 79.11% <100.00%> (ø)
pdm/installers/synchronizers.py 86.38% <100.00%> (+0.11%) ⬆️
pdm/project/core.py 89.32% <0.00%> (-0.24%) ⬇️
pdm/project/config.py 94.11% <0.00%> (ø)

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 77528ff...75ef5cf. Read the comment docs.

@Hnasar
Copy link
Contributor

Hnasar commented Jun 30, 2022

I found the behavior of pure to be a bit hard to understand. A name like --only or --only-keep would be more intuitive. For example:

pdm sync --only-keep --prod

Some examples in the docs might help too.

@frostming frostming changed the title feat: add --pure option to sync command feat: add --no-keep option to sync command Jul 1, 2022
@frostming frostming merged commit e3e145c into main Jul 1, 2022
@frostming frostming deleted the feat/pure branch July 1, 2022 03:05
@LukeDRussell
Copy link

Keen to see this in a pre-release tag.
I've been trying to migrate a small project to PDM. I've had to delete the venv every time to acheive a strict match to the 'working set' of the intended groups.

@frostming frostming changed the title feat: add --no-keep option to sync command feat: add --only-keep option to sync command Jul 10, 2022
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.

4 participants