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

add support for {pdm} placeholder in scripts #2408

Merged
merged 5 commits into from
Nov 16, 2023

Conversation

tgolsson
Copy link
Contributor

@tgolsson tgolsson commented Nov 15, 2023

Pull Request Checklist

  • A news fragment is added in news/ describing what is new.
  • Test cases added for changed code.
    • Only found a single meaningful test-case -- I tried to do some more testing for the interpolation but it got far too complex with paths, dev versions etc.

Describe what you have changed in this PR.

As discussed on Discord, this adds support for using a {pdm} placeholder in scripts to refer to the current interpreter. I'm not sure if this should affect calls in any way, but I don't think so since they'd (presumably) use the same python interpreter/venv.

Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (73651b7) 84.51% compared to head (b0ab6a5) 84.53%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2408      +/-   ##
==========================================
+ Coverage   84.51%   84.53%   +0.02%     
==========================================
  Files         102      103       +1     
  Lines       10109    10129      +20     
  Branches     2224     2226       +2     
==========================================
+ Hits         8544     8563      +19     
- Misses       1087     1088       +1     
  Partials      478      478              
Flag Coverage Δ
unittests 84.32% <100.00%> (+0.02%) ⬆️

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.

@tgolsson
Copy link
Contributor Author

Hmm, will have to look at Windows failures tomorrow. I'm going to guess related to path normalization in some way...

@frostming frostming changed the base branch from main to dev November 16, 2023 12:00
@frostming frostming merged commit e63159e into pdm-project:dev Nov 16, 2023
24 checks passed
frostming pushed a commit that referenced this pull request Nov 23, 2023
* add support for `{pdm}` placeholder in scripts

* check should_interpolate

* fix docs

* add news item

* Fix feedback and Windows
frostming pushed a commit that referenced this pull request Dec 1, 2023
* add support for `{pdm}` placeholder in scripts

* check should_interpolate

* fix docs

* add news item

* Fix feedback and Windows
frostming pushed a commit that referenced this pull request Dec 1, 2023
* add support for `{pdm}` placeholder in scripts

* check should_interpolate

* fix docs

* add news item

* Fix feedback and Windows
@j178 j178 mentioned this pull request Apr 3, 2024
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