| Name | tox-pdm JSON | 
            
| Version | 
                  0.6.1
                   
                  JSON | 
            
 | download  | 
            
| home_page |   | 
            
| Summary | A plugin for tox that utilizes PDM as the package manager and installer | 
            | upload_time | 2022-12-13 03:41:31 | 
            | maintainer |  | 
            
            | docs_url | None | 
            | author |  | 
            
            | requires_python | >=3.7 | 
            
            
            | license | MIT | 
            | keywords | 
                
                    tox
                
                    testing
                
                    pdm
                 | 
            | VCS | 
                
                    | 
                
            
            | bugtrack_url | 
                
                 | 
             
            
            | requirements | 
                
                  No requirements were recorded.
                
             | 
            
| Travis-CI | 
                
                   No Travis.
                
             | 
            | coveralls test coverage | 
                
                   No coveralls.
                
             | 
        
        
            
            # tox-pdm
A plugin for tox that utilizes PDM as the package manager and installer.
[](https://github.com/pdm-project/tox-pdm/actions)
[](https://pypi.org/project/tox-pdm)
[](https://github.com/pre-commit/pre-commit)
[](https://github.com/psf/black)

With this plugin, you can migrate your project to PDM while retaining the ability to test against multiple versions.
## Installation
```console
$ pip install tox-pdm
```
Or,
```console
$ pdm add -d tox-pdm
```
Or if you installed `tox` via `pipx`, you can inject the plugin by:
```console
$ 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.
```ini
[tox]
envlist = py37,py38
isolated_build = True  ; This is required for a pyproject.toml based project.
[testenv]
groups =  ; Dependency groups in pyproject.toml
    dev
    test
deps =      ; Additional dependencies, it will be installed into the library path via normal pip method
    flake8
commands =
    pytest test/
```
Here is another one installing the `test` dependencies and executing the `test` PDM script
```ini
[tox]
envlist = py3{8,9,10}
isolated_build = True  ; This is required for a pyproject.toml based project.
[testenv]
groups = test
commands = test
```
A real-world example can be found at this repository's [tox.ini](https://github.com/pdm-project/tox-pdm/blob/main/tox.ini) and
[GitHub Action workflow](https://github.com/pdm-project/tox-pdm/blob/main/.github/workflows/ci.yml).
## 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`.
4. Reuse your PDM scripts to avoid duplication
            
         
        Raw data
        
            {
    "_id": null,
    "home_page": "",
    "name": "tox-pdm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "tox,testing,pdm",
    "author": "",
    "author_email": "Frost Ming <me@frostming.com>",
    "download_url": "https://files.pythonhosted.org/packages/57/42/c437d69c3b884c58027999e524c91716ac355048284be771d810d80ceed1/tox-pdm-0.6.1.tar.gz",
    "platform": null,
    "description": "# tox-pdm\n\nA plugin for tox that utilizes PDM as the package manager and installer.\n\n[](https://github.com/pdm-project/tox-pdm/actions)\n[](https://pypi.org/project/tox-pdm)\n[](https://github.com/pre-commit/pre-commit)\n[](https://github.com/psf/black)\n\n\nWith this plugin, you can migrate your project to PDM while retaining the ability to test against multiple versions.\n\n## Installation\n\n```console\n$ pip install tox-pdm\n```\n\nOr,\n\n```console\n$ pdm add -d tox-pdm\n```\n\nOr if you installed `tox` via `pipx`, you can inject the plugin by:\n\n```console\n$ pipx inject tox tox-pdm\n```\n\n## Example tox.ini\n\nThe 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.\n\n```ini\n[tox]\nenvlist = py37,py38\nisolated_build = True  ; This is required for a pyproject.toml based project.\n\n[testenv]\ngroups =  ; Dependency groups in pyproject.toml\n    dev\n    test\ndeps =      ; Additional dependencies, it will be installed into the library path via normal pip method\n    flake8\ncommands =\n    pytest test/\n```\n\nHere is another one installing the `test` dependencies and executing the `test` PDM script\n\n```ini\n[tox]\nenvlist = py3{8,9,10}\nisolated_build = True  ; This is required for a pyproject.toml based project.\n\n[testenv]\ngroups = test\ncommands = test\n```\n\nA real-world example can be found at this repository's [tox.ini](https://github.com/pdm-project/tox-pdm/blob/main/tox.ini) and\n[GitHub Action workflow](https://github.com/pdm-project/tox-pdm/blob/main/.github/workflows/ci.yml).\n\n## Some best practices:\n\n1. `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>`.\n2. Make sure you have generated `pdm.lock` before running the test, it will greatly accelerate the testing.\n3. 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`.\n4. Reuse your PDM scripts to avoid duplication\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A plugin for tox that utilizes PDM as the package manager and installer",
    "version": "0.6.1",
    "split_keywords": [
        "tox",
        "testing",
        "pdm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "8a303a9ddf2d4cd04a0b9cd562c04bab",
                "sha256": "9e3cf83b7b55c3e33aaee0e65cf341739581ff4604a4178f0ef7dbab73a0bb35"
            },
            "downloads": -1,
            "filename": "tox_pdm-0.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a303a9ddf2d4cd04a0b9cd562c04bab",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6353,
            "upload_time": "2022-12-13T03:41:29",
            "upload_time_iso_8601": "2022-12-13T03:41:29.551435Z",
            "url": "https://files.pythonhosted.org/packages/dd/2e/9c694f9775e3bd6e9eadf6c38fdc9f2e55d2ecbc7a4bba30eecf2a4b7f91/tox_pdm-0.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "6ad09719f4cb152e252ba647b87798c3",
                "sha256": "952ea67f2ec891f11eb00749f63fc0f980384435ca782c448d154390f9f42f5e"
            },
            "downloads": -1,
            "filename": "tox-pdm-0.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6ad09719f4cb152e252ba647b87798c3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 10549,
            "upload_time": "2022-12-13T03:41:31",
            "upload_time_iso_8601": "2022-12-13T03:41:31.456592Z",
            "url": "https://files.pythonhosted.org/packages/57/42/c437d69c3b884c58027999e524c91716ac355048284be771d810d80ceed1/tox-pdm-0.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-13 03:41:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "tox-pdm"
}