https://github.com/pytask-dev/pytask-environment
Detect changes in your pytask environment and abort a project build.
https://github.com/pytask-dev/pytask-environment
pytask
Last synced: 11 months ago
JSON representation
Detect changes in your pytask environment and abort a project build.
- Host: GitHub
- URL: https://github.com/pytask-dev/pytask-environment
- Owner: pytask-dev
- License: mit
- Created: 2020-09-20T20:58:30.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-11-18T19:43:52.000Z (over 1 year ago)
- Last Synced: 2024-11-18T20:44:28.855Z (over 1 year ago)
- Topics: pytask
- Language: Python
- Homepage:
- Size: 103 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# pytask-environment
[](https://pypi.org/project/pytask-environment)
[](https://pypi.org/project/pytask-environment)
[](https://anaconda.org/conda-forge/pytask-environment)
[](https://anaconda.org/conda-forge/pytask-environment)
[](https://pypi.org/project/pytask-environment)
[](https://github.com/pytask-dev/pytask-environment/actions?query=branch%3Amain)
[](https://codecov.io/gh/pytask-dev/pytask-environment)
[](https://results.pre-commit.ci/latest/github/pytask-dev/pytask-environment/main)
[](https://github.com/psf/black)
______________________________________________________________________
pytask-environment allows you to detect changes in your pytask environment and abort a
project build.
## Installation
pytask-environment is available on [PyPI](https://pypi.org/project/pytask-environment)
and [Anaconda.org](https://anaconda.org/conda-forge/pytask-environment). Install it with
```console
$ pip install pytask-environment
# or
$ conda install -c conda-forge pytask-environment
```
## Usage
If the user attempts to build the project with `pytask build` and the Python version has
been cached in the database in a previous run, an invocation with a different
environment will produce the following command line output.

Running
```console
$ pytask --update-environment
```
will update the information on the environment.
To disable either checking the path or the version, set the following configuration to a
falsy value.
```toml
[tool.pytask.ini_options]
check_python_version = false # true by default
check_environment = false # true by default
```
## Future development
The plugin might be further extended to compare the current environment against an
`environment.yml` or a list of packages and versions to ensure that the environment is
not altered.
## Changes
Consult the [release notes](CHANGES.md) to find out about what is new.