Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
print_hash: true
print_hash: true
6 changes: 4 additions & 2 deletions .github/workflows/refresh-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: install conda-lock
- name: install requirements
run: |
source $CONDA/bin/activate base
conda install -y -c conda-forge conda-lock
conda install -y -c conda-forge conda-libmamba-solver conda-lock
- name: generate lockfile
env:
CONDA_EXPERIMENTAL_SOLVER: libmamba
run: |
$CONDA/bin/conda-lock lock -k explicit -p linux-64 -f requirements/ci/${{matrix.python}}.yml
mv conda-linux-64.lock ${{matrix.python}}-linux-64.lock
Expand Down
15 changes: 12 additions & 3 deletions tools/update_lockfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
from pathlib import Path
import subprocess
import sys
from warnings import warn


message = (
"Iris' large requirements may require Mamba to successfully solve. If you "
"don't want to install Mamba, consider using the workflow_dispatch on "
"Iris' GitHub action."
)
warn(message)


try:
Expand All @@ -29,9 +38,9 @@
"Iris Lockfile Generator",
)

parser.add_argument('files', nargs='+',
parser.add_argument('files', nargs='+',
help="List of environment.yml files to lock")
parser.add_argument('--output-dir', '-o', default='.',
parser.add_argument('--output-dir', '-o', default='.',
help="Directory to save output lock files")

args = parser.parse_args()
Expand All @@ -43,7 +52,7 @@
ftype = fname.split('.')[-1]
if ftype.lower() in ('yaml', 'yml'):
fname = '.'.join(fname.split('.')[:-1])

# conda-lock --filename-template expects a string with a "...{platform}..."
# placeholder in it, so we have to build the .lock filname without
# using .format
Expand Down