Skip to content

Commit

Permalink
adding direnv support
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Nov 24, 2018
1 parent 1ce913f commit aa6ff66
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
layout_anaconda() {
local ANACONDA_HOME="${HOME}/miniconda3/"
PATH_add "$ANACONDA_HOME"/bin

if [ -n "$1" ]; then
# Explicit environment name from layout command.
local env_name="$1"
source activate ${env_name}
elif (grep -q name: environment.yml); then
# Detect environment name from `environment.yml` file in `.envrc` directory
source activate `grep name: environment.yml | sed -e 's/name: //' | cut -d "'" -f 2 | cut -d '"' -f 2`
else
(>&2 echo No environment specified);
exit 1;
fi;
}

layout anaconda
3 changes: 2 additions & 1 deletion docs/user/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Installation
============

*exoplanet* doesn't have a compiled component.
*exoplanet* doesn't have a compiled components so it can be easily installed
using.

Dependencies
------------
Expand Down
18 changes: 18 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: exoplanet
channels:
- defaults
- conda-forge
prefix: /Users/dforeman/anaconda/envs/exoplanet
dependencies:
- python=3.7
- numpy
- pandas
- matplotlib
- jupyter
- jupyterlab
- pymc3
- astropy
- starry
- pip:
- batman-package
- neovim

0 comments on commit aa6ff66

Please sign in to comment.