Skip to main content

A plugin for tox that utilizes PDM as the package manager and installer

Project description

tox-pdm

A plugin for tox that utilizes PDM as the package manager and installer.

Github Actions PyPI pre-commit Code style: black

With this plugin, you can migrate your project to PDM while retaining the ability to test against multiple versions.

Installation

$ pip install tox-pdm

Or,

$ pdm add -d tox-pdm

Or if you installed tox via pipx, you can inject the plugin by:

$ pipx inject tox tox-pdm

Example tox.ini

The following simple example installs dev and test dependencies into the venv created by Tox and uses pytest to execute the tests, on both Python 3.7 and 3.8.

[tox]
envlist = py37,py38

[testenv]
sections =  ; Dependency sections in pyproject.toml
    dev
    test
deps =      ; Additional dependencies, it will be installed into the library path via normal pip method
    flake8
commands =
    pytest test/

A real-world example can be found at this repository's tox.ini and GitHub Action workflow.

Some best practices:

  1. pdm executable must be exposed in PATH, if it is not the case, give the absolute path to tox by tox --pdm <path_to_pdm>.
  2. Make sure you have generated pdm.lock before running the test, it will greatly accelerate the testing.
  3. If you don't set skip_install = true, the current package will be built and installed into the testing environment together with the dependencies from pyproject.toml.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tox-pdm-0.3.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

tox_pdm-0.3.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file tox-pdm-0.3.0.tar.gz.

File metadata

  • Download URL: tox-pdm-0.3.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11

File hashes

Hashes for tox-pdm-0.3.0.tar.gz
Algorithm Hash digest
SHA256 71964f12341c21202fd2cfbb034ba1c81a1e35d3c9f440d9431ff192c7dd1020
MD5 991f0ba27dfe8a8ddcf8eb986d1ab264
BLAKE2b-256 1dcf12830a58bd6b08a70ca392577a1c254b4409f70d865f5d4abbd76cc68604

See more details on using hashes here.

Provenance

File details

Details for the file tox_pdm-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: tox_pdm-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11

File hashes

Hashes for tox_pdm-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 809ca8bbf92b4fadde15dcea734a172236c387a1fe50e0c94c5a8340922b23f6
MD5 4dd09ecd3845eda0eb12efdae15496f8
BLAKE2b-256 91f5f17619b3a4e03bf30d49d9793169102bedcc025bc77ecbba141615d59a62

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page