Skip to content

Commit

Permalink
Merge pull request #14 from camriddell/master
Browse files Browse the repository at this point in the history
Reproduce via conda
  • Loading branch information
alanlujan91 authored Apr 5, 2023
2 parents d8ad983 + efbe930 commit 34a769a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,4 @@ dmypy.json

# End of https://www.gitignore.io/api/python

condaenv
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
11 changes: 10 additions & 1 deletion reproduce.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 34a769a

Please sign in to comment.