diff --git a/.gitignore b/.gitignore index e6d51b5..501ca52 100644 --- a/.gitignore +++ b/.gitignore @@ -189,3 +189,4 @@ dmypy.json # End of https://www.gitignore.io/api/python +condaenv diff --git a/README.md b/README.md index 87212a1..fdb73f9 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,9 @@ 1. Install Anaconda for Python 3 2. In the Anaconda terminal (Windows) or Unix-like terminal (other OS): - - Navigate to ./Code/ - - run "pip install -r requirements.txt" + - Navigate to the root of this repository + - run `conda env update -f binder/environment.yml` + - run `conda activate ./condaenv` 3. Run Spyder, and open ./do_min, ./do_mid.py, ./do_all.py, or ./do_custom.py 4. Run the code by clicking the green arrow button. diff --git a/reproduce.sh b/reproduce.sh index f135671..74a4729 100644 --- a/reproduce.sh +++ b/reproduce.sh @@ -1,6 +1,15 @@ #!/bin/bash # DistributionOfWealth reproduce -python -m pip install -r Code/requirements.txt +if ! command -v conda &> /dev/null +then + echo "`conda` (anaconda) needs to be installed to reproduce!" + exit +fi + +conda env update -f binder/environment.yml --prefix ./condaenv/ + +conda_root=$(conda info -s | grep CONDA_ROOT | sed 's/CONDA_ROOT\: //') +source $conda_root/bin/activate ./condaenv ipython do_min.py