Skip to content

Commit

Permalink
Change workflow to mamba
Browse files Browse the repository at this point in the history
  • Loading branch information
forsyth2 committed Jun 15, 2023
1 parent db9e179 commit c0aadc7
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Install Dependencies
run: |
pip install sphinx==5.2.3 sphinx_rtd_theme==1.0.0 sphinx-multiversion==0.2.4 docutils==0.16 "jinja2<3.1"
mamba install -y sphinx==5.2.3 sphinx_rtd_theme==1.0.0 sphinx-multiversion==0.2.4 docutils==0.16 "jinja2<3.1"
- name: Build Sphinx Docs
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ jobs:
${{ runner.os }}-pip-
${{ runner.os }}-
# Using pip for Sphinx dependencies because it takes too long to reproduce a conda environment (~10 secs vs. 3-4 mins)
- name: Install Dependencies
run: |
pip install sphinx==5.2.3 sphinx_rtd_theme==1.0.0 sphinx-multiversion==0.2.4 docutils==0.16 "jinja2<3.1"
mamba install -y sphinx==5.2.3 sphinx_rtd_theme==1.0.0 sphinx-multiversion==0.2.4 docutils==0.16 "jinja2<3.1"
- name: Build Sphinx Docs
run: |
Expand Down
3 changes: 1 addition & 2 deletions conda/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ dependencies:
- jinja2<3.1
- sphinx=5.2.3
- sphinx_rtd_theme=1.0.0
- sphinx-multiversion==0.2.4
# Need to pin docutils because 0.17 has a bug with unordered lists
# https://github.com/readthedocs/sphinx_rtd_theme/issues/1115
- docutils=0.16
- pip:
- sphinx-multiversion==0.2.4
prefix: /opt/miniconda3/envs/zstash_dev
59 changes: 37 additions & 22 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,32 +81,38 @@ Others/Local

If the system doesn't come with conda pre-installed, follow these instructions:

1. Download Conda
1. Download Mambaforge

Linux
::

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh

MacOS (note that ``zstash`` is not supported on MacOS, but it may be useful to contribute to the documentation on MacOS)
MacOS x86_64 (note that ``zstash`` is not supported on MacOS, but it may be useful to contribute to the documentation on MacOS)
::

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-x86_64.sh

2. Install Conda
2. Install Mambaforge

Linux
::

bash ./Miniconda3-latest-Linux-x86_64.sh
bash ./Mambaforge-Linux-x86_64.sh


MacOS
MacOS x86_64
::

bash ./Miniconda3-latest-MacOSX-x86_64.sh
bash ./Mambaforge-MacOSX-x86_64.sh

- ``Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no] yes``
When you see: ::

by running conda init? [yes|no]
[no] >>> yes

respond with ``yes`` so ``conda`` and ``mamba`` commands are available on
initializing a new bash terminal.

3. If you are working on a machine/network that intercepts SSL communications (such as
acme1), you will get an SSL error unless you disable the SSL verification:
Expand All @@ -116,31 +122,40 @@ acme1), you will get an SSL error unless you disable the SSL verification:
conda config --set ssl_verify false
binstar config --set ssl_verify False

4. Once conda is properly working, you can install the **(a) Latest Stable Release** or
4. Once conda and mamba are properly working, you can install the **(a) Latest Stable Release** or
create a **(b) Development Environment**.

(a) Latest Stable Release
=========================

Installation using conda
Installation using mamba
------------------------

First, make sure that you're using ``bash``. ::

$ bash
bash

You must have Anaconda installed as well.
You must have a conda base enviornment installed as well.
See :ref:`"Installation in a Conda Environment" <conda_environment>` section above for
installing conda.
Create a new Anaconda environment with zstash installed and activate it: ::

$ conda create -n zstash_env -c e3sm -c conda-forge zstash
$ source activate zstash_env
These steps should not be necessary if you installed Mambaforge as suggested
above but may be needed if you have previously installed Miniconda3 instead: ::

conda install -y -n base mamba
conda config --add channels conda-forge
conda config --set channel_priority strict

Create a new conda environment with ``zstash`` installed and activate it: ::

Or you can install zstash in an existing environment. ::
mamba create -n zstash_env zstash
conda activate zstash_env

$ conda install zstash -c e3sm -c conda-forge
Or (less recommended because of potential conflicts) you can install ``zstash``
in an existing environment. ::

mamba install zppy

Installation on NERSC
---------------------
Expand All @@ -154,10 +169,10 @@ not directly available there, so you will need to manually activate Anaconda bef
Updating
--------

If you **installed via Anaconda** (e.g., not through the unified environment),
you can update ``zstash`` by doing the following: ::
If you **installed into your own conda environment** (e.g., not through the
unified environment), you can update ``zstash`` by doing the following: ::

conda update zstash -c e3sm -c conda-forge
mamba update zstash

.. _dev-env:

Expand Down Expand Up @@ -224,7 +239,7 @@ Furthermore, the dev environment includes quality assurance (QA) tools such as c

::

conda clean --all
mamba clean --all

4. Enter the fork's clone.

Expand All @@ -239,7 +254,7 @@ Furthermore, the dev environment includes quality assurance (QA) tools such as c

::

conda env create -f conda/dev.yml
mamba env create -f conda/dev.yml
conda activate zstash_dev

6. Install ``pre-commit``.
Expand Down
5 changes: 0 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,5 @@
description="Long term HPSS archiving software for E3SM",
packages=find_packages(include=["zstash", "zstash.*"]),
python_requires=">=3.6",
install_requires=[
"fair-research-login>=0.2.6,<0.3.0",
"globus-sdk>=3.0.0,<4.0.0",
"six",
],
entry_points={"console_scripts": ["zstash=zstash.main:main"]},
)

0 comments on commit c0aadc7

Please sign in to comment.