Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use the
pyproject.toml
standard to specify project metadata and dependencies. Use PDM to lock development dependencies and manage the environment.Tool configuration was moved to
pyproject.toml
, except for flake8, which does not support that file. Flake8 config remains insetup.cfg
.setup.py
remains for GitHub's dependency graph, although PDM might write a GitHub action for updating the dependency graph eventually.Read the Docs doesn't support non-pip tools natively, but they recently added support for custom build steps. This uses
post_install
to install PDM and runpdm sync -dG docs
after RTD sets up the virtualenv and installs its own packages.Contributors can use PDM to set up a virtualenv and sync development dependencies. Install PDM, then do
pdm sync
. This will create a virtualenv in the.venv
folder if it doesn't exist, then install the locked versions of all development dependencies, and install the project in editable mode. Commands are run withpdm run ...
without requiring activating the virtualenv. Alternatively, you can use a tool likepew
to manage virtualenvs, PDM will detect an active virtualenv and use that instead, andpip install -e .
will continue to work as well.Common commands:
pdm sync
install the current set of locked dependenciespdm run pytest
pdm run mypy
pdm run tox -p
run all test envs in parallelcd docs && make html
make the docs locally, caching changesAdvanced / maintainer commands:
pdm update --update-all
update all versions in the lock fileeval $(pdm venv activate)
activate the virtualenv sopdm run ...
isn't neededpew workon flask-sqlalchemy
use pew to manage the virtualenv and switch to the project, thenpdm sync
will install to that env.