mirror of
https://github.com/enpaul/tox-poetry-installer.git
synced 2024-10-29 19:47:00 +00:00
commit
af40c5a87b
@ -67,3 +67,13 @@ repos:
|
|||||||
language: system
|
language: system
|
||||||
types:
|
types:
|
||||||
- text
|
- text
|
||||||
|
|
||||||
|
- id: mdformat
|
||||||
|
name: mdformat
|
||||||
|
entry: mdformat
|
||||||
|
language: system
|
||||||
|
args:
|
||||||
|
- "--number"
|
||||||
|
- "--wrap=90"
|
||||||
|
types:
|
||||||
|
- markdown
|
||||||
|
189
CHANGELOG.md
189
CHANGELOG.md
@ -2,20 +2,18 @@
|
|||||||
|
|
||||||
See also: [Github Release Page](https://github.com/enpaul/tox-poetry-installer/releases).
|
See also: [Github Release Page](https://github.com/enpaul/tox-poetry-installer/releases).
|
||||||
|
|
||||||
|
|
||||||
## Version 0.6.4
|
## Version 0.6.4
|
||||||
|
|
||||||
View this release on:
|
View this release on:
|
||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.4),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.4),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.6.4/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.6.4/)
|
||||||
|
|
||||||
* Remove custom package compatibility checking logic from transient dependency resolution process
|
- Remove custom package compatibility checking logic from transient dependency resolution
|
||||||
* Add integration with Poetry's compatibility
|
process
|
||||||
|
- Add integration with Poetry's compatibility
|
||||||
[`Marker`](https://github.com/python-poetry/poetry-core/blob/master/poetry/core/version/markers.py)
|
[`Marker`](https://github.com/python-poetry/poetry-core/blob/master/poetry/core/version/markers.py)
|
||||||
object system for determining package
|
object system for determining package compatibility with the current platform ([#43](https://github.com/enpaul/tox-poetry-installer/issues/43))
|
||||||
compatibility with the current platform ([#43](https://github.com/enpaul/tox-poetry-installer/issues/43))
|
- Add missing PyPI classifier for Python 3
|
||||||
* Add missing PyPI classifier for Python 3
|
|
||||||
|
|
||||||
|
|
||||||
## Version 0.6.3
|
## Version 0.6.3
|
||||||
|
|
||||||
@ -23,12 +21,11 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.3),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.3),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.6.3/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.6.3/)
|
||||||
|
|
||||||
* Update required `tox` version from `^3.0` to `^3.8` to avoid compatibility issues
|
- Update required `tox` version from `^3.0` to `^3.8` to avoid compatibility issues
|
||||||
* Update logging messages to improve UX
|
- Update logging messages to improve UX
|
||||||
* Fix transient dependency packages being installed in a pseudo-random order due to Python
|
- Fix transient dependency packages being installed in a pseudo-random order due to Python
|
||||||
sets being unordered ([#41](https://github.com/enpaul/tox-poetry-installer/issues/41))
|
sets being unordered ([#41](https://github.com/enpaul/tox-poetry-installer/issues/41))
|
||||||
* Fix outdated docstrings
|
- Fix outdated docstrings
|
||||||
|
|
||||||
|
|
||||||
## Version 0.6.2
|
## Version 0.6.2
|
||||||
|
|
||||||
@ -36,14 +33,15 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.2),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.2),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.6.2/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.6.2/)
|
||||||
|
|
||||||
* Update locked version of `py` to `1.10.0` to address
|
- Update locked version of `py` to `1.10.0` to address
|
||||||
[CVE-2020-29651](https://nvd.nist.gov/vuln/detail/CVE-2020-29651)
|
[CVE-2020-29651](https://nvd.nist.gov/vuln/detail/CVE-2020-29651)
|
||||||
* Fix dependency identification failing when the package under test is a transient dependency
|
- Fix dependency identification failing when the package under test is a transient
|
||||||
of a locked dependency specified for installation
|
dependency of a locked dependency specified for installation
|
||||||
* Fix `AttributeError` being raised while creating the Tox self-provisioned environment when
|
- Fix `AttributeError` being raised while creating the Tox self-provisioned environment when
|
||||||
using either the [`minversion`](https://tox.readthedocs.io/en/latest/config.html#conf-minversion)
|
using either the
|
||||||
or [`requires`](https://tox.readthedocs.io/en/latest/config.html#conf-requires) Tox config options
|
[`minversion`](https://tox.readthedocs.io/en/latest/config.html#conf-minversion) or
|
||||||
|
[`requires`](https://tox.readthedocs.io/en/latest/config.html#conf-requires) Tox config
|
||||||
|
options
|
||||||
|
|
||||||
## Version 0.6.1
|
## Version 0.6.1
|
||||||
|
|
||||||
@ -51,40 +49,37 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.1),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.1),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.6.1/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.6.1/)
|
||||||
|
|
||||||
* Update logging around transient dependency processing to improve debugging of dependency
|
- Update logging around transient dependency processing to improve debugging of dependency
|
||||||
installation problems
|
installation problems
|
||||||
* Fix regression around handling of Poetry's unsafe packages when the unsafe package is a
|
- Fix regression around handling of Poetry's unsafe packages when the unsafe package is a
|
||||||
transient dependency ([#33](https://github.com/enpaul/tox-poetry-installer/issues/33))
|
transient dependency ([#33](https://github.com/enpaul/tox-poetry-installer/issues/33))
|
||||||
* Fix handling of Poetry's unsafe packages when the unsafe package is a primary (environment
|
- Fix handling of Poetry's unsafe packages when the unsafe package is a primary (environment
|
||||||
or package) dependency
|
or package) dependency
|
||||||
|
|
||||||
|
|
||||||
## Version 0.6.0
|
## Version 0.6.0
|
||||||
|
|
||||||
View this release on:
|
View this release on:
|
||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.0),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.0),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.6.0/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.6.0/)
|
||||||
|
|
||||||
* Add `poetry` extra to support installing Poetry as a direct dependency of the plugin
|
- Add `poetry` extra to support installing Poetry as a direct dependency of the plugin
|
||||||
* Add `--require-poetry` runtime option to force Tox failure if Poetry is not installed
|
- Add `--require-poetry` runtime option to force Tox failure if Poetry is not installed
|
||||||
* Update logging messages to improve UX around non-verbose messaging
|
- Update logging messages to improve UX around non-verbose messaging
|
||||||
* Update error logging to avoid dumping stack traces
|
- Update error logging to avoid dumping stack traces
|
||||||
* Update integration with Tox's `action` object to better manage internal state at runtime
|
- Update integration with Tox's `action` object to better manage internal state at runtime
|
||||||
* Update documentation to more clearly cover more use cases
|
- Update documentation to more clearly cover more use cases
|
||||||
* Remove `poetry` as a required dependency to support external Poetry installations
|
- Remove `poetry` as a required dependency to support external Poetry installations
|
||||||
|
|
||||||
First beta release :tada:
|
First beta release :tada:
|
||||||
|
|
||||||
|
|
||||||
## Version 0.5.2
|
## Version 0.5.2
|
||||||
|
|
||||||
View this release on:
|
View this release on:
|
||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.5.2),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.5.2),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.5.2/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.5.2/)
|
||||||
|
|
||||||
* Fix always attempting to install dependencies with incompatible python version constraints
|
- Fix always attempting to install dependencies with incompatible python version constraints
|
||||||
* Fix always attempting to install dependencies with incompatible python platforms
|
- Fix always attempting to install dependencies with incompatible python platforms
|
||||||
|
|
||||||
|
|
||||||
## Version 0.5.1
|
## Version 0.5.1
|
||||||
|
|
||||||
@ -92,11 +87,10 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.5.1),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.5.1),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.5.1/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.5.1/)
|
||||||
|
|
||||||
* Add CI/Tox tests for Python-3.9
|
- Add CI/Tox tests for Python-3.9
|
||||||
* Update dependency processing to reduce duplication during installation
|
- Update dependency processing to reduce duplication during installation
|
||||||
* Update minimum python requirement to `3.6.1`
|
- Update minimum python requirement to `3.6.1`
|
||||||
* Fix `UnboundLocal` exception when not installing project dependencies
|
- Fix `UnboundLocal` exception when not installing project dependencies
|
||||||
|
|
||||||
|
|
||||||
## Version 0.5.0
|
## Version 0.5.0
|
||||||
|
|
||||||
@ -104,16 +98,16 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.5.0),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.5.0),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.5.0/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.5.0/)
|
||||||
|
|
||||||
* Add option `locked_deps` to better support both locked and unlocked dependencies in a
|
- Add option `locked_deps` to better support both locked and unlocked dependencies in a
|
||||||
single environment
|
single environment
|
||||||
* Add blocking functionality when using `require_locked_deps = true` to prevent other
|
- Add blocking functionality when using `require_locked_deps = true` to prevent other hooks
|
||||||
hooks from running after this one
|
from running after this one
|
||||||
* Update documentation to include new configuration options and errors
|
- Update documentation to include new configuration options and errors
|
||||||
* Update documentation to improve future maintainability
|
- Update documentation to improve future maintainability
|
||||||
* Update module structure to move from single-file module to multi-file directory module
|
- Update module structure to move from single-file module to multi-file directory module
|
||||||
* Fix `RecursionError` when installing locked dependencies that specify recursive dependencies
|
- Fix `RecursionError` when installing locked dependencies that specify recursive
|
||||||
* Fix always reinstalling all locked dependencies on every run regardless of update status
|
dependencies
|
||||||
|
- Fix always reinstalling all locked dependencies on every run regardless of update status
|
||||||
|
|
||||||
## Version 0.4.0
|
## Version 0.4.0
|
||||||
|
|
||||||
@ -121,20 +115,18 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.4.0),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.4.0),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.4.0/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.4.0/)
|
||||||
|
|
||||||
* Add `install_dev_deps` configuration option for automatically installing all Poetry
|
- Add `install_dev_deps` configuration option for automatically installing all Poetry
|
||||||
dev-dependencies into a Tox testenv
|
dev-dependencies into a Tox testenv
|
||||||
|
|
||||||
|
|
||||||
## Version 0.3.1
|
## Version 0.3.1
|
||||||
|
|
||||||
View this release on:
|
View this release on:
|
||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.3.1),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.3.1),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.3.1/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.3.1/)
|
||||||
|
|
||||||
* Fix error when installing an environment with no extras specified in the configuration
|
- Fix error when installing an environment with no extras specified in the configuration
|
||||||
* Fix problem where only the dependencies of the sequentially last extra would be installed
|
- Fix problem where only the dependencies of the sequentially last extra would be installed
|
||||||
* Fix regression causing no project dependencies to be installed
|
- Fix regression causing no project dependencies to be installed
|
||||||
|
|
||||||
|
|
||||||
## Version 0.3.0
|
## Version 0.3.0
|
||||||
|
|
||||||
@ -142,12 +134,12 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.3.0),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.3.0),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.3.0/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.3.0/)
|
||||||
|
|
||||||
* Add support for the Tox [`extras`](https://tox.readthedocs.io/en/latest/config.html#conf-extras)
|
- Add support for the Tox
|
||||||
configuration parameter
|
[`extras`](https://tox.readthedocs.io/en/latest/config.html#conf-extras) configuration
|
||||||
* Update runtime-skip-conditional checks to improve clarity and ease of future maintenance
|
parameter
|
||||||
* Update lockfile parsing to avoid parsing it multiple times for a single testenv
|
- Update runtime-skip-conditional checks to improve clarity and ease of future maintenance
|
||||||
* Fix missing `poetry-core` dependency when using Poetry<1.1.0
|
- Update lockfile parsing to avoid parsing it multiple times for a single testenv
|
||||||
|
- Fix missing `poetry-core` dependency when using Poetry\<1.1.0
|
||||||
|
|
||||||
## Version 0.2.4
|
## Version 0.2.4
|
||||||
|
|
||||||
@ -155,9 +147,8 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.2.4),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.2.4),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.2.4/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.2.4/)
|
||||||
|
|
||||||
* Fix support for Poetry-1.1 ([#2](https://github.com/enpaul/tox-poetry-installer/issues/2))
|
- Fix support for Poetry-1.1 ([#2](https://github.com/enpaul/tox-poetry-installer/issues/2))
|
||||||
* Include tests in sdist ([#8](https://github.com/enpaul/tox-poetry-installer/issues/8))
|
- Include tests in sdist ([#8](https://github.com/enpaul/tox-poetry-installer/issues/8))
|
||||||
|
|
||||||
|
|
||||||
## Version 0.2.3
|
## Version 0.2.3
|
||||||
|
|
||||||
@ -165,9 +156,8 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.2.3),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.2.3),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.2.3/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.2.3/)
|
||||||
|
|
||||||
* Fix usage of the plugin in non-Poetry based projects ([#1](https://github.com/enpaul/tox-poetry-installer/issues/1))
|
- Fix usage of the plugin in non-Poetry based projects ([#1](https://github.com/enpaul/tox-poetry-installer/issues/1))
|
||||||
* Fix treating dependency names as case sensitive when they shouldn't be ([#7](https://github.com/enpaul/tox-poetry-installer/issues/7))
|
- Fix treating dependency names as case sensitive when they shouldn't be ([#7](https://github.com/enpaul/tox-poetry-installer/issues/7))
|
||||||
|
|
||||||
|
|
||||||
## Version 0.2.2
|
## Version 0.2.2
|
||||||
|
|
||||||
@ -175,9 +165,8 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.2.2),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.2.2),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.2.2/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.2.2/)
|
||||||
|
|
||||||
* Fix breaking when running Tox in projects that do not use Poetry for their environment/dependency
|
- Fix breaking when running Tox in projects that do not use Poetry for their
|
||||||
management ([#1](https://github.com/enpaul/tox-poetry-installer/issues/1))
|
environment/dependency management ([#1](https://github.com/enpaul/tox-poetry-installer/issues/1))
|
||||||
|
|
||||||
|
|
||||||
## Version 0.2.1
|
## Version 0.2.1
|
||||||
|
|
||||||
@ -185,10 +174,9 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.2.1),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.2.1),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.2.1/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.2.1/)
|
||||||
|
|
||||||
* Fix duplicate installation of transient environment dependencies
|
- Fix duplicate installation of transient environment dependencies
|
||||||
* Fix logging error indicating all environments always have zero dependencies
|
- Fix logging error indicating all environments always have zero dependencies
|
||||||
* Fix installing main dependencies when `skip_install` is false but `skipdist` is true
|
- Fix installing main dependencies when `skip_install` is false but `skipdist` is true
|
||||||
|
|
||||||
|
|
||||||
## Version 0.2.0
|
## Version 0.2.0
|
||||||
|
|
||||||
@ -196,17 +184,16 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.2.0),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.2.0),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.2.0/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.2.0/)
|
||||||
|
|
||||||
* Add support for per-environment configuration setting `require_locked_deps`
|
- Add support for per-environment configuration setting `require_locked_deps`
|
||||||
* Add support for per-dependency lock requirement setting using `@poetry` suffix
|
- Add support for per-dependency lock requirement setting using `@poetry` suffix
|
||||||
* Add support for coexisting locked and unlocked dependencies in a single test environment
|
- Add support for coexisting locked and unlocked dependencies in a single test environment
|
||||||
* Update documentation to include more usage examples
|
- Update documentation to include more usage examples
|
||||||
* Update documentation to improve clarity around problems and drawbacks
|
- Update documentation to improve clarity around problems and drawbacks
|
||||||
* Fix logging messages being inconsistently formatted
|
- Fix logging messages being inconsistently formatted
|
||||||
* Fix raising the same exception for "locked dependency not found" and "locked dependency
|
- Fix raising the same exception for "locked dependency not found" and "locked dependency
|
||||||
specifies alternate version" errors
|
specifies alternate version" errors
|
||||||
* Fix plugin errors not reporting to Tox that they happened
|
- Fix plugin errors not reporting to Tox that they happened
|
||||||
* Fix plugin errors not causing Tox to mark the env as failed
|
- Fix plugin errors not causing Tox to mark the env as failed
|
||||||
|
|
||||||
|
|
||||||
## Version 0.1.3
|
## Version 0.1.3
|
||||||
|
|
||||||
@ -214,25 +201,25 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.1.3),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.1.3),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.1.3/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.1.3/)
|
||||||
|
|
||||||
* Fix core functionality of installing dependencies from lockfile for the package-under-development
|
- Fix core functionality of installing dependencies from lockfile for the
|
||||||
("dev-package") built by Tox
|
package-under-development ("dev-package") built by Tox
|
||||||
* Fix log messages not being displayed with Tox output
|
- Fix log messages not being displayed with Tox output
|
||||||
* Add additional logging output for diagnostics
|
- Add additional logging output for diagnostics
|
||||||
* Update Poetry requirement to exclude upcoming Poetry-1.1.0 release which will break compatibility
|
- Update Poetry requirement to exclude upcoming Poetry-1.1.0 release which will break
|
||||||
|
compatibility
|
||||||
|
|
||||||
This is the first release where the core functionality actually works as expected :tada:
|
This is the first release where the core functionality actually works as expected :tada:
|
||||||
|
|
||||||
|
|
||||||
## Version 0.1.2
|
## Version 0.1.2
|
||||||
|
|
||||||
View this release on:
|
View this release on:
|
||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.1.2),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.1.2),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.1.2/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.1.2/)
|
||||||
|
|
||||||
* Test trivial functionality on Python-3.6 and Python-3.7
|
- Test trivial functionality on Python-3.6 and Python-3.7
|
||||||
* Fix disagreement between `pyproject.toml` and module metadata on what the current version is
|
- Fix disagreement between `pyproject.toml` and module metadata on what the current version
|
||||||
* Fix constant named for PEP-440 that should have been named for PEP-508
|
is
|
||||||
|
- Fix constant named for PEP-440 that should have been named for PEP-508
|
||||||
|
|
||||||
## Version 0.1.1
|
## Version 0.1.1
|
||||||
|
|
||||||
@ -240,17 +227,17 @@ View this release on:
|
|||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.1.1),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.1.1),
|
||||||
[PyPI](https://pypi.org/project/tox-poetry-installer/0.1.1/)
|
[PyPI](https://pypi.org/project/tox-poetry-installer/0.1.1/)
|
||||||
|
|
||||||
* Add/update project documentation
|
- Add/update project documentation
|
||||||
* Add static analysis and formatting enforcement automation to toxfile
|
- Add static analysis and formatting enforcement automation to toxfile
|
||||||
* Add security analysis to toxfile
|
- Add security analysis to toxfile
|
||||||
* Fix raising `KeyError` for unlocked dependencies
|
- Fix raising `KeyError` for unlocked dependencies
|
||||||
* Fix mishandling of Poetry's "unsafe dependencies"
|
- Fix mishandling of Poetry's "unsafe dependencies"
|
||||||
* Lint, blacken, and generally improve code quality
|
- Lint, blacken, and generally improve code quality
|
||||||
|
|
||||||
|
|
||||||
## Version 0.1.0
|
## Version 0.1.0
|
||||||
|
|
||||||
View this release on:
|
View this release on:
|
||||||
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.1.0),
|
[Github](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.1.0),
|
||||||
|
|
||||||
* Add support for installing Tox environment dependencies using Poetry from the Poetry lockfile
|
- Add support for installing Tox environment dependencies using Poetry from the Poetry
|
||||||
|
lockfile
|
||||||
|
@ -1,129 +1,115 @@
|
|||||||
|
|
||||||
# Contributor Covenant Code of Conduct
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
## Our Pledge
|
## Our Pledge
|
||||||
|
|
||||||
We as members, contributors, and leaders pledge to make participation in our
|
We as members, contributors, and leaders pledge to make participation in our community a
|
||||||
community a harassment-free experience for everyone, regardless of age, body
|
harassment-free experience for everyone, regardless of age, body size, visible or
|
||||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
invisible disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
identity and expression, level of experience, education, socio-economic status,
|
level of experience, education, socio-economic status, nationality, personal appearance,
|
||||||
nationality, personal appearance, race, religion, or sexual identity
|
race, religion, or sexual identity and orientation.
|
||||||
and orientation.
|
|
||||||
|
|
||||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
We pledge to act and interact in ways that contribute to an open, welcoming, diverse,
|
||||||
diverse, inclusive, and healthy community.
|
inclusive, and healthy community.
|
||||||
|
|
||||||
## Our Standards
|
## Our Standards
|
||||||
|
|
||||||
Examples of behavior that contributes to a positive environment for our
|
Examples of behavior that contributes to a positive environment for our community include:
|
||||||
community include:
|
|
||||||
|
|
||||||
* Demonstrating empathy and kindness toward other people
|
- Demonstrating empathy and kindness toward other people
|
||||||
* Being respectful of differing opinions, viewpoints, and experiences
|
- Being respectful of differing opinions, viewpoints, and experiences
|
||||||
* Giving and gracefully accepting constructive feedback
|
- Giving and gracefully accepting constructive feedback
|
||||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
- Accepting responsibility and apologizing to those affected by our mistakes, and learning
|
||||||
and learning from the experience
|
from the experience
|
||||||
* Focusing on what is best not just for us as individuals, but for the
|
- Focusing on what is best not just for us as individuals, but for the overall community
|
||||||
overall community
|
|
||||||
|
|
||||||
Examples of unacceptable behavior include:
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
* The use of sexualized language or imagery, and sexual attention or
|
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
||||||
advances of any kind
|
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
- Public or private harassment
|
||||||
* Public or private harassment
|
- Publishing others' private information, such as a physical or email address, without their
|
||||||
* Publishing others' private information, such as a physical or email
|
explicit permission
|
||||||
address, without their explicit permission
|
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
* Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
## Enforcement Responsibilities
|
||||||
|
|
||||||
Community leaders are responsible for clarifying and enforcing our standards of
|
Community leaders are responsible for clarifying and enforcing our standards of acceptable
|
||||||
acceptable behavior and will take appropriate and fair corrective action in
|
behavior and will take appropriate and fair corrective action in response to any behavior
|
||||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
that they deem inappropriate, threatening, offensive, or harmful.
|
||||||
or harmful.
|
|
||||||
|
|
||||||
Community leaders have the right and responsibility to remove, edit, or reject
|
Community leaders have the right and responsibility to remove, edit, or reject comments,
|
||||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
commits, code, wiki edits, issues, and other contributions that are not aligned to this
|
||||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
||||||
decisions when appropriate.
|
|
||||||
|
|
||||||
## Scope
|
## Scope
|
||||||
|
|
||||||
This Code of Conduct applies within all community spaces, and also applies when
|
This Code of Conduct applies within all community spaces, and also applies when an
|
||||||
an individual is officially representing the community in public spaces.
|
individual is officially representing the community in public spaces. Examples of
|
||||||
Examples of representing our community include using an official e-mail address,
|
representing our community include using an official e-mail address, posting via an
|
||||||
posting via an official social media account, or acting as an appointed
|
official social media account, or acting as an appointed representative at an online or
|
||||||
representative at an online or offline event.
|
offline event.
|
||||||
|
|
||||||
## Enforcement
|
## Enforcement
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the
|
||||||
reported to the community leaders responsible for enforcement at
|
community leaders responsible for enforcement at \[INSERT CONTACT METHOD\]. All
|
||||||
[INSERT CONTACT METHOD].
|
complaints will be reviewed and investigated promptly and fairly.
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
All community leaders are obligated to respect the privacy and security of the reporter of
|
||||||
reporter of any incident.
|
any incident.
|
||||||
|
|
||||||
## Enforcement Guidelines
|
## Enforcement Guidelines
|
||||||
|
|
||||||
Community leaders will follow these Community Impact Guidelines in determining
|
Community leaders will follow these Community Impact Guidelines in determining the
|
||||||
the consequences for any action they deem in violation of this Code of Conduct:
|
consequences for any action they deem in violation of this Code of Conduct:
|
||||||
|
|
||||||
### 1. Correction
|
### 1. Correction
|
||||||
|
|
||||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||||
unprofessional or unwelcome in the community.
|
unprofessional or unwelcome in the community.
|
||||||
|
|
||||||
**Consequence**: A private, written warning from community leaders, providing
|
**Consequence**: A private, written warning from community leaders, providing clarity
|
||||||
clarity around the nature of the violation and an explanation of why the
|
around the nature of the violation and an explanation of why the behavior was
|
||||||
behavior was inappropriate. A public apology may be requested.
|
inappropriate. A public apology may be requested.
|
||||||
|
|
||||||
### 2. Warning
|
### 2. Warning
|
||||||
|
|
||||||
**Community Impact**: A violation through a single incident or series
|
**Community Impact**: A violation through a single incident or series of actions.
|
||||||
of actions.
|
|
||||||
|
|
||||||
**Consequence**: A warning with consequences for continued behavior. No
|
**Consequence**: A warning with consequences for continued behavior. No interaction with
|
||||||
interaction with the people involved, including unsolicited interaction with
|
the people involved, including unsolicited interaction with those enforcing the Code of
|
||||||
those enforcing the Code of Conduct, for a specified period of time. This
|
Conduct, for a specified period of time. This includes avoiding interactions in community
|
||||||
includes avoiding interactions in community spaces as well as external channels
|
spaces as well as external channels like social media. Violating these terms may lead to a
|
||||||
like social media. Violating these terms may lead to a temporary or
|
temporary or permanent ban.
|
||||||
permanent ban.
|
|
||||||
|
|
||||||
### 3. Temporary Ban
|
### 3. Temporary Ban
|
||||||
|
|
||||||
**Community Impact**: A serious violation of community standards, including
|
**Community Impact**: A serious violation of community standards, including sustained
|
||||||
sustained inappropriate behavior.
|
inappropriate behavior.
|
||||||
|
|
||||||
**Consequence**: A temporary ban from any sort of interaction or public
|
**Consequence**: A temporary ban from any sort of interaction or public communication with
|
||||||
communication with the community for a specified period of time. No public or
|
the community for a specified period of time. No public or private interaction with the
|
||||||
private interaction with the people involved, including unsolicited interaction
|
people involved, including unsolicited interaction with those enforcing the Code of
|
||||||
with those enforcing the Code of Conduct, is allowed during this period.
|
Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
||||||
Violating these terms may lead to a permanent ban.
|
|
||||||
|
|
||||||
### 4. Permanent Ban
|
### 4. Permanent Ban
|
||||||
|
|
||||||
**Community Impact**: Demonstrating a pattern of violation of community
|
**Community Impact**: Demonstrating a pattern of violation of community standards,
|
||||||
standards, including sustained inappropriate behavior, harassment of an
|
including sustained inappropriate behavior, harassment of an individual, or aggression
|
||||||
individual, or aggression toward or disparagement of classes of individuals.
|
toward or disparagement of classes of individuals.
|
||||||
|
|
||||||
**Consequence**: A permanent ban from any sort of public interaction within
|
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
||||||
the community.
|
|
||||||
|
|
||||||
## Attribution
|
## Attribution
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
||||||
version 2.0, available at
|
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
||||||
|
|
||||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||||
enforcement ladder](https://github.com/mozilla/diversity).
|
enforcement ladder](https://github.com/mozilla/diversity).
|
||||||
|
|
||||||
[homepage]: https://www.contributor-covenant.org
|
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see the FAQ at
|
For answers to common questions about this code of conduct, see the FAQ at
|
||||||
https://www.contributor-covenant.org/faq. Translations are available at
|
https://www.contributor-covenant.org/faq. Translations are available at
|
||||||
https://www.contributor-covenant.org/translations.
|
https://www.contributor-covenant.org/translations.
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
13
LICENSE.md
13
LICENSE.md
@ -1,11 +1,12 @@
|
|||||||
## Copyright 2020 Ethan Paul
|
## Copyright 2020 Ethan Paul
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
software and associated documentation files (the "Software"), to deal in the Software
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||||
|
to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
The above copyright notice and this permission notice shall be included in all copies or
|
||||||
the Software.
|
substantial portions of the Software.
|
||||||
|
|
||||||
**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.**
|
**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.**
|
||||||
|
425
README.md
425
README.md
@ -12,61 +12,64 @@ dependencies to be installed using [Poetry](https://python-poetry.org/) from its
|
|||||||
[![Python Supported Versions](https://img.shields.io/pypi/pyversions/tox-poetry-installer)](https://www.python.org)
|
[![Python Supported Versions](https://img.shields.io/pypi/pyversions/tox-poetry-installer)](https://www.python.org)
|
||||||
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
|
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
|
||||||
|
|
||||||
See the [Changelog](https://github.com/enpaul/tox-poetry-installer/blob/devel/CHANGELOG.md) for release history.
|
See the
|
||||||
|
[Changelog](https://github.com/enpaul/tox-poetry-installer/blob/devel/CHANGELOG.md) for
|
||||||
|
release history.
|
||||||
|
|
||||||
**Documentation**
|
**Documentation**
|
||||||
|
|
||||||
* [Introduction](#introduction)
|
- [Introduction](#introduction)
|
||||||
* [Install](#install)
|
- [Install](#install)
|
||||||
* [Quick Start](#quick-start)
|
- [Quick Start](#quick-start)
|
||||||
* [Why would I use this?](#why-would-i-use-this) (What problems does this solve?)
|
- [Why would I use this?](#why-would-i-use-this) (What problems does this solve?)
|
||||||
* [Reference](#reference)
|
- [Reference](#reference)
|
||||||
* [Configuration Options](#configuration-options)
|
- [Configuration Options](#configuration-options)
|
||||||
* [Command-line Arguments](#command-line-arguments)
|
- [Command-line Arguments](#command-line-arguments)
|
||||||
* [Errors](#errors)
|
- [Errors](#errors)
|
||||||
* [Advanced Usage](#advanced-usage)
|
- [Advanced Usage](#advanced-usage)
|
||||||
* [Developing](#developing)
|
- [Developing](#developing)
|
||||||
* [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
* [Roadmap](#roadmap)
|
- [Roadmap](#roadmap)
|
||||||
* [Path to Beta](#path-to-beta)
|
- [Path to Beta](#path-to-beta)
|
||||||
* [Path to Stable](#path-to-stable)
|
- [Path to Stable](#path-to-stable)
|
||||||
|
|
||||||
Related resources:
|
Related resources:
|
||||||
* [Poetry Python Project Manager](https://python-poetry.org/)
|
|
||||||
* [Tox Automation Project](https://tox.readthedocs.io/en/latest/)
|
- [Poetry Python Project Manager](https://python-poetry.org/)
|
||||||
* [Other Tox plugins](https://tox.readthedocs.io/en/latest/plugins.html)
|
- [Tox Automation Project](https://tox.readthedocs.io/en/latest/)
|
||||||
|
- [Other Tox plugins](https://tox.readthedocs.io/en/latest/plugins.html)
|
||||||
|
|
||||||
Similar projects:
|
Similar projects:
|
||||||
* [Poetry Dev-Dependencies Tox Plugin](https://github.com/sinoroc/tox-poetry-dev-dependencies)
|
|
||||||
* [Poetry Tox Plugin](https://github.com/tkukushkin/tox-poetry)
|
|
||||||
|
|
||||||
|
- [Poetry Dev-Dependencies Tox Plugin](https://github.com/sinoroc/tox-poetry-dev-dependencies)
|
||||||
|
- [Poetry Tox Plugin](https://github.com/tkukushkin/tox-poetry)
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
This is a plugin to unify two great projects in the Python ecosystem: the
|
This is a plugin to unify two great projects in the Python ecosystem: the
|
||||||
[Tox](https://tox.readthedocs.io/en/latest/) automation project and the
|
[Tox](https://tox.readthedocs.io/en/latest/) automation project and the
|
||||||
[Poetry](https://python-poetry.org) project/dependency manager. Specifically it allows
|
[Poetry](https://python-poetry.org) project/dependency manager. Specifically it allows the
|
||||||
the repeatable dependency resolution and installation tools that Poetry uses to benefit
|
repeatable dependency resolution and installation tools that Poetry uses to benefit the
|
||||||
the isolated environments that Tox uses to run automated tests. The motivation to write
|
isolated environments that Tox uses to run automated tests. The motivation to write this
|
||||||
this plugin came from a need for a single source of truth for the versions of all
|
plugin came from a need for a single source of truth for the versions of all packages that
|
||||||
packages that should be installed to an environment.
|
should be installed to an environment.
|
||||||
|
|
||||||
When in use this plugin will allow a Tox environment to install its required
|
When in use this plugin will allow a Tox environment to install its required dependencies
|
||||||
dependencies using the versions specified in the Poetry lockfile. This eliminates
|
using the versions specified in the Poetry lockfile. This eliminates needing to specify
|
||||||
needing to specify package versions in multiple places as well as ensures that the Tox
|
package versions in multiple places as well as ensures that the Tox environment has the
|
||||||
environment has the exact same versions of a given package as the Poetry environment.
|
exact same versions of a given package as the Poetry environment. This reduces (or
|
||||||
This reduces (or hopefully eliminates) hard to debug problems caused by subtle
|
hopefully eliminates) hard to debug problems caused by subtle differences in the
|
||||||
differences in the dependency graph of the active development environment (the one managed
|
dependency graph of the active development environment (the one managed by Poetry) and the
|
||||||
by Poetry) and the automated test environment(s) created by Tox.
|
automated test environment(s) created by Tox.
|
||||||
|
|
||||||
To learn more about the problems this plugin aims to solve jump ahead to
|
To learn more about the problems this plugin aims to solve jump ahead to
|
||||||
[What problems does this solve?](#why-would-i-use-this).
|
[What problems does this solve?](#why-would-i-use-this). Otherwise keep reading to get
|
||||||
Otherwise keep reading to get started.
|
started.
|
||||||
|
|
||||||
### Install
|
### Install
|
||||||
|
|
||||||
The recommended way to install the plugin is to add it to a project's `pyproject.toml`
|
The recommended way to install the plugin is to add it to a project's `pyproject.toml` and
|
||||||
and lockfile using Poetry:
|
lockfile using Poetry:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
poetry add tox-poetry-installer[poetry] --dev
|
poetry add tox-poetry-installer[poetry] --dev
|
||||||
@ -85,7 +88,7 @@ pip install tox-poetry-installer[poetry] == 0.6.0
|
|||||||
```
|
```
|
||||||
|
|
||||||
The plugin can also be installed using the Tox
|
The plugin can also be installed using the Tox
|
||||||
[`requires`]((https://tox.readthedocs.io/en/latest/config.html#conf-requires))
|
[`requires`](<(https://tox.readthedocs.io/en/latest/config.html#conf-requires)>)
|
||||||
configuration option. Note however that dependencies installed via the `requires` option
|
configuration option. Note however that dependencies installed via the `requires` option
|
||||||
are not handled by the plugin and will be installed the same way as a `pip install ...`
|
are not handled by the plugin and will be installed the same way as a `pip install ...`
|
||||||
above. For this reason it is also recommended to always pin to a specific version when
|
above. For this reason it is also recommended to always pin to a specific version when
|
||||||
@ -115,9 +118,9 @@ information on this use case.
|
|||||||
|
|
||||||
### Quick Start
|
### Quick Start
|
||||||
|
|
||||||
Before making any changes to `tox.ini` the project is already benefiting from having
|
Before making any changes to `tox.ini` the project is already benefiting from having the
|
||||||
the plugin installed: all dependencies of the root project package are installed using
|
plugin installed: all dependencies of the root project package are installed using the
|
||||||
the Poetry backend to all Tox environments that install the root package without any
|
Poetry backend to all Tox environments that install the root package without any
|
||||||
configuration changes.
|
configuration changes.
|
||||||
|
|
||||||
To add dependencies from the lockfile to a Tox environment, add the option
|
To add dependencies from the lockfile to a Tox environment, add the option
|
||||||
@ -151,8 +154,8 @@ deps =
|
|||||||
commands = ...
|
commands = ...
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, to quickly install all Poetry dev-dependencies to a Tox environment, add the
|
Alternatively, to quickly install all Poetry dev-dependencies to a Tox environment, add
|
||||||
[`install_dev_deps`](#install_dev_deps) option to the environment configuration:
|
the [`install_dev_deps`](#install_dev_deps) option to the environment configuration:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[testenv]
|
[testenv]
|
||||||
@ -160,21 +163,21 @@ description = Some very cool tests
|
|||||||
install_dev_deps = true
|
install_dev_deps = true
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [Reference](#reference) section for more details on available
|
See the [Reference](#reference) section for more details on available configuration
|
||||||
configuration options and the [Advanced Usage](#advanced-usage) section for some
|
options and the [Advanced Usage](#advanced-usage) section for some unusual use cases.
|
||||||
unusual use cases.
|
|
||||||
|
|
||||||
### Why would I use this?
|
### Why would I use this?
|
||||||
|
|
||||||
**The Problem**
|
**The Problem**
|
||||||
|
|
||||||
By default Tox uses Pip to install the [PEP-508](https://www.python.org/dev/peps/pep-0508/)
|
By default Tox uses Pip to install the
|
||||||
compliant dependencies to a test environment. This plugin extends the default Tox
|
[PEP-508](https://www.python.org/dev/peps/pep-0508/) compliant dependencies to a test
|
||||||
dependency installation behavior to support installing dependencies using a Poetry-based
|
environment. This plugin extends the default Tox dependency installation behavior to
|
||||||
installation method that makes use of the dependency metadata from Poetry's lockfile.
|
support installing dependencies using a Poetry-based installation method that makes use of
|
||||||
|
the dependency metadata from Poetry's lockfile.
|
||||||
|
|
||||||
Environment dependencies for a Tox environment are usually specified in PEP-508 format, like
|
Environment dependencies for a Tox environment are usually specified in PEP-508 format,
|
||||||
the below example:
|
like the below example:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[testenv]
|
[testenv]
|
||||||
@ -185,55 +188,58 @@ deps =
|
|||||||
baz
|
baz
|
||||||
```
|
```
|
||||||
|
|
||||||
Let's assume these dependencies are also useful during development, so they can be added to the
|
Let's assume these dependencies are also useful during development, so they can be added
|
||||||
Poetry environment using this command:
|
to the Poetry environment using this command:
|
||||||
|
|
||||||
```
|
```
|
||||||
poetry add --dev \
|
poetry add --dev \
|
||||||
foo==1.2.3 \
|
foo==1.2.3 \
|
||||||
bar>=1.3,<2.0 \
|
bar>=1.3,<2.0 \
|
||||||
baz
|
baz
|
||||||
```
|
```
|
||||||
|
|
||||||
However there is a potential problem that could arise from each of these environment
|
However there is a potential problem that could arise from each of these environment
|
||||||
dependencies that would _only_ appear in the Tox environment and not in the Poetry
|
dependencies that would _only_ appear in the Tox environment and not in the Poetry
|
||||||
environment in use by a developer:
|
environment in use by a developer:
|
||||||
|
|
||||||
* **The `foo` dependency is pinned to a specific version:** let's imagine a security
|
- **The `foo` dependency is pinned to a specific version:** let's imagine a security
|
||||||
vulnerability is discovered in `foo` and the maintainers release version `1.2.4` to fix
|
vulnerability is discovered in `foo` and the maintainers release version `1.2.4` to fix
|
||||||
it. A developer can run `poetry remove foo` and then `poetry add foo^1.2` to get the new
|
it. A developer can run `poetry remove foo` and then `poetry add foo^1.2` to get the new
|
||||||
version, but the Tox environment is left unchanged. The development environment, as defined by
|
version, but the Tox environment is left unchanged. The development environment, as
|
||||||
the lockfile, is now patched against the vulnerability but the Tox environment is not.
|
defined by the lockfile, is now patched against the vulnerability but the Tox environment
|
||||||
|
is not.
|
||||||
|
|
||||||
* **The `bar` dependency specifies a dynamic range:** a dynamic range allows a range of
|
- **The `bar` dependency specifies a dynamic range:** a dynamic range allows a range of
|
||||||
versions to be installed, but the lockfile will have an exact version specified so that
|
versions to be installed, but the lockfile will have an exact version specified so that
|
||||||
the Poetry environment is reproducible; this allows versions to be updated with
|
the Poetry environment is reproducible; this allows versions to be updated with
|
||||||
`poetry update` rather than with the `remove` and `add` commands used above. If the
|
`poetry update` rather than with the `remove` and `add` commands used above. If the
|
||||||
maintainers of `bar` release version `1.6.0` then the Tox environment will install it
|
maintainers of `bar` release version `1.6.0` then the Tox environment will install it
|
||||||
because it is valid for the specified version range. Meanwhile the Poetry environment will
|
because it is valid for the specified version range. Meanwhile the Poetry environment will
|
||||||
continue to install the version from the lockfile until `poetry update bar` explicitly
|
continue to install the version from the lockfile until `poetry update bar` explicitly
|
||||||
updates it. The development environment is now has a different version of `bar` than the Tox
|
updates it. The development environment is now has a different version of `bar` than the
|
||||||
environment.
|
Tox environment.
|
||||||
|
|
||||||
* **The `baz` dependency is unpinned:** unpinned dependencies are
|
- **The `baz` dependency is unpinned:** unpinned dependencies are
|
||||||
[generally a bad idea](https://python-poetry.org/docs/faq/#why-are-unbound-version-constraints-a-bad-idea),
|
[generally a bad idea](https://python-poetry.org/docs/faq/#why-are-unbound-version-constraints-a-bad-idea),
|
||||||
but here it can cause real problems. Poetry will interpret an unbound dependency using
|
but here it can cause real problems. Poetry will interpret an unbound dependency using
|
||||||
[the carrot requirement](https://python-poetry.org/docs/dependency-specification/#caret-requirements)
|
[the carrot requirement](https://python-poetry.org/docs/dependency-specification/#caret-requirements)
|
||||||
but Pip (via Tox) will interpret it as a wildcard. If the latest version of `baz` is `1.0.0`
|
but Pip (via Tox) will interpret it as a wildcard. If the latest version of `baz` is
|
||||||
then `poetry add baz` will result in a constraint of `baz>=1.0.0,<2.0.0` while the Tox
|
`1.0.0` then `poetry add baz` will result in a constraint of `baz>=1.0.0,<2.0.0` while the
|
||||||
environment will have a constraint of `baz==*`. The Tox environment can now install an
|
Tox environment will have a constraint of `baz==*`. The Tox environment can now install an
|
||||||
incompatible version of `baz` and any errors that causes cannot be replicated using `poetry update`.
|
incompatible version of `baz` and any errors that causes cannot be replicated using
|
||||||
|
`poetry update`.
|
||||||
|
|
||||||
All of these problems can apply not only to the dependencies specified for a Tox environment,
|
All of these problems can apply not only to the dependencies specified for a Tox
|
||||||
but also to the dependencies of those dependencies, those dependencies' dependencies, and so on.
|
environment, but also to the dependencies of those dependencies, those dependencies'
|
||||||
|
dependencies, and so on.
|
||||||
|
|
||||||
**The Solution**
|
**The Solution**
|
||||||
|
|
||||||
This plugin allows dependencies specified in Tox environment take their version directly from
|
This plugin allows dependencies specified in Tox environment take their version directly
|
||||||
the Poetry lockfile without needing an independent version to be specified in the Tox
|
from the Poetry lockfile without needing an independent version to be specified in the Tox
|
||||||
environment configuration. The modified version of the example environment given below appears
|
environment configuration. The modified version of the example environment given below
|
||||||
less stable than the one presented above because it does not specify any versions for its
|
appears less stable than the one presented above because it does not specify any versions
|
||||||
dependencies:
|
for its dependencies:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[testenv]
|
[testenv]
|
||||||
@ -246,11 +252,10 @@ locked_deps =
|
|||||||
```
|
```
|
||||||
|
|
||||||
However with the `tox-poetry-installer` plugin installed Tox will install these
|
However with the `tox-poetry-installer` plugin installed Tox will install these
|
||||||
dependencies from the Poetry lockfile so that the version installed to the Tox
|
dependencies from the Poetry lockfile so that the version installed to the Tox environment
|
||||||
environment exactly matches the version Poetry is managing. When `poetry update` updates
|
exactly matches the version Poetry is managing. When `poetry update` updates the lockfile
|
||||||
the lockfile with new versions of these dependencies, Tox will automatically install
|
with new versions of these dependencies, Tox will automatically install these new versions
|
||||||
these new versions without needing any changes to the configuration.
|
without needing any changes to the configuration.
|
||||||
|
|
||||||
|
|
||||||
## Reference
|
## Reference
|
||||||
|
|
||||||
@ -260,14 +265,14 @@ All options listed below are Tox environment options and can be applied to one o
|
|||||||
environment sections of the `tox.ini` file. They cannot be applied to the global Tox
|
environment sections of the `tox.ini` file. They cannot be applied to the global Tox
|
||||||
configuration section.
|
configuration section.
|
||||||
|
|
||||||
**NOTE:** Environment settings applied to the main `testenv` environment will be
|
**NOTE:** Environment settings applied to the main `testenv` environment will be inherited
|
||||||
inherited by child environments (i.e. `testenv:foo`) unless they are explicitly
|
by child environments (i.e. `testenv:foo`) unless they are explicitly overridden by the
|
||||||
overridden by the child environment's configuration.
|
child environment's configuration.
|
||||||
|
|
||||||
#### `locked_deps`
|
#### `locked_deps`
|
||||||
|
|
||||||
* **Type:** multi-line list
|
- **Type:** multi-line list
|
||||||
* **Default:** `[]`
|
- **Default:** `[]`
|
||||||
|
|
||||||
Names of packages in the Poetry lockfile to install to the Tox environment. All
|
Names of packages in the Poetry lockfile to install to the Tox environment. All
|
||||||
dependencies specified here will be installed to the Tox environment using the details
|
dependencies specified here will be installed to the Tox environment using the details
|
||||||
@ -275,24 +280,23 @@ given by the Poetry lockfile.
|
|||||||
|
|
||||||
#### `require_locked_deps`
|
#### `require_locked_deps`
|
||||||
|
|
||||||
|
- **Type:** boolean
|
||||||
|
- **Default:** `false`
|
||||||
|
|
||||||
* **Type:** boolean
|
Whether the environment should allow unlocked dependencies (dependencies not in the Poetry
|
||||||
* **Default:** `false`
|
lockfile) to be installed alongside locked dependencies. If `true` then an error will be
|
||||||
|
raised if the environment specifies unlocked dependencies to install and the plugin will
|
||||||
Whether the environment should allow unlocked dependencies (dependencies not in the
|
block any other plugins from using the
|
||||||
Poetry lockfile) to be installed alongside locked dependencies. If `true` then an error
|
|
||||||
will be raised if the environment specifies unlocked dependencies to install and the
|
|
||||||
plugin will block any other plugins from using the
|
|
||||||
[`tox_testenv_install_deps`](https://tox.readthedocs.io/en/latest/plugins.html#tox.hookspecs.tox_testenv_install_deps)
|
[`tox_testenv_install_deps`](https://tox.readthedocs.io/en/latest/plugins.html#tox.hookspecs.tox_testenv_install_deps)
|
||||||
hook.
|
hook.
|
||||||
|
|
||||||
#### `install_dev_deps`
|
#### `install_dev_deps`
|
||||||
|
|
||||||
* **Type:** boolean
|
- **Type:** boolean
|
||||||
* **Default:** `false`
|
- **Default:** `false`
|
||||||
|
|
||||||
Whether all Poetry dev-dependencies should be installed to the environment. If `true`
|
Whether all Poetry dev-dependencies should be installed to the environment. If `true` then
|
||||||
then all dependencies specified in the
|
all dependencies specified in the
|
||||||
[`dev-dependencies`](https://python-poetry.org/docs/pyproject/#dependencies-and-dev-dependencies)
|
[`dev-dependencies`](https://python-poetry.org/docs/pyproject/#dependencies-and-dev-dependencies)
|
||||||
section of `pyproject.toml` will be installed automatically.
|
section of `pyproject.toml` will be installed automatically.
|
||||||
|
|
||||||
@ -307,82 +311,79 @@ Indicates that Poetry is expected to be available to Tox and, if it is not, then
|
|||||||
run should fail. If provided and the `poetry` package is not installed to the same
|
run should fail. If provided and the `poetry` package is not installed to the same
|
||||||
environment as the `tox` package then Tox will fail.
|
environment as the `tox` package then Tox will fail.
|
||||||
|
|
||||||
**NOTE:** See [Advanced Usage](#installing-alongside-an-existing-poetry-installation)
|
**NOTE:** See [Advanced Usage](#installing-alongside-an-existing-poetry-installation) for
|
||||||
for more information.
|
more information.
|
||||||
|
|
||||||
### Errors
|
### Errors
|
||||||
|
|
||||||
If the plugin encounters an error while processing a Tox environment then it will mark
|
If the plugin encounters an error while processing a Tox environment then it will mark the
|
||||||
the environment as failed and set the environment status to one of the values below:
|
environment as failed and set the environment status to one of the values below:
|
||||||
|
|
||||||
**NOTE:** In addition to the reasons noted below, the plugin can encounter errors if the
|
**NOTE:** In addition to the reasons noted below, the plugin can encounter errors if the
|
||||||
Poetry lockfile is not up-to-date with `pyproject.toml`. To resynchronize the
|
Poetry lockfile is not up-to-date with `pyproject.toml`. To resynchronize the lockfile
|
||||||
lockfile with the `pyproject.toml` run one of
|
with the `pyproject.toml` run one of
|
||||||
[`poetry update`](https://python-poetry.org/docs/cli/#update) or
|
[`poetry update`](https://python-poetry.org/docs/cli/#update) or
|
||||||
[`poetry lock`](https://python-poetry.org/docs/cli/#lock)
|
[`poetry lock`](https://python-poetry.org/docs/cli/#lock)
|
||||||
|
|
||||||
#### Poetry Not Installed Error
|
#### Poetry Not Installed Error
|
||||||
|
|
||||||
* **Status value:** `PoetryNotInstalledError`
|
- **Status value:** `PoetryNotInstalledError`
|
||||||
* **Cause:** Indicates that the `poetry` module could not be imported from the same
|
- **Cause:** Indicates that the `poetry` module could not be imported from the same
|
||||||
environment as the running `tox` module and the runtime flags specified
|
environment as the running `tox` module and the runtime flags specified
|
||||||
[`--require-poetry`](#--require-poetry).
|
[`--require-poetry`](#--require-poetry).
|
||||||
* **Resolution options:**
|
- **Resolution options:**
|
||||||
* Install Poetry: ensure that `poetry` is installed to the same environment as `tox`.
|
- Install Poetry: ensure that `poetry` is installed to the same environment as `tox`.
|
||||||
* Skip running the plugin: remove the `--require-poetry` flag from the runtime options.
|
- Skip running the plugin: remove the `--require-poetry` flag from the runtime options.
|
||||||
|
|
||||||
**NOTE:** See [Advanced Usage](#installing-alongside-an-existing-poetry-installation)
|
**NOTE:** See [Advanced Usage](#installing-alongside-an-existing-poetry-installation) for
|
||||||
for more information.
|
more information.
|
||||||
|
|
||||||
#### Locked Dependency Version Conflict Error
|
#### Locked Dependency Version Conflict Error
|
||||||
|
|
||||||
* **Status value:** `LockedDepVersionConflictError`
|
- **Status value:** `LockedDepVersionConflictError`
|
||||||
* **Cause:** Indicates that a dependency specified in the [`locked_deps`](#locked_deps)
|
- **Cause:** Indicates that a dependency specified in the [`locked_deps`](#locked_deps)
|
||||||
configuration option in `tox.ini` includes a
|
configuration option in `tox.ini` includes a
|
||||||
[PEP-508 version specifier](https://www.python.org/dev/peps/pep-0508/#grammar)
|
[PEP-508 version specifier](https://www.python.org/dev/peps/pep-0508/#grammar) (i.e.
|
||||||
(i.e. `pytest >=6.0, <6.1`).
|
`pytest >=6.0, <6.1`).
|
||||||
* **Resolution options:**
|
- **Resolution options:**
|
||||||
* Use the dependency version from the lockfile: remove any/all version specifiers
|
- Use the dependency version from the lockfile: remove any/all version specifiers from the
|
||||||
from the item in the `locked_deps` list in `tox.ini`.
|
item in the `locked_deps` list in `tox.ini`.
|
||||||
* Do not install the dependency: remove the item from the `locked_deps` list in
|
- Do not install the dependency: remove the item from the `locked_deps` list in `tox.ini`.
|
||||||
`tox.ini`.
|
|
||||||
|
|
||||||
#### Locked Dependency Not Found Error
|
#### Locked Dependency Not Found Error
|
||||||
|
|
||||||
* **Status value:** `LockedDepNotFoundError`
|
- **Status value:** `LockedDepNotFoundError`
|
||||||
* **Cause:** Indicates that a dependency specified in the [`locked_deps`](#locked_deps)
|
- **Cause:** Indicates that a dependency specified in the [`locked_deps`](#locked_deps)
|
||||||
configuration option in `tox.ini` could not be found in the Poetry lockfile.
|
configuration option in `tox.ini` could not be found in the Poetry lockfile.
|
||||||
* **Resolution options:**
|
- **Resolution options:**
|
||||||
* Add the dependency to the lockfile: run
|
- Add the dependency to the lockfile: run
|
||||||
[`poetry add <dependency>`](https://python-poetry.org/docs/cli/#add).
|
[`poetry add <dependency>`](https://python-poetry.org/docs/cli/#add).
|
||||||
* Do not install the dependency: remove the item from the `locked_deps` list in
|
- Do not install the dependency: remove the item from the `locked_deps` list in `tox.ini`.
|
||||||
`tox.ini`.
|
|
||||||
|
|
||||||
#### Extra Not Found Error
|
#### Extra Not Found Error
|
||||||
|
|
||||||
* **Status value:** `ExtraNotFoundError`
|
- **Status value:** `ExtraNotFoundError`
|
||||||
* **Cause:** Indicates that the [`extras`](https://tox.readthedocs.io/en/latest/config.html#conf-extras)
|
- **Cause:** Indicates that the
|
||||||
configuration option specified a setuptools extra that is not configured by Poetry in
|
[`extras`](https://tox.readthedocs.io/en/latest/config.html#conf-extras) configuration
|
||||||
`pyproject.toml`
|
option specified a setuptools extra that is not configured by Poetry in `pyproject.toml`
|
||||||
* **Resolution options:**
|
- **Resolution options:**
|
||||||
* Configure the extra: add a section for the named extra to the
|
- Configure the extra: add a section for the named extra to the
|
||||||
[`extras`](https://python-poetry.org/docs/pyproject/#extras) section of
|
[`extras`](https://python-poetry.org/docs/pyproject/#extras) section of `pyproject.toml`
|
||||||
`pyproject.toml` and optionally assign dependencies to the named extra using the
|
and optionally assign dependencies to the named extra using the
|
||||||
[`--optional`](https://python-poetry.org/docs/cli/#options_3) dependency setting.
|
[`--optional`](https://python-poetry.org/docs/cli/#options_3) dependency setting.
|
||||||
* Remove the extra: remove the item from the `extras` list in `tox.ini`.
|
- Remove the extra: remove the item from the `extras` list in `tox.ini`.
|
||||||
|
|
||||||
#### Locked Dependencies Required Error
|
#### Locked Dependencies Required Error
|
||||||
|
|
||||||
* **Status value:** `LockedDepsRequiredError`
|
- **Status value:** `LockedDepsRequiredError`
|
||||||
* **Cause:** Indicates that an environment with the [`require_locked_deps`](#require_locked_deps)
|
- **Cause:** Indicates that an environment with the
|
||||||
configuration option also specified unlocked dependencies using
|
[`require_locked_deps`](#require_locked_deps) configuration option also specified unlocked
|
||||||
[`deps`](https://tox.readthedocs.io/en/latest/config.html#conf-deps) option in
|
dependencies using [`deps`](https://tox.readthedocs.io/en/latest/config.html#conf-deps)
|
||||||
`tox.ini`.
|
option in `tox.ini`.
|
||||||
* **Resolution options:**
|
- **Resolution options:**
|
||||||
* Remove all unlocked dependencies: remove the `deps` configuration option in
|
- Remove all unlocked dependencies: remove the `deps` configuration option in `tox.ini`.
|
||||||
`tox.ini`.
|
- Allow unlocked dependencies: remove the `require_locked_deps` configuration option in
|
||||||
* Allow unlocked dependencies: remove the `require_locked_deps` configuration option
|
`tox.ini` or explicitly set `require_locked_deps = false`.
|
||||||
in `tox.ini` or explicitly set `require_locked_deps = false`.
|
|
||||||
|
|
||||||
### Advanced Usage
|
### Advanced Usage
|
||||||
|
|
||||||
@ -393,16 +394,16 @@ installed by this plugin the Poetry lockfile. Note that these settings will stil
|
|||||||
applied by the default Tox installation backend when installing unlocked dependencies
|
applied by the default Tox installation backend when installing unlocked dependencies
|
||||||
using the built-in `deps` option.
|
using the built-in `deps` option.
|
||||||
|
|
||||||
* [`install_command`](https://tox.readthedocs.io/en/latest/config.html#conf-install_command)
|
- [`install_command`](https://tox.readthedocs.io/en/latest/config.html#conf-install_command)
|
||||||
* [`pip_pre`](https://tox.readthedocs.io/en/latest/config.html#conf-pip_pre)
|
- [`pip_pre`](https://tox.readthedocs.io/en/latest/config.html#conf-pip_pre)
|
||||||
* [`download`](https://tox.readthedocs.io/en/latest/config.html#conf-download)
|
- [`download`](https://tox.readthedocs.io/en/latest/config.html#conf-download)
|
||||||
* [`indexserver`](https://tox.readthedocs.io/en/latest/config.html#conf-indexserver)
|
- [`indexserver`](https://tox.readthedocs.io/en/latest/config.html#conf-indexserver)
|
||||||
* [`usedevelop`](https://tox.readthedocs.io/en/latest/config.html#conf-indexserver)
|
- [`usedevelop`](https://tox.readthedocs.io/en/latest/config.html#conf-indexserver)
|
||||||
|
|
||||||
All of these options are obsoleted by using the Poetry backend. If a given package
|
All of these options are obsoleted by using the Poetry backend. If a given package
|
||||||
installs successfully using Poetry (using either `poetry add <package>` or
|
installs successfully using Poetry (using either `poetry add <package>` or
|
||||||
`poetry install`) then the required configuration options are already properly set in
|
`poetry install`) then the required configuration options are already properly set in the
|
||||||
the Poetry configuration and the plugin will automatically use the same settings when
|
Poetry configuration and the plugin will automatically use the same settings when
|
||||||
installing the package.
|
installing the package.
|
||||||
|
|
||||||
#### Reinstalling locked dependencies to a Tox environment
|
#### Reinstalling locked dependencies to a Tox environment
|
||||||
@ -423,23 +424,23 @@ excluded by Poetry itself. As a result these packages cannot be installed by thi
|
|||||||
either as environment dependencies (passed directly to [`locked_deps`](#locked_deps)) or
|
either as environment dependencies (passed directly to [`locked_deps`](#locked_deps)) or
|
||||||
as transient dependencies (a dependency of a locked dependency).
|
as transient dependencies (a dependency of a locked dependency).
|
||||||
|
|
||||||
As of [Poetry-1.1.4](https://github.com/python-poetry/poetry/releases/tag/1.1.4) there
|
As of [Poetry-1.1.4](https://github.com/python-poetry/poetry/releases/tag/1.1.4) there are
|
||||||
are four packages classified as "unsafe" by Poetry and excluded from the lockfile:
|
four packages classified as "unsafe" by Poetry and excluded from the lockfile:
|
||||||
|
|
||||||
* `setuptools`
|
- `setuptools`
|
||||||
* `distribute`
|
- `distribute`
|
||||||
* `pip`
|
- `pip`
|
||||||
* `wheel`
|
- `wheel`
|
||||||
|
|
||||||
When one of these packages is encountered by the plugin a warning will be logged and
|
When one of these packages is encountered by the plugin a warning will be logged and
|
||||||
_**the package will not be installed to the environment**_. If the unsafe package
|
_**the package will not be installed to the environment**_. If the unsafe package is
|
||||||
is required for the environment then it will need to be specified as an unlocked
|
required for the environment then it will need to be specified as an unlocked dependency
|
||||||
dependency using the [`deps`](https://tox.readthedocs.io/en/latest/config.html#conf-deps)
|
using the [`deps`](https://tox.readthedocs.io/en/latest/config.html#conf-deps)
|
||||||
configuration option in `tox.ini`, ideally with an exact pinned version.
|
configuration option in `tox.ini`, ideally with an exact pinned version.
|
||||||
|
|
||||||
* The set of packages excluded from the Poetry lockfile can be found in
|
- The set of packages excluded from the Poetry lockfile can be found in
|
||||||
[`poetry.puzzle.provider.Provider.UNSAFE_DEPENDENCIES`](https://github.com/python-poetry/poetry/blob/master/poetry/puzzle/provider.py)
|
[`poetry.puzzle.provider.Provider.UNSAFE_DEPENDENCIES`](https://github.com/python-poetry/poetry/blob/master/poetry/puzzle/provider.py)
|
||||||
* There is an ongoing discussion of Poetry's handling of these packages at
|
- There is an ongoing discussion of Poetry's handling of these packages at
|
||||||
[python-poetry/poetry#1584](https://github.com/python-poetry/poetry/issues/1584)
|
[python-poetry/poetry#1584](https://github.com/python-poetry/poetry/issues/1584)
|
||||||
|
|
||||||
#### Installing alongside an existing Poetry installation
|
#### Installing alongside an existing Poetry installation
|
||||||
@ -447,8 +448,8 @@ configuration option in `tox.ini`, ideally with an exact pinned version.
|
|||||||
The plugin specifies the `poetry` package as an optional dependency to support an
|
The plugin specifies the `poetry` package as an optional dependency to support an
|
||||||
externally managed Poetry installation such as in a container or CI environment. This
|
externally managed Poetry installation such as in a container or CI environment. This
|
||||||
gives greater flexibility when using Poetry arguments like `--no-root`, `--no-dev`, or
|
gives greater flexibility when using Poetry arguments like `--no-root`, `--no-dev`, or
|
||||||
`--remove-untracked` which can cause Poetry to uninstall itself if Poetry is specified
|
`--remove-untracked` which can cause Poetry to uninstall itself if Poetry is specified as
|
||||||
as a dependency of one of the packages it is managing (like this plugin).
|
a dependency of one of the packages it is managing (like this plugin).
|
||||||
|
|
||||||
To have the plugin use the externally-managed Poetry package simply do not install the
|
To have the plugin use the externally-managed Poetry package simply do not install the
|
||||||
`poetry` extra when installing this plugin:
|
`poetry` extra when installing this plugin:
|
||||||
@ -461,9 +462,9 @@ poetry add tox-poetry-installer[poetry]
|
|||||||
poetry add tox-poetry-installer
|
poetry add tox-poetry-installer
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that Poetry is an optional dependency to support this use case _only_: Poetry must
|
Note that Poetry is an optional dependency to support this use case _only_: Poetry must be
|
||||||
be installed to the same environment as Tox for the plugin to function. To check that
|
installed to the same environment as Tox for the plugin to function. To check that the
|
||||||
the local environment has all of the required modules in scope run the below command:
|
local environment has all of the required modules in scope run the below command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python -c '\
|
python -c '\
|
||||||
@ -473,16 +474,16 @@ python -c '\
|
|||||||
'
|
'
|
||||||
```
|
```
|
||||||
|
|
||||||
**NOTE:** To force Tox to fail if Poetry is not installed, run the `tox` command with
|
**NOTE:** To force Tox to fail if Poetry is not installed, run the `tox` command with the
|
||||||
the [`--require-poetry`](#--require-poetry) option.
|
[`--require-poetry`](#--require-poetry) option.
|
||||||
|
|
||||||
|
|
||||||
## Developing
|
## Developing
|
||||||
|
|
||||||
Local development requirements:
|
Local development requirements:
|
||||||
* Python version 3.6+ ([install](https://www.python.org/downloads/))
|
|
||||||
* Poetry version 1.0+ ([install](https://python-poetry.org/docs/#installation))
|
- Python version 3.6+ ([install](https://www.python.org/downloads/))
|
||||||
* GNU Make (optional, required to use the makefile)
|
- Poetry version 1.0+ ([install](https://python-poetry.org/docs/#installation))
|
||||||
|
- GNU Make (optional, required to use the makefile)
|
||||||
|
|
||||||
Local environment setup instructions:
|
Local environment setup instructions:
|
||||||
|
|
||||||
@ -511,55 +512,53 @@ when developing the project. Alternatively, many `git` commands will need to be
|
|||||||
outside of the environment shell by prefacing the command with
|
outside of the environment shell by prefacing the command with
|
||||||
[`poetry run`](https://python-poetry.org/docs/cli/#run).
|
[`poetry run`](https://python-poetry.org/docs/cli/#run).
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
All project contributors and participants are expected to adhere to the
|
All project contributors and participants are expected to adhere to the
|
||||||
[Contributor Covenant Code of Conduct, v2](CODE_OF_CONDUCT.md)
|
[Contributor Covenant Code of Conduct, v2](CODE_OF_CONDUCT.md) ([external link](https://www.contributor-covenant.org/version/2/0/code_of_conduct/)).
|
||||||
([external link](https://www.contributor-covenant.org/version/2/0/code_of_conduct/)).
|
|
||||||
|
|
||||||
The `devel` branch has the latest (potentially unstable) changes. The
|
The `devel` branch has the latest (potentially unstable) changes. The
|
||||||
[tagged versions](https://github.com/enpaul/tox-poetry-installer/releases) correspond to the
|
[tagged versions](https://github.com/enpaul/tox-poetry-installer/releases) correspond to
|
||||||
releases on PyPI.
|
the releases on PyPI.
|
||||||
|
|
||||||
* To report a bug, request a feature, or ask for assistance, please
|
- To report a bug, request a feature, or ask for assistance, please
|
||||||
[open an issue on the Github repository](https://github.com/enpaul/tox-poetry-installer/issues/new).
|
[open an issue on the Github repository](https://github.com/enpaul/tox-poetry-installer/issues/new).
|
||||||
* To report a security concern or code of conduct violation, please contact the project author
|
- To report a security concern or code of conduct violation, please contact the project
|
||||||
directly at **me [at] enp dot one**.
|
author directly at **me \[at\] enp dot one**.
|
||||||
* To submit an update, please
|
- To submit an update, please
|
||||||
[fork the repository](https://docs.github.com/en/enterprise/2.20/user/github/getting-started-with-github/fork-a-repo)
|
[fork the repository](https://docs.github.com/en/enterprise/2.20/user/github/getting-started-with-github/fork-a-repo)
|
||||||
and
|
and [open a pull request](https://github.com/enpaul/tox-poetry-installer/compare).
|
||||||
[open a pull request](https://github.com/enpaul/tox-poetry-installer/compare).
|
|
||||||
|
|
||||||
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
This project is under active development and is classified as beta software, ready for
|
This project is under active development and is classified as beta software, ready for
|
||||||
production environments on a provisional basis only.
|
production environments on a provisional basis only.
|
||||||
|
|
||||||
* Beta classification was assigned with [v0.6.0](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.0)
|
- Beta classification was assigned with
|
||||||
* Stable classification will be assigned when the test suite covers an acceptable number of
|
[v0.6.0](https://github.com/enpaul/tox-poetry-installer/releases/tag/0.6.0)
|
||||||
|
- Stable classification will be assigned when the test suite covers an acceptable number of
|
||||||
use cases
|
use cases
|
||||||
|
|
||||||
### Path to Beta
|
### Path to Beta
|
||||||
|
|
||||||
- [X] Verify that primary package dependencies (from the `.package` env) are installed
|
- [x] Verify that primary package dependencies (from the `.package` env) are installed
|
||||||
correctly using the Poetry backend.
|
correctly using the Poetry backend.
|
||||||
- [X] Support the [`extras`](https://tox.readthedocs.io/en/latest/config.html#conf-extras)
|
- [x] Support the [`extras`](https://tox.readthedocs.io/en/latest/config.html#conf-extras) Tox
|
||||||
Tox configuration option ([#4](https://github.com/enpaul/tox-poetry-installer/issues/4))
|
configuration option ([#4](https://github.com/enpaul/tox-poetry-installer/issues/4))
|
||||||
- [X] Add per-environment Tox configuration option to fall back to default installation
|
- [x] Add per-environment Tox configuration option to fall back to default installation
|
||||||
backend.
|
backend.
|
||||||
- [ ] ~Add warnings when an unsupported Tox configuration option is detected while using the
|
- [ ] ~Add warnings when an unsupported Tox configuration option is detected while using the
|
||||||
Poetry backend.~ ([#5](https://github.com/enpaul/tox-poetry-installer/issues/5))
|
Poetry backend.~ ([#5](https://github.com/enpaul/tox-poetry-installer/issues/5))
|
||||||
- [X] Add trivial tests to ensure the project metadata is consistent between the pyproject.toml
|
- [x] Add trivial tests to ensure the project metadata is consistent between the pyproject.toml
|
||||||
and the module constants.
|
and the module constants.
|
||||||
- [X] Update to use [poetry-core](https://github.com/python-poetry/poetry-core) and
|
- [x] Update to use [poetry-core](https://github.com/python-poetry/poetry-core) and improve
|
||||||
improve robustness of the Tox and Poetry module imports
|
robustness of the Tox and Poetry module imports to avoid potentially breaking API changes
|
||||||
to avoid potentially breaking API changes in upstream packages. ([#2](https://github.com/enpaul/tox-poetry-installer/issues/2))
|
in upstream packages. ([#2](https://github.com/enpaul/tox-poetry-installer/issues/2))
|
||||||
- [ ] ~Find and implement a way to mitigate the [UNSAFE_DEPENDENCIES issue](https://github.com/python-poetry/poetry/issues/1584) in Poetry.~
|
- [ ] ~Find and implement a way to mitigate the
|
||||||
([#6](https://github.com/enpaul/tox-poetry-installer/issues/6))
|
[UNSAFE_DEPENDENCIES issue](https://github.com/python-poetry/poetry/issues/1584) in
|
||||||
- [X] Fix logging to make proper use of Tox's logging reporter infrastructure ([#3](https://github.com/enpaul/tox-poetry-installer/issues/3))
|
Poetry.~ ([#6](https://github.com/enpaul/tox-poetry-installer/issues/6))
|
||||||
- [X] Add configuration option for installing all dev-dependencies to a testenv ([#14](https://github.com/enpaul/tox-poetry-installer/issues/14))
|
- [x] Fix logging to make proper use of Tox's logging reporter infrastructure ([#3](https://github.com/enpaul/tox-poetry-installer/issues/3))
|
||||||
|
- [x] Add configuration option for installing all dev-dependencies to a testenv ([#14](https://github.com/enpaul/tox-poetry-installer/issues/14))
|
||||||
|
|
||||||
### Path to Stable
|
### Path to Stable
|
||||||
|
|
||||||
@ -567,8 +566,6 @@ Everything in Beta plus...
|
|||||||
|
|
||||||
- [ ] Fully replace dependency on `poetry` with dependency on `poetry-core` ([#2](https://github.com/enpaul/tox-poetry-installer/issues/2))
|
- [ ] Fully replace dependency on `poetry` with dependency on `poetry-core` ([#2](https://github.com/enpaul/tox-poetry-installer/issues/2))
|
||||||
- [ ] Add comprehensive unit tests
|
- [ ] Add comprehensive unit tests
|
||||||
- [ ] Add tests for each feature version of Tox between 3.0 and 3.20
|
- [ ] Add tests for each feature version of Tox between 3.8 and 3.20
|
||||||
- [X] Add tests for Python-3.6, 3.7, 3.8, and 3.9
|
- [x] Add tests for Python-3.6, 3.7, 3.8, and 3.9
|
||||||
- [X] Add Github Actions based CI
|
- [x] Add Github Actions based CI
|
||||||
- [ ] Add CI for CPython, PyPy, and Conda
|
|
||||||
- [ ] Add CI for Linux and Windows
|
|
||||||
|
873
poetry.lock
generated
873
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -57,6 +57,8 @@ reorder-python-imports = "^2.3.5"
|
|||||||
safety = "^1.9.0"
|
safety = "^1.9.0"
|
||||||
toml = "^0.10.1"
|
toml = "^0.10.1"
|
||||||
tox = "^3.20.0"
|
tox = "^3.20.0"
|
||||||
|
mdformat = "^0.6.4"
|
||||||
|
mdformat-gfm = "^0.2"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core>=1.0.0"]
|
requires = ["poetry-core>=1.0.0"]
|
||||||
|
10
tox.ini
10
tox.ini
@ -22,13 +22,15 @@ platform = linux
|
|||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
require_locked_deps = true
|
require_locked_deps = true
|
||||||
locked_deps =
|
locked_deps =
|
||||||
pre-commit
|
|
||||||
pre-commit-hooks
|
|
||||||
black
|
black
|
||||||
blacken-docs
|
blacken-docs
|
||||||
reorder-python-imports
|
mdformat
|
||||||
pylint
|
mdformat-gfm
|
||||||
mypy
|
mypy
|
||||||
|
reorder-python-imports
|
||||||
|
pre-commit
|
||||||
|
pre-commit-hooks
|
||||||
|
pylint
|
||||||
commands =
|
commands =
|
||||||
pre-commit run --all-files
|
pre-commit run --all-files
|
||||||
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tox_poetry_installer/
|
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tox_poetry_installer/
|
||||||
|
Loading…
Reference in New Issue
Block a user