Skip to content

feat: pdm venv integration #1193

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

Merged
merged 21 commits into from
Jul 2, 2022
Merged

feat: pdm venv integration #1193

merged 21 commits into from
Jul 2, 2022

Conversation

frostming
Copy link
Collaborator

@frostming frostming commented Jul 1, 2022

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.

  1. pdm venv commands integration

  2. pdm init will ask to create virtualenv if not exists
    pdm init, when choose to create virtualenv:
    image
    pdm init, when choose not to create virtualenv:
    image

  3. pdm use will list pythons in central virtualenv location

  4. pdm install will create virtualenv if python is not chosen yet and __pypackages__ doesn't exist

  5. venv will be created at .venv in project root, while configurable.

@codecov-commenter
Copy link

codecov-commenter commented Jul 2, 2022

Codecov Report

Merging #1193 (75c9446) into main (e3e145c) will decrease coverage by 4.22%.
The diff coverage is 94.11%.

@@            Coverage Diff             @@
##             main    #1193      +/-   ##
==========================================
- Coverage   85.32%   81.09%   -4.23%     
==========================================
  Files          78       93      +15     
  Lines        6834     7592     +758     
  Branches     1565     1792     +227     
==========================================
+ Hits         5831     6157     +326     
- Misses        666     1081     +415     
- Partials      337      354      +17     
Flag Coverage Δ
unittests 80.97% <94.11%> (-4.11%) ⬇️

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

Impacted Files Coverage Δ
pdm/cli/commands/plugin.py 64.28% <ø> (ø)
pdm/project/config.py 94.11% <ø> (ø)
pdm/utils.py 81.71% <ø> (+3.24%) ⬆️
pdm/project/core.py 89.29% <86.48%> (-0.03%) ⬇️
pdm/cli/commands/venv/list.py 87.50% <87.50%> (ø)
pdm/cli/commands/venv/remove.py 87.50% <87.50%> (ø)
pdm/cli/commands/init.py 98.18% <92.30%> (-1.82%) ⬇️
pdm/cli/commands/venv/purge.py 94.28% <94.28%> (ø)
pdm/cli/commands/venv/__init__.py 95.65% <95.65%> (ø)
pdm/cli/commands/venv/activate.py 96.00% <96.00%> (ø)
... and 26 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 0e725b1...75c9446. Read the comment docs.

@frostming frostming merged commit cc2ad1e into main Jul 2, 2022
@frostming frostming deleted the feat/venv branch July 2, 2022 10:23
@thiagola92
Copy link
Contributor

First, i'm loving pdm! Thank you very much!

Second, why the change to use venv by default?

Observation: Is False in configuration.md
https://github.com/pdm-project/pdm/blob/main/docs/docs/usage/configuration.md?plain=1#L20

@frostming
Copy link
Collaborator Author

@thiagola92 here are some explanations. And the doc definitely needs to be updated, would you like to contribute?

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.

3 participants