DEV Community

epassaro
epassaro

Posted on • Updated on

Reproducible Anaconda environments with GitHub Actions

My Workflow

Reproducibility is a major principle underpinning the scientific method, and scientific software is not an exception.

Anaconda is a distribution of the Python and R programming languages for scientific computing with more than 25 million users. But, how reproducible is science made with Anaconda? And most important:

Do you think you will be capable of reproducing the results your research in the next 10 years?.

Currently, the reproducibility of Anaconda environments is not guaranteed. conda list --explicit provides just some kind of short term reproducibility.

For example, if you use packages from non-standard channels, the owner could delete them at any moment. Also, the resolved URLs could vary due to changes in package labels or storage.

There is an ongoing debate about how to unify the different available tools to solve this problem.

In this workflow, I propose a simple but effective way to keep your environments reproducible using GitHub Actions and conda-pack:

Every time you publish a new release of your code (e.g. a paper) on GitHub, the environment is solved, packed and uploaded as an asset.

Submission Category:

DIY Deployments

Yaml File or Link to Code

GitHub logo epassaro / repro-conda-envs

An example repository on how to keep Anaconda environments reproducible in the long term with GitHub Actions

repro-conda-envs

An example repository on how to keep Anaconda environments reproducible in the long term with GitHub Actions




Additional Resources / Info

Top comments (0)