-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'nexus-upd' of https://github.com/iiasa/message-ix-models …
…into nexus-upd
- Loading branch information
Showing
75 changed files
with
2,581 additions
and
1,812 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
# Only update major versions | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: | ||
- "version-update:semver-minor" | ||
- "version-update:semver-patch" | ||
# Below config mirrors the example at | ||
# https://github.com/dependabot/dependabot-core/blob/main/.github/dependabot.yml | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "sunday" | ||
time: "16:00" | ||
groups: | ||
all-actions: | ||
patterns: [ "*" ] | ||
assignees: | ||
- "glatterf42" | ||
- "khaeru" | ||
labels: | ||
- "dependencies" | ||
reviewers: | ||
- "glatterf42" | ||
- "khaeru" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main , "migrate-*"] | ||
schedule: | ||
|
@@ -18,42 +16,65 @@ jobs: | |
pytest: | ||
strategy: | ||
matrix: | ||
# One job per OS; latest python version testable on GitHub actions. | ||
# These should match the versions used in the "pytest" workflows of both | ||
# ixmp and message_ix. | ||
version: | ||
- { os: macos-latest, python: "3.11" } | ||
- { os: ubuntu-latest, python: "3.11" } | ||
- { os: windows-latest, python: "3.11" } | ||
# Versions of both ixmp and message_ix to use | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
upstream: | ||
- { version: v3.4.0, extra-deps: '"pandas<2.0"' } # Minimum version given in setup.cfg | ||
- { version: v3.5.0, extra-deps: '"pandas<2.0"' } | ||
- { version: v3.6.0, extra-deps: '"pandas<2.0"' } | ||
- { version: v3.7.0, extra-deps: "" } # Latest released version | ||
- { version: main, extra-deps: "" } # Development version | ||
# In each group: | ||
# - Versions of ixmp and message_ix to test. | ||
# - Latest supported Python version for those or other dependencies. | ||
# - Extra dependencies, in particular fixed/maximum versions to resolve conficts. | ||
# - dask[dataframe] >= 2024.3.0 requires dask-expr and in turn pandas >= 2.0. | ||
# https://github.com/iiasa/message-ix-models/pull/156#issuecomment-2020152360 | ||
# - genno: upstream versions < 3.8.0 import genno.computations, removed in 1.25.0. | ||
# https://github.com/iiasa/message-ix-models/pull/156 | ||
# - pytest: upstream versions < 3.9.0 use a hook argument removed in pytest 8.1.0. | ||
# https://github.com/iiasa/message-ix-models/pull/155 | ||
# | ||
# Minimum version given in pyproject.toml | ||
- version: v3.4.0 | ||
python-version: "3.11" | ||
extra-deps: '"dask < 2024.3.0" "genno < 1.25" "pandas < 2.0" "pytest == 8.0.0"' # | ||
- version: v3.5.0 | ||
python-version: "3.11" | ||
extra-deps: '"dask < 2024.3.0" "genno < 1.25" "pandas < 2.0" "pytest == 8.0.0"' # | ||
- version: v3.6.0 | ||
python-version: "3.11" | ||
extra-deps: '"dask < 2024.3.0" "genno < 1.25" "pandas < 2.0" "pytest == 8.0.0"' # | ||
- version: v3.7.0 | ||
python-version: "3.11" | ||
extra-deps: 'dask[dataframe] "genno < 1.25" "pytest == 8.0.0"' # | ||
# Latest released version | ||
- version: v3.8.0 | ||
python-version: "3.12" | ||
extra-deps: 'dask[dataframe] "pytest == 8.0.0"' # | ||
# Development version | ||
- version: main | ||
python-version: "3.12" | ||
extra-deps: 'dask[dataframe]' # | ||
|
||
fail-fast: false | ||
|
||
runs-on: ${{ matrix.version.os }} | ||
name: ${{ matrix.version.os }}-py${{ matrix.version.python }}-upstream-${{ matrix.upstream.version }} | ||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.os }}-py${{ matrix.upstream.python-version }}-upstream-${{ matrix.upstream.version }} | ||
|
||
steps: | ||
- name: Cache test data | ||
uses: actions/cache@v3 | ||
uses: actions/cache@v4 | ||
with: | ||
path: message-local-data | ||
key: ${{ matrix.version.os }} | ||
key: ${{ matrix.os }} | ||
|
||
- name: Check out message-ix-models | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
fetch-depth: ${{ env.depth }} | ||
|
||
- uses: actions/setup-python@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.version.python }} | ||
python-version: ${{ matrix.upstream.python-version }} | ||
cache: pip | ||
cache-dependency-path: "**/pyproject.toml" | ||
|
||
|
@@ -62,7 +83,7 @@ jobs: | |
version: 25.1.1 | ||
license: ${{ secrets.GAMS_LICENSE }} | ||
|
||
- uses: ts-graphviz/setup-graphviz@v1 | ||
- uses: ts-graphviz/setup-graphviz@v2 | ||
with: | ||
macos-skip-brew-update: true | ||
|
||
|
@@ -98,21 +119,23 @@ jobs: | |
shell: bash | ||
|
||
- name: Upload test coverage to Codecov.io | ||
uses: codecov/codecov-action@v3 | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} # required | ||
|
||
pre-commit: | ||
name: Code quality | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: { python-version: "3.11" } | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: { python-version: "3.12" } | ||
|
||
- name: Force recreation of pre-commit virtual environment for mypy | ||
if: github.event_name == 'schedule' # Comment this line to run on a PR | ||
run: gh cache list -L 999 | cut -f2 | grep pre-commit | xargs -I{} gh cache delete "{}" || true | ||
env: { GH_TOKEN: "${{ github.token }}" } | ||
|
||
- uses: pre-commit/[email protected].0 | ||
- uses: pre-commit/[email protected].1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.