/conda-project

Tool for encapsulating, running, and reproducing projects with Conda environments

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Conda Project

codecov pre-commit.ci status

Tool for encapsulating, running, and reproducing projects with Conda environments

This package is intended as a successor to Anaconda Project. Please continue to use Anaconda Project until it has been delcared deprecated and Conda Project has stabilized.

Setup for development

To setup conda-project for development, first install Miniconda, then

  1. Clone this repository.
  2. Create a development environment using the environment.yml file in this repository
    conda env create -p ./env
    
  3. Install conda-project as editable in the env by activating the environment first
    conda activate ./env
    pip install -e .
    

Tests

To run tests you can either activate the env and run pytest

conda activate ./env
pytest

or use conda run

conda run --no-capture-output -p ./env pytest

Linting

This project uses pre-commit to aid with linting. Pre-Commit is configured to run

This repository is configured with Pre-Commit.ci, which will automatically fix Pull Requests to comply with the above linters.

The pre-commit Conda package is included in the development environment.yml file. To install the hooks in your local clone run

conda run --no-capture-output -p ./env pre-commit install

Once configured the pre-commit hooks are run automatically, but you can run them manually with

conda run --no-capture-output -p ./env pre-commit run --all-files