Skip to content

Commit

Permalink
Merge branch 'main' into misc-lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriupredoi authored Nov 13, 2024
2 parents b34c3ae + a328578 commit a4139bf
Show file tree
Hide file tree
Showing 129 changed files with 1,562 additions and 1,361 deletions.
21 changes: 13 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ commands:
circleci step halt
fi
test_and_report:
parameters:
args:
type: string
default: ""
steps:
- run:
name: Run tests
command: |
mkdir -p test-reports
. /opt/conda/etc/profile.d/conda.sh
conda activate esmvaltool
pytest -n 4 --junitxml=test-reports/report.xml
pytest -n 4 --junitxml=test-reports/report.xml << parameters.args >>
esmvaltool version
- store_test_results:
path: test-reports/report.xml
Expand Down Expand Up @@ -127,8 +131,9 @@ jobs:
. /opt/conda/etc/profile.d/conda.sh
mkdir /logs
conda activate esmvaltool
pip install .[test] |& tee -a /logs/install.txt
- test_and_report
pip install .[test] > /logs/install.txt 2>&1
- test_and_report:
args: --cov
- save_cache:
key: test-{{ .Branch }}-{{ checksum "cache_key.txt" }}
paths:
Expand All @@ -149,15 +154,15 @@ jobs:
test_installation_from_source_test_mode:
# Test installation from source
docker:
- image: condaforge/mambaforge
- image: condaforge/miniforge3
resource_class: large
steps:
- test_installation_from_source

test_installation_from_source_develop_mode:
# Test development installation
docker:
- image: condaforge/mambaforge
- image: condaforge/miniforge3
resource_class: large
steps:
- test_installation_from_source:
Expand All @@ -167,7 +172,7 @@ jobs:
test_with_upstream_developments:
# Test with development versions of upstream packages
docker:
- image: condaforge/mambaforge
- image: condaforge/miniforge3
resource_class: large
steps:
- test_installation_from_source:
Expand All @@ -187,7 +192,7 @@ jobs:
# Test conda package installation
working_directory: /esmvaltool
docker:
- image: condaforge/mambaforge
- image: condaforge/miniforge3
resource_class: medium
steps:
- run:
Expand All @@ -209,7 +214,7 @@ jobs:
build_documentation:
# Test building documentation
docker:
- image: condaforge/mambaforge
- image: condaforge/miniforge3
resource_class: medium
steps:
- checkout
Expand Down
2 changes: 0 additions & 2 deletions .circleci/install_triggers
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
^\.circleci/
^environment\.yml$
^pyproject.toml$
^setup\.py$
^setup\.cfg$
5 changes: 3 additions & 2 deletions .github/workflows/create-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
activate-environment: esmvaltool-fromlock
python-version: "3.12"
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- name: Update and show conda config
run: |
Expand All @@ -40,7 +39,9 @@ jobs:
conda config --show
# setup-miniconda@v3 installs an old conda and mamba
# forcing a modern mamba updates both mamba and conda
conda install -c conda-forge "mamba>=1.4.8"
# unpin mamba after conda-lock=3 release
# see github.com/ESMValGroup/ESMValTool/issues/3782
conda install -c conda-forge "mamba>=1.4.8,<2"
conda --version
mamba --version
- name: Gather Python info
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/install-from-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p conda_install_linux_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand Down Expand Up @@ -85,7 +84,6 @@ jobs:
architecture: ${{ matrix.architecture }}
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p conda_install_osx_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/install-from-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p pip_install_linux_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand Down Expand Up @@ -90,7 +89,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p pip_install_osx_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand Down Expand Up @@ -89,7 +88,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p source_install_osx_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/run-tests-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p test_linux_artifacts_python_${{ matrix.python-version }}
- run: conda --version 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt
Expand Down Expand Up @@ -70,7 +69,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p test_osx_artifacts_python_${{ matrix.python-version }}
- run: conda --version 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/conda_version.txt
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p test_linux_artifacts_python_${{ matrix.python-version }}
- run: conda --version 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt
Expand Down Expand Up @@ -90,7 +89,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p test_osx_artifacts_python_${{ matrix.python-version }}
- run: conda --version 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/conda_version.txt
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ repos:
- id: codespell
additional_dependencies: [tomli] # required for Python 3.10
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.9"
rev: "v0.7.3"
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.11.2'
rev: 'v1.13.0'
hooks:
- id: mypy
additional_dependencies:
Expand Down
15 changes: 4 additions & 11 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,13 @@ version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-lts-latest
tools:
# updated and deployed from Aug 1, 2023
python: "mambaforge-22.9"
# try miniforge3 when available? see github.com/ESMValGroup/ESMValCore/issues/2557
# DO NOT use mambaforge-*; that is currently sunsetted
python: "miniconda-latest"
jobs:
pre_create_environment:
# update mamba just in case
- mamba update --yes --quiet --name=base mamba 'zstd=1.5.2'
- mamba --version
- mamba list --name=base
post_create_environment:
- conda run -n ${CONDA_DEFAULT_ENV} mamba list
# use conda run executable wrapper to have all env variables
- conda run -n ${CONDA_DEFAULT_ENV} mamba --version
- conda run -n ${CONDA_DEFAULT_ENV} pip install . --no-deps

# Declare the requirements required to build your docs
Expand Down
Loading

0 comments on commit a4139bf

Please sign in to comment.