Skip to main content

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

Project description

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.

Why?

Sharing your work is more than sharing your code in a script file or notebook. To make your work properly reproducible, it is necessary to include the list of required third-party dependencies, specifications for how to run your code, and any other files that it may need.

See 8 Levels of Reproduciblity for an in-depth discussion of the differences between "It works for me." to "I've made sure that anyone can reliably execute my work." Conda Project is a framework that aims to help you to ensure a high degree of reproducibility in the projects you create.

Installation

You can install conda-project using the conda package manager:

conda install -c conda-forge conda-project

Quick start

Let's start a new project using Python, Pandas, and Jupyter Notebooks. The commands below will work on terminals in Mac, Linux, and Windows. For Windows you can use either cmd.exe or Powershell.

We first create a directory and initialize a new project, which will create a new conda environment and lock the dependencies:

(base) > conda project init --directory my-project python=3.9 notebook pandas
Locking dependencies for environment default on platforms osx-64, osx-arm64, linux-64, win-64: done
Project created at /Users/adefusco/Development/conda-incubator/conda-project/examples/my-project

The goal of Conda Project is to maintain a conda enviroment specifically for the new my-project directory. You'll see that this directory contains it's own environment.yml file a Conda Lock file and a conda-project.yml file. You can learn more about these files in the User Guide

(base) > tree ./
├── conda-project.yml
├── default.conda-lock.yml
├── environment.yml

You can activate the environment, which will install packages locally to this project according to the lock file. Notice that after running conda project activate the shell prompt switches to (default), which is the name of the local environment for this project.

(base) > cd my-project
(base) > conda project activate

Downloading and Extracting Packages


Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
environment created at /Users/adefusco/Development/conda-incubator/conda-project/examples/my-project/envs/default
## Project environment default activated in a new shell.
## Exit this shell to de-activate.

And in the activated environment you can launch editors or run commands. For example, since we included the notebook package we can launch Jupyter Notebook from the activated environment:

(default) > jupyter notebook
[I 12:23:03.632 NotebookApp] Serving notebooks from local directory: /Users/adefusco/Development/conda-incubator/conda-project/examples/my-project
[I 12:23:03.632 NotebookApp] Jupyter Notebook 6.5.2 is running at:
[I 12:23:03.632 NotebookApp] http://localhost:8888/?token=1208a3441039526c03b44c233f07436321ad4fd3cced443d
[I 12:23:03.632 NotebookApp]  or http://127.0.0.1:8888/?token=1208a3441039526c03b44c233f07436321ad4fd3cced443d
[I 12:23:03.632 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:23:03.635 NotebookApp]

Continue reading the User Guide to learn more.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conda-project-0.1.0.tar.gz (62.8 kB view details)

Uploaded Source

File details

Details for the file conda-project-0.1.0.tar.gz.

File metadata

  • Download URL: conda-project-0.1.0.tar.gz
  • Upload date:
  • Size: 62.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.9.13

File hashes

Hashes for conda-project-0.1.0.tar.gz
Algorithm Hash digest
SHA256 668452197e279f6e9c958fd96f21f88ddba263cc4c10c80036a0643379751d18
MD5 5bfed3ff5b828079d2e9b1c849f7ad90
BLAKE2b-256 cb17485d8cabd76e9c5199583fd3236c0bd9ef4e904f1ff2e18b655ea8ac4308

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page