Run tasks

PDM is configured with these tasks:

Command line Purpose
pdm run lint:mypy Run linting with Mypy
pdm run lint:pycodestyle Run linting with Pycodestyle
pdm run lint:pydocstyle Run linting with Pydocstyle
pdm run lint:bandit Run linting with Bandit
pdm run lint:vulture Run linting with Vulture
pdm run lint:isort Run linting with isort
pdm run lint Run all linters
pdm run format:black Run formatting with Black
pdm run format:isort Run formatting with isort
pdm run format Run all formatters
pdm run test Run automated testing with Pytest

Use multiple platforms, CUDA versions

In order to get 100% reproducible environments, the template uses multiple PDM lockfiles. There is one lockfile per platform and per version of CUDA.

From within the project, run:

pdm run lockfile list

This will list out the PDM lockfiles that are currently configured. You can see them organized by CUDA version and platform. You can use any lockfile for your platform.

Use your CUDA version

To use one of the existing lockfiles, run:

pdm run lockfile use <CUDA VERSION>

pdm install

This won’t affect other developers, just you.

My CUDA version isn’t configured in the project

When creating the template, you choose the CUDA version for your system. That one is set up by default, but other developers will need to set up other versions.

Run this command to create a new lockfile:

pdm run lockfile add <CUDA VERSION>

This will also use the new lockfile.

Under the hood

If you list out the files in the project root, you will see files that look something like: pdm.linux.cuda-11-7.lock. The filenames are formatted like this: