From 22967b8a5930f836b6504d260d17720b1e4571bf Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Mon, 11 Jul 2022 13:32:32 -0500 Subject: [PATCH 1/2] MNT: Add symbolic link to environment.yml To make it easier for users who are not used to binder but maybe used to typical Conda workflows, add a symbolic link from binder/environment.yml to environment.yml in the top level of the repository. This partially reverts parts of PR 85. --- environment.yml | 1 + 1 file changed, 1 insertion(+) create mode 120000 environment.yml diff --git a/environment.yml b/environment.yml new file mode 120000 index 0000000..5862f44 --- /dev/null +++ b/environment.yml @@ -0,0 +1 @@ +binder/environment.yml \ No newline at end of file From 3a45f9a8f0594d33393e92ea168bcb76547da30e Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Mon, 11 Jul 2022 13:37:42 -0500 Subject: [PATCH 2/2] MNT: Redirect all uses of 'environment.yml' to symbolic link To ensure that everything is uniform across the repository, use the symobolic link to the 'binder/environment.yml' that is in the top level of the repository. --- .azure-pipelines/linux.yml | 2 +- .azure-pipelines/macos.yml | 2 +- .azure-pipelines/templates/setup-script-nix.yml | 2 +- .azure-pipelines/templates/setup-script-win.yml | 2 +- .devcontainer/Dockerfile | 2 +- .travis.yml | 2 +- Dockerfile | 2 +- README.md | 6 +++--- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.azure-pipelines/linux.yml b/.azure-pipelines/linux.yml index a15ff44..0dcf398 100644 --- a/.azure-pipelines/linux.yml +++ b/.azure-pipelines/linux.yml @@ -19,7 +19,7 @@ steps: - script: | # Install Python, py.test, and required packages. - conda env create -f binder/environment.yml + conda env create -f environment.yml source activate bayesian-modelling-tutorial conda install -y python=$(python.version) python -m ipykernel install --user --name bayesian-modelling-tutorial diff --git a/.azure-pipelines/macos.yml b/.azure-pipelines/macos.yml index 271c316..943126e 100644 --- a/.azure-pipelines/macos.yml +++ b/.azure-pipelines/macos.yml @@ -15,7 +15,7 @@ steps: # - script: | # # Install Python, py.test, and required packages. -# conda env create -f binder/environment.yml +# conda env create -f environment.yml # source activate bayesian-modelling-tutorial # conda install -y python=$(python.version) # python -m ipykernel install --user --name bayesian-modelling-tutorial diff --git a/.azure-pipelines/templates/setup-script-nix.yml b/.azure-pipelines/templates/setup-script-nix.yml index 94631cc..1df7b9c 100644 --- a/.azure-pipelines/templates/setup-script-nix.yml +++ b/.azure-pipelines/templates/setup-script-nix.yml @@ -1,6 +1,6 @@ steps: - script: | - conda env create -f binder/environment.yml + conda env create -f environment.yml source activate bayesian-modelling-tutorial conda install -y python=$(python.version) python -m ipykernel install --user --name bayesian-modelling-tutorial diff --git a/.azure-pipelines/templates/setup-script-win.yml b/.azure-pipelines/templates/setup-script-win.yml index 87b7047..dc17e3d 100644 --- a/.azure-pipelines/templates/setup-script-win.yml +++ b/.azure-pipelines/templates/setup-script-win.yml @@ -1,6 +1,6 @@ steps: - script: | - conda env create -f binder/environment.yml + conda env create -f environment.yml activate bayesian-modelling-tutorial conda install -y python=$(python.version) python -m ipykernel install --user --name bayesian-modelling-tutorial diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 13806a8..c15a99e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -18,7 +18,7 @@ ARG USER_GID=$USER_UID # Copy environment.yml (if found) to a temp locaition so we update the environment. Also # copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists. -COPY binder/environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/ +COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/ # Configure apt and install packages RUN apt-get update \ diff --git a/.travis.yml b/.travis.yml index 0708972..530e09b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ install: - conda info -a # Install Python, py.test, and required packages. - - conda env create -f binder/environment.yml + - conda env create -f environment.yml - source activate bayesian-modelling-tutorial # This guarantees that the Python version is matrixed. - conda install python=$PYTHON_VERSION diff --git a/Dockerfile b/Dockerfile index 903c049..87d5cd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM continuumio/miniconda3 RUN apt-get install build-essential -y # Install environment -COPY ./binder/environment.yml /environment.yml +COPY ./environment.yml /environment.yml RUN conda env create -f /environment.yml RUN rm /environment.yml diff --git a/README.md b/README.md index 7382a92..800d4a8 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ to **install all the necessary packages** from the provided `environment.yml` file. ```bash -conda env create -f binder/environment.yml +conda env create -f environment.yml ``` To **activate the environment**, use the `conda activate` command. @@ -72,7 +72,7 @@ source activate bayesian-modelling-tutorial To **update the environment** based on the `environment.yml` specification file, use the `conda update` command. ```bash -conda env update -f binder/environment.yml +conda env update -f environment.yml ``` ### 3b. `pip` users @@ -93,7 +93,7 @@ If you don't want to mess around with dev-ops, click the following badge to get ### 4a. Open your Jupyter notebook -1. You will have to install a new IPython kernelspec if you created a new conda environment with `binder/environment.yml`. +1. You will have to install a new IPython kernelspec if you created a new conda environment with `environment.yml`. python -m ipykernel install --user --name bayesian-modelling-tutorial --display-name "Python (bayesian-modelling-tutorial)"