-
I would like to remove my tox dependency from my project, but it's very simple for new user to just check out and run "tox" only, and the deps are synced automatically. The new workflow would be to both run "pdm sync" and then "pdm run X" where X is a script with all tests and checks, same as tox runs. Since tox just use the scripts from pdm/pyproject atm it seems like tox is not really necessary. Is there any way to get "pdm run" to sync deps before executing? I.e make the script dependant on a group of deps so to say? This would mean an equally simple workflow where the user checks out the repo and just run "pdm run X" which then creates venv, install deps and run command. It seems that the run command creates a .venv before executing, but there are no deps installed in it. This would also mean that I would not have multiple venv:s with the same deps since tox creates one and pdm creates one. Maybe that got confusing... Feel free to ask if I should clarify something :p Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
[tool.pdm.scripts]
pre_run = "{pdm} sync" |
Beta Was this translation helpful? Give feedback.
It runs on every invocation of
pdm run
, actually you don't need to callpdm run
in tasks:Your solution
pre_all
only runs when running taskall