conda-hooks-0.5.0
توضیحات
Keep anaconda environment files up to date
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | conda-hooks-0.5.0 |
| نام | conda-hooks |
| نسخه کتابخانه | 0.5.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Fabian Köhler |
| ایمیل نویسنده | fabian.koehler@protonmail.ch |
| آدرس صفحه اصلی | https://github.com/f-koehler/conda-hooks |
| آدرس اینترنتی | https://pypi.org/project/conda-hooks/ |
| مجوز | MIT |
# conda-hooks
Keep anaconda environment files up to date with installed packages.
In contrast to `conda export` it keeps the channel list intact, sorts packages alphabetically and does not purge `pip` dependencies.
`conda-hooks` can be integrated easily with [pre-commit](https://pre-commit.com/) hooks to automatically check for any missing packages before committing.
[](https://github.com/f-koehler/conda-hooks/actions)
[](https://codecov.io/gh/f-koehler/conda-hooks)
[](https://results.pre-commit.ci/latest/github/f-koehler/conda-hooks/main)
[](https://pypi.org/project/conda-hooks/)

## Installation
### As a Python package
The `conda_hooks` package is installable as a normal python package, for example via pip:
```bash
pip install conda_hooks
```
### As a `pre-commit` hook
In your `.pre-commit-config.yaml` file add
```yaml
repos:
- repo: https://github.com/f-koehler/conda-hooks
rev: "0.4.2"
hooks:
- id: conda-env-store
```
## Usage
### Command line
Running `env_store --help` will print information about the available command line options.
We can either specify paths to environment file explicitly
```bash
conda_env_store environment1.yml env2.yaml src/env3.yml
```
or use globbing patterns like this:
```bash
conda_env_store -g **/environment.yml -g **/env.yml
```
Of course we can combine both methods:
```bash
conda_env_store -g src/env*.yml environment.yml
```
### As a `pre-commit` hook
When using the `pre-commit` hook we can use the same command line arguments, so please refer to the section above.
An example using globbing patterns would be:
```yaml
repos:
- repo: https://github.com/f-koehler/conda-hooks
rev: "0.4.1"
hooks:
- id: prettier
args: ["-g", "**/environment.yml"]
```
نیازمندی
| مقدار | نام |
|---|---|
| >=5.3.1,<7.0.0 | PyYAML |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl conda-hooks-0.5.0:
pip install conda-hooks-0.5.0.whl
نصب پکیج tar.gz conda-hooks-0.5.0:
pip install conda-hooks-0.5.0.tar.gz