Skip to content

Commit

Permalink
Merge branch 'main' of github.com:esmvalgroup/esmvaltool into easy-ip…
Browse files Browse the repository at this point in the history
…cc-recipe
  • Loading branch information
bouweandela committed Aug 18, 2023
2 parents ea46ad9 + b244fef commit 9a1db36
Show file tree
Hide file tree
Showing 56 changed files with 1,357 additions and 623 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
esmvaltool/cmorizers @remi-kazeroni
esmvaltool/cmorizers @ESMValGroup/obs-maintainers
.github/workflows @valeriupredoi
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ It is the responsibility of the author to make sure the pull request is ready to

- [ ] [🛠][1] [Documentation](https://docs.esmvaltool.org/en/latest/community/dataset.html#dataset-documentation) is available
- [ ] [🛠][1] The dataset has been [added to the CMOR check recipe](https://docs.esmvaltool.org/en/latest/community/dataset.html#testing)
- [ ] [🛠][1] The dataset has been added to the shared [data pools](https://docs.esmvaltool.org/en/latest/community/dataset.html#cmorized-data) of DKRZ and Jasmin by the @ESMValGroup/OBS-maintainers team
- [ ] [🧪][2] Numbers and units of the data look [physically meaningful](https://docs.esmvaltool.org/en/latest/community/dataset.html#scientific-sanity-check)

***
Expand Down
54 changes: 29 additions & 25 deletions .github/workflows/create-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ on:
# and hence lots of automated PRs
# push:
# branches:
# - condalock-update
# - main
schedule:
- cron: '0 4 */10 * *'

# Required shell entrypoint to have properly configured bash shell
defaults:
run:
shell: bash -l {0}

jobs:
create-lock-file:
name: Create conda lock file for latest Python
Expand All @@ -27,50 +32,49 @@ jobs:
miniforge-variant: Mambaforge
use-mamba: true
- name: Show conda config
shell: bash -l {0}
run: |
conda update -n base -c conda-forge conda
conda info
conda list
conda --version
# setup-miniconda@v2 installs an old conda and mamba
# forcing a modern mamba updates both mamba and conda
conda install -c conda-forge "mamba>=1.4.8"
conda config --show-sources
conda config --show
conda --version
mamba --version
- name: Python info
shell: bash -l {0}
run: |
which python
python --version
- name: Install conda-lock
shell: bash -l {0}
run: mamba install -y conda-lock
run: mamba install -y -c conda-forge conda-lock
- name: Check version of conda-lock
shell: bash -l {0}
run: conda-lock --version
- name: Create conda lock file for linux-64
shell: bash -l {0}
run: conda-lock lock --platform linux-64 -f environment.yml --mamba --kind explicit
- shell: bash -l {0}
- name: Show conda version again
run: conda --version
- shell: bash -l {0}
run: which python
- shell: bash -l {0}
run: python -V
- shell: bash -l {0}
- name: Show Python exec and version again
run: |
which python
python -V
- name: Create conda-lock environment
run: conda create --name esmvaltool-fromlock --file conda-linux-64.lock
- shell: bash -l {0}
- name: Install pip
run: mamba install -y pip
- shell: bash -l {0}
run: which python
- shell: bash -l {0}
run: pip --version
- shell: bash -l {0}
- name: Check Python and pip versions post pip-install
run: |
which python
pip --version
- name: Install ESMValTool
run: pip install -e .[develop]
- shell: bash -l {0}
- name: Check ESMValTool version
run: esmvaltool --help
- shell: bash -l {0}
- name: Check ESMValTool help
run: esmvaltool version
- shell: bash -l {0}
- name: Run flake8
run: flake8
- shell: bash -l {0}
- name: Run tests
run: pytest -n 2 -m "not installation"
# Automated PR
# see https://github.com/marketplace/actions/create-pull-request
Expand Down
46 changes: 18 additions & 28 deletions .github/workflows/install-from-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
schedule:
- cron: '0 4 * * *'

# Required shell entrypoint to have properly configured bash shell
defaults:
run:
shell: bash -l {0}

jobs:
linux:
runs-on: "ubuntu-latest"
Expand All @@ -24,20 +29,16 @@ jobs:
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- shell: bash -l {0}
run: mkdir -p conda_install_linux_artifacts_python_${{ matrix.python-version }}
- run: mkdir -p conda_install_linux_artifacts_python_${{ matrix.python-version }}
- name: Record versions
shell: bash -l {0}
run: |
mamba --version 2>&1 | tee conda_install_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt
which conda 2>&1 | tee conda_install_linux_artifacts_python_${{ matrix.python-version }}/conda_path.txt
which mamba 2>&1 | tee -a conda_install_linux_artifacts_python_${{ matrix.python-version }}/conda_path.txt
python -V 2>&1 | tee conda_install_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt
- name: Install ESMValTool
shell: bash -l {0}
run: mamba install esmvaltool 2>&1 | tee conda_install_linux_artifacts_python_${{ matrix.python-version }}/install.txt
- name: Verify installation
shell: bash -l {0}
run: |
esmvaltool --help
esmvaltool version 2>&1 | tee conda_install_linux_artifacts_python_${{ matrix.python-version }}/version.txt
Expand Down Expand Up @@ -65,31 +66,20 @@ jobs:
# python-version: ${{ matrix.python-version }}
# miniconda-version: "latest"
# channels: conda-forge
# - shell: bash -l {0}
# run: mkdir -p conda_install_osx_artifacts_python_${{ matrix.python-version }}
# - shell: bash -l {0}
# run: conda --version 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/conda_version.txt
# - shell: bash -l {0}
# run: which conda 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/conda_path.txt
# - shell: bash -l {0}
# run: python -V 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/python_version.txt
# - run: mkdir -p conda_install_osx_artifacts_python_${{ matrix.python-version }}
# - run: conda --version 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/conda_version.txt
# - run: which conda 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/conda_path.txt
# - run: python -V 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/python_version.txt
# # ncurses needs to be from conda-forge and not main channel
# # for now it's turned off since we're not testing R/Julia installs
# # - shell: bash -l {0}
# # run: conda uninstall -y ncurses
# # - shell: bash -l {0}
# # run: conda list ncurses
# # - shell: bash -l {0}
# # run: conda install -y conda-forge::ncurses
# # - shell: bash -l {0}
# # run: conda list ncurses
# - shell: bash -l {0}
# #run: conda install esmvaltool --no-update-deps 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
# run: conda install esmvaltool-python esmvaltool-ncl 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
# - shell: bash -l {0}
# run: esmvaltool --help
# - shell: bash -l {0}
# run: esmvaltool version 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/version.txt
# # - run: conda uninstall -y ncurses
# # - run: conda list ncurses
# # - run: conda install -y conda-forge::ncurses
# # - run: conda list ncurses
# - run: conda install esmvaltool --no-update-deps 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
# - run: conda install esmvaltool-python esmvaltool-ncl 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
# - run: esmvaltool --help
# - run: esmvaltool version 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/version.txt
# - name: Upload artifacts
# if: ${{ always() }} # upload artifacts even if fail
# uses: actions/upload-artifact@v2
Expand Down
76 changes: 17 additions & 59 deletions .github/workflows/install-from-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ on:
schedule:
- cron: '0 0 * * *'

# Required shell entrypoint to have properly configured bash shell
defaults:
run:
shell: bash -l {0}

jobs:
linux:
runs-on: "ubuntu-latest"
Expand All @@ -38,68 +43,21 @@ jobs:
python-version: ${{ matrix.python-version }}
miniconda-version: "latest"
channels: conda-forge
- shell: bash -l {0}
run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }}
- shell: bash -l {0}
run: conda --version 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt
- shell: bash -l {0}
run: which python
- shell: bash -l {0}
run: python -V 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt
- shell: bash -l {0}
run: conda create --name esmvaltool-fromlock --file conda-linux-64.lock
- shell: bash -l {0}
run: which python
- shell: bash -l {0}
run: pip --version
- shell: bash -l {0}
run: pip install -e .[develop]
- shell: bash -l {0}
run: esmvaltool --help
- shell: bash -l {0}
run: esmvaltool version 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/version.txt
- shell: bash -l {0}
run: flake8
- shell: bash -l {0}
run: pytest -n 2 -m "not installation"
- run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }}
- run: conda --version 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt
- run: which python
- run: python -V 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt
- run: conda create --name esmvaltool-fromlock --file conda-linux-64.lock
- run: which python
- run: pip --version
- run: pip install -e .[develop]
- run: esmvaltool --help
- run: esmvaltool version 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/version.txt
- run: flake8
- run: pytest -n 2 -m "not installation"
- name: Upload artifacts
if: ${{ always() }} # upload artifacts even if fail
uses: actions/upload-artifact@v2
with:
name: Source_Install_Linux_python_${{ matrix.python-version }}
path: source_install_linux_artifacts_python_${{ matrix.python-version }}

# osx:
# runs-on: "macos-latest"
# strategy:
# matrix:
# python-version: ["3.9", "3.10", "3.11"]
# fail-fast: false
# name: OSX Python ${{ matrix.python-version }}
# steps:
# - uses: actions/checkout@v2
# - uses: conda-incubator/setup-miniconda@v2
# with:
# activate-environment: esmvaltool
# environment-file: environment.yml
# python-version: ${{ matrix.python-version }}
# miniconda-version: "latest"
# channels: conda-forge
# - shell: bash -l {0}
# run: mkdir -p source_install_osx_artifacts_python_${{ matrix.python-version }}
# - shell: bash -l {0}
# run: conda --version 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/conda_version.txt
# - shell: bash -l {0}
# run: python -V 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/python_version.txt
# - shell: bash -l {0}
# run: pip install -e .[develop] 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
# - shell: bash -l {0}
# run: esmvaltool --help
# - shell: bash -l {0}
# run: esmvaltool version 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/version.txt
# - name: Upload artifacts
# if: ${{ always() }} # upload artifacts even if fail
# uses: actions/upload-artifact@v2
# with:
# name: Source_Install_OSX_python_${{ matrix.python-version }}
# path: source_install_osx_artifacts_python_${{ matrix.python-version }}
29 changes: 12 additions & 17 deletions .github/workflows/install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
schedule:
- cron: '0 0 * * *'

# Required shell entrypoint to have properly configured bash shell
defaults:
run:
shell: bash -l {0}

jobs:
linux:
runs-on: "ubuntu-latest"
Expand All @@ -29,18 +34,14 @@ jobs:
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- shell: bash -l {0}
run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }}
- run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }}
- name: Record versions
shell: bash -l {0}
run: |
mamba --version 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt
python -V 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt
- name: Install
shell: bash -l {0}
run: pip install -e .[develop] 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/install.txt
- name: Verify installation
shell: bash -l {0}
run: |
esmvaltool --help
esmvaltool version 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/version.txt
Expand Down Expand Up @@ -70,18 +71,12 @@ jobs:
# python-version: ${{ matrix.python-version }}
# miniconda-version: "latest"
# channels: conda-forge
# - shell: bash -l {0}
# run: mkdir -p source_install_osx_artifacts_python_${{ matrix.python-version }}
# - shell: bash -l {0}
# run: conda --version 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/conda_version.txt
# - shell: bash -l {0}
# run: python -V 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/python_version.txt
# - shell: bash -l {0}
# run: pip install -e .[develop] 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
# - shell: bash -l {0}
# run: esmvaltool --help
# - shell: bash -l {0}
# run: esmvaltool version 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/version.txt
# - run: mkdir -p source_install_osx_artifacts_python_${{ matrix.python-version }}
# - run: conda --version 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/conda_version.txt
# - run: python -V 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/python_version.txt
# - run: pip install -e .[develop] 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
# - run: esmvaltool --help
# - run: esmvaltool version 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/version.txt
# - name: Upload artifacts
# if: ${{ always() }} # upload artifacts even if fail
# uses: actions/upload-artifact@v2
Expand Down
Loading

0 comments on commit 9a1db36

Please sign in to comment.