hatch-conda


Namehatch-conda JSON
Version 0.5.1 PyPI version JSON
download
home_page
SummaryHatch plugin for conda environments
upload_time2024-02-01 18:39:41
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords conda environment hatch plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # hatch-conda

| | |
| --- | --- |
| CI/CD | [![CI - Test](https://github.com/OldGrumpyViking/hatch-conda/actions/workflows/test.yml/badge.svg)](https://github.com/OldGrumpyViking/hatch-conda/actions/workflows/test.yml) [![CD - Build](https://github.com/OldGrumpyViking/hatch-conda/actions/workflows/build.yml/badge.svg)](https://github.com/OldGrumpyViking/hatch-conda/actions/workflows/build.yml) |
| Package | [![PyPI - Version](https://img.shields.io/pypi/v/hatch-conda.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/hatch-conda/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-conda.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/hatch-conda/) |
| Meta | [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/ambv/black) [![imports - isort](https://img.shields.io/badge/imports-isort-ef8336.svg)](https://github.com/pycqa/isort) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) |

-----

This provides a plugin for [Hatch](https://github.com/pypa/hatch) that allows the use of conda [environments](https://hatch.pypa.io/latest/environment/).

This project is a copied and modified version of the [hatch-containers](https://github.com/ofek/hatch-containers) plugin by Ofek Lev.

**Table of Contents**

- [Installation](#installation)
- [Configuration](#configuration)
  - [Python](#python)
  - [Command](#command)
  - [Conda-forge](#conda-forge)
  - [Environment file](#environment-file)
- [Notes](#notes)
- [License](#license)

## Installation

```console
pip install hatch-conda
```

## Configuration

The [environment plugin](https://hatch.pypa.io/latest/plugins/environment/) name is `conda`.

- ***pyproject.toml***

    ```toml
    [tool.hatch.envs.<ENV_NAME>]
    type = "conda"
    ```

- ***hatch.toml***

    ```toml
    [envs.<ENV_NAME>]
    type = "conda"
    ```

### Python

If the [Python version](https://hatch.pypa.io/latest/config/environment/#python-version) is set to a multi-character integer like `310` then it will be interpreted as its `<MAJOR>.<MINOR>` form e.g. `3.10`.

If not set, then the `<MAJOR>.<MINOR>` version of the first `python` found along your `PATH` will be used, defaulting to the Python executable Hatch is running on.

### Command

The `command` option specifies the command that will be used to setup the environment. The possible options are `conda`, `mamba` and `micromamba`.

Default:

```toml
[envs.<ENV_NAME>]
command = "conda"
```

### Conda-forge

Indicates if the conda-forge index should be used.

Default:

```toml
[envs.<ENV_NAME>]
conda-forge = true
```

### Environment file
By default packages will be installed using pip. However, to install packages using conda, conda-forge, or any other channel, you can specify a conda environment file:

```toml
[envs.<ENV_NAME>]
environment-file = "environment.yml"
```

When using an environment file, the channel and python version specified in the environment file will be used. After installing the environment, any extra packages specified in the dependencies will be installed, as well as the local package.

### Prefix environments

It's possible to identify environment py prefix (the path in the filesytem) rather than by name.

```toml
[envs.<ENV_NAME>]
prefix = .venv/
```

Will create a conda environment in the `.venv/` folder. This is useful because a text editor might check for this location to use the virtual environment.

## Notes

- There must be a `conda`, `mamba`, or `micromamba` executable along your `PATH`.
- The `env-exclude` [environment variable filter](https://hatch.pypa.io/latest/config/environment/#filters) has no effect.

## License

`hatch-conda` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "hatch-conda",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "conda,environment,hatch,plugin",
    "author": "",
    "author_email": "OldGrumpyViking <old.grumpy.viking@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/dc/1e/950ae3c71a55d83dbdcff996299a52df7c763c96be78c90854c3fba4b0ae/hatch_conda-0.5.1.tar.gz",
    "platform": null,
    "description": "# hatch-conda\n\n| | |\n| --- | --- |\n| CI/CD | [![CI - Test](https://github.com/OldGrumpyViking/hatch-conda/actions/workflows/test.yml/badge.svg)](https://github.com/OldGrumpyViking/hatch-conda/actions/workflows/test.yml) [![CD - Build](https://github.com/OldGrumpyViking/hatch-conda/actions/workflows/build.yml/badge.svg)](https://github.com/OldGrumpyViking/hatch-conda/actions/workflows/build.yml) |\n| Package | [![PyPI - Version](https://img.shields.io/pypi/v/hatch-conda.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/hatch-conda/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-conda.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/hatch-conda/) |\n| Meta | [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/ambv/black) [![imports - isort](https://img.shields.io/badge/imports-isort-ef8336.svg)](https://github.com/pycqa/isort) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) |\n\n-----\n\nThis provides a plugin for [Hatch](https://github.com/pypa/hatch) that allows the use of conda [environments](https://hatch.pypa.io/latest/environment/).\n\nThis project is a copied and modified version of the [hatch-containers](https://github.com/ofek/hatch-containers) plugin by Ofek Lev.\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n  - [Python](#python)\n  - [Command](#command)\n  - [Conda-forge](#conda-forge)\n  - [Environment file](#environment-file)\n- [Notes](#notes)\n- [License](#license)\n\n## Installation\n\n```console\npip install hatch-conda\n```\n\n## Configuration\n\nThe [environment plugin](https://hatch.pypa.io/latest/plugins/environment/) name is `conda`.\n\n- ***pyproject.toml***\n\n    ```toml\n    [tool.hatch.envs.<ENV_NAME>]\n    type = \"conda\"\n    ```\n\n- ***hatch.toml***\n\n    ```toml\n    [envs.<ENV_NAME>]\n    type = \"conda\"\n    ```\n\n### Python\n\nIf the [Python version](https://hatch.pypa.io/latest/config/environment/#python-version) is set to a multi-character integer like `310` then it will be interpreted as its `<MAJOR>.<MINOR>` form e.g. `3.10`.\n\nIf not set, then the `<MAJOR>.<MINOR>` version of the first `python` found along your `PATH` will be used, defaulting to the Python executable Hatch is running on.\n\n### Command\n\nThe `command` option specifies the command that will be used to setup the environment. The possible options are `conda`, `mamba` and `micromamba`.\n\nDefault:\n\n```toml\n[envs.<ENV_NAME>]\ncommand = \"conda\"\n```\n\n### Conda-forge\n\nIndicates if the conda-forge index should be used.\n\nDefault:\n\n```toml\n[envs.<ENV_NAME>]\nconda-forge = true\n```\n\n### Environment file\nBy default packages will be installed using pip. However, to install packages using conda, conda-forge, or any other channel, you can specify a conda environment file:\n\n```toml\n[envs.<ENV_NAME>]\nenvironment-file = \"environment.yml\"\n```\n\nWhen using an environment file, the channel and python version specified in the environment file will be used. After installing the environment, any extra packages specified in the dependencies will be installed, as well as the local package.\n\n### Prefix environments\n\nIt's possible to identify environment py prefix (the path in the filesytem) rather than by name.\n\n```toml\n[envs.<ENV_NAME>]\nprefix = .venv/\n```\n\nWill create a conda environment in the `.venv/` folder. This is useful because a text editor might check for this location to use the virtual environment.\n\n## Notes\n\n- There must be a `conda`, `mamba`, or `micromamba` executable along your `PATH`.\n- The `env-exclude` [environment variable filter](https://hatch.pypa.io/latest/config/environment/#filters) has no effect.\n\n## License\n\n`hatch-conda` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Hatch plugin for conda environments",
    "version": "0.5.1",
    "project_urls": {
        "History": "https://github.com/OldGrumpyViking/hatch-conda/blob/master/HISTORY.md",
        "Issues": "https://github.com/OldGrumpyViking/hatch-conda/issues",
        "Source": "https://github.com/OldGrumpyViking/hatch-conda"
    },
    "split_keywords": [
        "conda",
        "environment",
        "hatch",
        "plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dfc7d446fbf7fdf27d900b282955b8ee772ebb370f66701a4f49301ff2820a7b",
                "md5": "0a02b9e2fe8105dc7736e974992c1a68",
                "sha256": "43b226014bd8bd80f67d469508bd7deef634bd315db6de031a3a947e12b46ffe"
            },
            "downloads": -1,
            "filename": "hatch_conda-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0a02b9e2fe8105dc7736e974992c1a68",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6807,
            "upload_time": "2024-02-01T18:39:38",
            "upload_time_iso_8601": "2024-02-01T18:39:38.541948Z",
            "url": "https://files.pythonhosted.org/packages/df/c7/d446fbf7fdf27d900b282955b8ee772ebb370f66701a4f49301ff2820a7b/hatch_conda-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dc1e950ae3c71a55d83dbdcff996299a52df7c763c96be78c90854c3fba4b0ae",
                "md5": "701b795f824ca91cd3a4edf9db1eb9ec",
                "sha256": "874a92a4e761b4fd47e08ccec8750517393500683a4a0c35bcdaba71dcfc55d9"
            },
            "downloads": -1,
            "filename": "hatch_conda-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "701b795f824ca91cd3a4edf9db1eb9ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 9298,
            "upload_time": "2024-02-01T18:39:41",
            "upload_time_iso_8601": "2024-02-01T18:39:41.597522Z",
            "url": "https://files.pythonhosted.org/packages/dc/1e/950ae3c71a55d83dbdcff996299a52df7c763c96be78c90854c3fba4b0ae/hatch_conda-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-01 18:39:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OldGrumpyViking",
    "github_project": "hatch-conda",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hatch-conda"
}
        
Elapsed time: 0.18629s