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

Feature: reuse PDM scripts #27

Merged
merged 6 commits into from
Jun 6, 2022

Conversation

noirbizarre
Copy link
Member

@noirbizarre noirbizarre commented Jun 5, 2022

This pull-request add support for reusing PDM scripts in tox for both versions 3 and 4.
The following have been achieved:

  • enable tox testing on both versions 3 and 4
  • implement PDM scripts detection on both tox 3 and 4 (and add integration tests for those use cases)
  • move project tox commands into reusable PDM scripts and use them in tox
  • update the README.md to advertise this feature

Note: for tox4, given there is not yet any recommandation, guidelines or official API... I chose one possible implementation but I had many implementation working. One was simply added into the _setup_env method but it was feeling hackish and sementically wrong

Note: given test_integration.py is already using tox to test, I'm wondering if it still makes sense to call tox from CI as pdm run test should be enough (will run on the Py version and the tox version from CI). I had to update the CI workflow as the tox4 jobs where not really using tox4. I added a tox --version to be able to check the version really in use

Last note: The coverage change in pyproject.toml is using this fix until next pdm version is released including pdm-project/pdm#1112

@noirbizarre noirbizarre force-pushed the feature/reuse-scripts branch 2 times, most recently from ed1dd46 to 7e9a1cc Compare June 5, 2022 16:00
.github/workflows/ci.yml Outdated Show resolved Hide resolved
tox_pdm/plugin4.py Outdated Show resolved Hide resolved
@frostming frostming merged commit e258a1a into pdm-project:main Jun 6, 2022
@noirbizarre noirbizarre deleted the feature/reuse-scripts branch June 6, 2022 14:12
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.

None yet

2 participants