-
Notifications
You must be signed in to change notification settings - Fork 11
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 workflow to mamba #271
Conversation
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.
@xylar @tomvothecoder I made effectively the same changes as in E3SM-Project/zppy#429 & E3SM-Project/zppy#428. Does that seem fine?
Remaining instances of pip
, for reference:
$ git grep -n pip ':!docs/_build_old/*'
.github/workflows/build_workflow.yml:45: python -m pip install --upgrade pip
.github/workflows/build_workflow.yml:46: pip install .
.github/workflows/build_workflow.yml:71: - name: Cache pip
.github/workflows/build_workflow.yml:75: path: ~/.cache/pip
.github/workflows/build_workflow.yml:77: key: ${{ runner.os }}-pip-publish-docs
.github/workflows/build_workflow.yml:79: ${{ runner.os }}-pip-
.github/workflows/release_workflow.yml:25: - name: Cache pip
.github/workflows/release_workflow.yml:29: path: ~/.cache/pip
.github/workflows/release_workflow.yml:31: key: ${{ runner.os }}-pip-publish-docs
.github/workflows/release_workflow.yml:33: ${{ runner.os }}-pip-
conda/dev.yml:8: - pip=22.2.2
conda/meta.yaml:14: script: "{{ PYTHON }} -m pip install . --no-deps -vv"
conda/meta.yaml:20: - pip
docs/source/getting_started.rst:184:Instead, the developer will ``pip install .`` to build ``zstash`` with changes
docs/source/getting_started.rst:270: pip install .
tests/follow_symlinks.sh:115:pip install .
zstash/parallel.py:132: # be piped to this queue instead of the screen.
install_requires=[ | ||
"fair-research-login>=0.2.6,<0.3.0", | ||
"globus-sdk>=3.0.0,<4.0.0", | ||
"six", | ||
], |
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.
@tomvothecoder It looks like the tests don't like this part being removed. Am I supposed to add these requirements somewhere else?
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.
The issue is that the build
step of the build_workflow.yml
is using a pip environment and referencing the install_requires
section from setup.py
for the dependencies.
You need to replace these lines
zstash/.github/workflows/build_workflow.yml
Lines 38 to 41 in c0aadc7
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 |
with the step to cache and create the conda environment (zppy example):
- name: Cache Conda
uses: actions/cache@v3
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda/dev.yml') }}
- name: Build Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: zstash_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
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.
@tomvothecoder Thanks! Now I'm getting sphinx-multiversion 0.2.4 does not exist (perhaps a typo or a missing channel).
on the tests though...
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 everything seems to match up with what was done for zppy
, which did work.
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.
@tomvothecoder Ah, actually zppy
did not work. I missed a failing GitHub action. Fixing a syntax error in E3SM-Project/zppy#434, I end up with the same error as zstash
described here.
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.
Yes, my latest commit reverting that change makes the GitHub Actions check pass. I may keep it like that to get this merged and address this issue later in the release testing process.
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.
The checks appeared to pass for E3SM-Project/zppy#434, but after merging, the publish-docs Action failed (https://github.com/E3SM-Project/zppy/actions/runs/5284999456/jobs/9563041218: line 1: mamba: command not found). Because of this, I think it's best to hold off on merging this PR until the sphinx-multiversion
error is resolved.
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.
Yes, at a glance it looks right to me.
@forsyth2, I don't have permission to push to this branch. Could you please cherry-pick the last 2 commits from the following? |
My two (potentially out-of-the-loop) comments:
|
@@ -8,10 +8,5 @@ | |||
description="Long term HPSS archiving software for E3SM", | |||
packages=find_packages(include=["zstash", "zstash.*"]), | |||
python_requires=">=3.6", | |||
install_requires=[ |
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.
Is zstash supposed to have zero dependencies? Should we remove these deps from conda-forge as well?
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.
We just don't want dependencies to come from pip
. I don't remember the exact details. Hopefully @forsyth2 can point us to the relevant discussion, but these were causing trouble in the recent past.
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 think it was just this comment from @tomvothecoder:
E3SM-Project/zppy#397 (comment)
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 think our packages basically don't and never have worked with
I'll leave this up to @tomvothecoder and @forsyth2. To me, it seems like an undesirable practice to use |
Cherry-picked to this branch.
I agree that it probably makes more sense to stick to one tool here. |
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.
Thanks for the extra commits @xylar! I think this looks good now; should I go ahead and merge?
Maybe see how it goes with appy first and merge this only after that's successful... |
Ok, we'll wait to see how E3SM-Project/zppy#438 does |
@forsyth2, as I just commented here: |
Change workflow to mamba. Resolves #252. Equivalent of
zppy
's E3SM-Project/zppy#429 & E3SM-Project/zppy#428