-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change workflows to mamba, take 2 #438
Changes from all commits
4ecdd79
e7a0e12
c85de97
c0cab2e
15ea86a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,11 +64,13 @@ jobs: | |
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: zppy_dev | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
use-mamba: true | ||
mamba-version: "*" | ||
environment-file: conda/dev.yml | ||
channel-priority: strict | ||
auto-update-conda: true | ||
# IMPORTANT: This needs to be set for caching to work properly! | ||
use-only-tar-bz2: true | ||
|
||
- if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true' }} | ||
name: Show Conda Environment Info | ||
|
@@ -98,27 +100,37 @@ jobs: | |
persist-credentials: false | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
- name: Cache Conda | ||
uses: actions/cache@v3 | ||
env: | ||
CACHE_NUMBER: 0 | ||
with: | ||
python-version: 3.9 | ||
path: ~/conda_pkgs_dir | ||
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ | ||
hashFiles('conda/dev.yml') }} | ||
|
||
- name: Cache pip | ||
uses: actions/cache@v3 | ||
- name: Build Conda Environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
# This path is specific to Ubuntu | ||
path: ~/.cache/pip | ||
# Look to see if there is a cache hit for the corresponding requirements file | ||
key: ${{ runner.os }}-pip-publish-docs | ||
restore-keys: | | ||
${{ 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 | ||
Comment on lines
-117
to
-118
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be much better with |
||
activate-environment: zppy_dev | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
use-mamba: true | ||
mamba-version: "*" | ||
environment-file: conda/dev.yml | ||
channel-priority: strict | ||
auto-update-conda: true | ||
|
||
- if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true' }} | ||
name: Show Conda Environment Info | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install sphinx==5.2.3 sphinx_rtd_theme==1.0.0 sphinx-multiversion==0.2.4 docutils==0.16 | ||
conda config --set anaconda_upload no | ||
conda info | ||
conda list | ||
|
||
- name: Install `zppy` Package | ||
run: pip install . | ||
|
||
- name: Build Sphinx Docs | ||
run: | | ||
cd docs | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,9 @@ dependencies: | |
# If versions are updated, also update in `.github/workflows/build_workflow.yml` | ||
# ================= | ||
- sphinx=5.2.3 | ||
- sphinx-multiversion=0.2.4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this matters but using single rather than double |
||
- sphinx_rtd_theme=1.0.0 | ||
# 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/zppy_dev |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,6 @@ def package_files(directory, prefixes, extensions): | |
author_email="[email protected], [email protected]", | ||
description="Post-processing software for E3SM", | ||
python_requires=">=3.6", | ||
intall_requires=["configobj>=5.0.0,<6.0.0", "jinja2>=2.0.0"], | ||
packages=find_packages(include=["zppy", "zppy.*"]), | ||
package_data={"": data_files}, | ||
entry_points={"console_scripts": ["zppy=zppy.__main__:main"]}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is necessary any longer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I think it causes problems because most newer releases are as
.conda
files.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may explain why
sphinx-multiversion
couldn't be installed.