Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
252 commits
Select commit Hold shift + click to select a range
d48c0fc
AWB instances reclassified back into Agriculture
mzecc Jun 26, 2025
82df5e5
Updated salted-202504-scenariomip-input_gridding_workflow_emissions.csv
mzecc Jul 1, 2025
dfc28ed
C02 AFOLU gridding
mzecc Jul 2, 2025
d30b7c8
Added CO2 as input_species for Agriculture
mzecc Jul 4, 2025
4ad416f
Merge branch 'new-agri' into 0723_agricolture
mzecc Jul 4, 2025
3fbaa4b
Added CO2 as input_species for Agriculture
mzecc Jul 4, 2025
ce379a2
Merge branch 'new-agri' into 0723_agricolture
mzecc Jul 4, 2025
024aed7
Added CO2 as input_species for Agriculture
mzecc Jul 4, 2025
58cc03c
Added CO2 as input_species_optional in Agriculture
mzecc Jul 4, 2025
f8cf96d
Merge PR #18 - fix AWB and Agriculture pre-processing aggregation
jkikstra Jul 4, 2025
6dc0ffd
On going CO2
mzecc Jul 5, 2025
2f773f4
Failing 1 test
mzecc Jul 6, 2025
afddb07
Stand by CO2
mzecc Jul 6, 2025
c82cf4c
CO2 Almost there
mzecc Jul 7, 2025
55e113d
CO2 AFOLU Separate handling
mzecc Jul 7, 2025
e5a7866
Merge branch 'main' into CO2-AFOLU
mzecc Jul 8, 2025
cb4c282
Fixes and added new test
mzecc Jul 8, 2025
7834c42
CI Fix
mzecc Jul 8, 2025
24d497b
CI Fix 2
mzecc Jul 8, 2025
da46557
On going CDR
mzecc Jul 8, 2025
bd42b9d
Added log file to update the salted test data
mzecc Jul 8, 2025
3e3439c
Merge branch 'CO2-AFOLU' into CDR-handling
mzecc Jul 8, 2025
bc94899
CDR First attempt
mzecc Jul 8, 2025
b0f509b
Merge pull request #23 from mzecc/CO2-AFOLU
jkikstra Jul 9, 2025
b133598
CDR almost done
mzecc Jul 9, 2025
3a07b9b
CDR Almost fully added
mzecc Jul 9, 2025
32be1c4
Complete-1 CDR handling
mzecc Jul 9, 2025
0009b03
Complete-2 CDR handling
mzecc Jul 9, 2025
ffa2a77
Small fix salted data
mzecc Jul 9, 2025
4b928a1
Tests fixes
mzecc Jul 9, 2025
1c3a02d
Commented CDR Long-lived Materials
mzecc Jul 9, 2025
3fb92e2
Updated tests after long-lived materials being commented
mzecc Jul 9, 2025
7bde511
Corrected bug on the CDR removal from the Energy and Industrial sector
mzecc Jul 10, 2025
502f13e
CI fixes
mzecc Jul 10, 2025
6a924d5
CI fixes 2
mzecc Jul 10, 2025
b45b646
CI Fixes 3
mzecc Jul 10, 2025
4bfce00
CI Fixes 4
mzecc Jul 10, 2025
f5de591
Updated changelog
mzecc Jul 10, 2025
08e8e37
Merge branch 'main' into CDR-handling
mzecc Jul 10, 2025
1cfb92d
run_checks=False in the how-to file
mzecc Jul 10, 2025
fcd3f56
Merge branch 'CDR-handling' of github.com:mzecc/gcages into CDR-handling
mzecc Jul 10, 2025
0c9ac89
how-to-run-the-cmip7-scenariomip-workflow.py modification 2
mzecc Jul 10, 2025
a563f76
how-to commented out
mzecc Jul 10, 2025
c33ff4f
Merge pull request #25 from mzecc/CDR-handling
mzecc Jul 10, 2025
2bfd842
Update changelog.md
mzecc Jul 10, 2025
3f4cc63
Merge pull request #27 from openscm/mzecc-patch-1
mzecc Jul 10, 2025
2d8f9f2
bump: version 0.6.1a1 -> 0.6.1
Jul 10, 2025
f54ed10
bump(pre-release): version 0.6.1 > 0.6.2a1
Jul 10, 2025
f54adb2
chore: Add commit messages
lewisjared Jul 11, 2025
b44df57
docs: Add note to changelog
lewisjared Jul 11, 2025
6429461
Merge pull request #28 from openscm/changelogs
lewisjared Jul 11, 2025
00c65a8
bump: version 0.6.2a1 -> 0.7.0
Jul 11, 2025
7cd9b76
bump(pre-release): version 0.7.0 > 0.7.1a1
Jul 11, 2025
994ce68
Revert changes
znichollscr Jul 11, 2025
968ec0b
Remove redundant file
znichollscr Jul 11, 2025
0f6f69e
Up to fixing regression tests
znichollscr Jul 11, 2025
51497ad
Update regression file
znichollscr Jul 12, 2025
c1cd97e
CHANGELOG
znichollscr Jul 12, 2025
d1acdf5
Move type ignore comment back
znichollscr Jul 12, 2025
c044fe8
Docs update
znichollscr Jul 12, 2025
55ab69d
Merge pull request #29 from openscm/revert-pr-23
znichollscr Jul 12, 2025
72f5fe0
bump: version 0.7.1a1 -> 0.8.0
Jul 12, 2025
783edbf
bump(pre-release): version 0.8.0 > 0.8.1a1
Jul 12, 2025
1aaac82
Re-write to_gridding_sectors
znichollscr Jul 13, 2025
4c203b3
Pass all integration tests
znichollscr Jul 13, 2025
5de3bd7
Run regression tests
znichollscr Jul 13, 2025
61f9379
CHANGELOG and clean up
znichollscr Jul 13, 2025
c9f38f3
mypy
znichollscr Jul 13, 2025
7556e1e
Update sector notes
znichollscr Jul 13, 2025
60a1dba
Update docs
znichollscr Jul 13, 2025
278dbee
Fix tests
znichollscr Jul 13, 2025
ee76d95
Merge pull request #30 from openscm/clean-up-carbon-removal-handling
znichollscr Jul 13, 2025
ca6fd38
Update salted data and expected output
znichollscr Jul 13, 2025
4fc3630
CHANGELOG
znichollscr Jul 13, 2025
3a459b1
Merge branch 'main' into update-salted-data
znichollscr Jul 13, 2025
462ca81
Update docs
znichollscr Jul 13, 2025
0ffda1c
Merge pull request #31 from openscm/update-salted-data
znichollscr Jul 13, 2025
46d1d15
Fix up optional import use in tests
znichollscr Jul 16, 2025
5fc4adb
Fix up test skipping based on available packages
znichollscr Jul 16, 2025
5185eea
Drop AR6 regression tests out of CI by default and add them to instal…
znichollscr Jul 16, 2025
d28a2c9
Update coverage
znichollscr Jul 16, 2025
0cacd49
Clean up and CHANGELOG
znichollscr Jul 16, 2025
e23e0a8
Revert accidental removal
znichollscr Jul 16, 2025
09f87f5
Merge pull request #32 from openscm/fix-test-pypi-ci
znichollscr Jul 16, 2025
40c8020
Use unit conversion in harmonisation checking
znichollscr Jul 16, 2025
86411ad
Update docstring
znichollscr Jul 16, 2025
6e95b67
Add arguments to pass and CHANGELOG
znichollscr Jul 16, 2025
112c2ed
Merge remote-tracking branch 'origin/main' into unit-support-in-harmo…
znichollscr Jul 16, 2025
8d7d36f
Fix pinning
znichollscr Jul 16, 2025
49c8ed0
CHANGELOG
znichollscr Jul 16, 2025
d5159ed
Merge pull request #33 from openscm/unit-support-in-harmonisation
znichollscr Jul 16, 2025
b1d31f5
Merge branch 'main' into fix-numpy-pinning
znichollscr Jul 16, 2025
80739f9
Merge pull request #34 from openscm/fix-numpy-pinning
znichollscr Jul 16, 2025
4509e6e
bump: version 0.8.1a1 -> 0.9.0
Jul 16, 2025
da1a830
bump(pre-release): version 0.9.0 > 0.9.1a1
Jul 16, 2025
b8a3a20
Add setting of magicc executable env variable
znichollscr Jul 16, 2025
572cae7
Various fixes
znichollscr Jul 16, 2025
88af00a
Try again
znichollscr Jul 16, 2025
24f3787
More updates
znichollscr Jul 16, 2025
e88e642
Update more hashes
znichollscr Jul 16, 2025
0cc1baf
Add windows and macos tests for the main only runs
znichollscr Jul 16, 2025
969920a
Use python version where MAGICC can run
znichollscr Jul 16, 2025
70c98bf
Fix up use of find
znichollscr Jul 16, 2025
d57a06e
More updates
znichollscr Jul 16, 2025
cdbe768
Update expected window shash
znichollscr Jul 16, 2025
d087011
Add run to illustrate the issue
znichollscr Jul 16, 2025
278c739
Try again
znichollscr Jul 16, 2025
e5b2b1e
Add db to ar6 install
znichollscr Jul 16, 2025
47680c0
Try again
znichollscr Jul 16, 2025
ad3a289
Try again
znichollscr Jul 16, 2025
60dc9cc
Try again
znichollscr Jul 16, 2025
771c408
Try again
znichollscr Jul 16, 2025
25689ea
Try adjusting to use windows-2019
znichollscr Jul 16, 2025
ef05ac8
Do some more diagnosis, now for windows
znichollscr Jul 16, 2025
d0c8f86
Try again
znichollscr Jul 16, 2025
3457ae0
Show pwd
znichollscr Jul 16, 2025
bd4fe5d
Another windows attempt
znichollscr Jul 16, 2025
1afac78
Next try
znichollscr Jul 16, 2025
0af7cc2
Fix up slash
znichollscr Jul 16, 2025
cc6e38f
Change to python 3.10 to see if we replicate failure
znichollscr Jul 16, 2025
c7db88d
Don't run on windows
znichollscr Jul 16, 2025
09d7d21
Try forcing pycountry to higher version to see what happens
znichollscr Jul 16, 2025
58d7144
Fix up packaging
znichollscr Jul 16, 2025
5b3d7e5
Clean up and CHANGELOG
znichollscr Jul 16, 2025
815600e
Merge pull request #35 from openscm/magicc-exe-in-test-install
znichollscr Jul 16, 2025
cc07583
bump: version 0.9.1a1 -> 0.10.0
Jul 16, 2025
e812ba5
bump(pre-release): version 0.10.0 > 0.10.1a1
Jul 16, 2025
b067242
Add diagnostic imports
znichollscr Jul 16, 2025
bdabcb8
Try another diagnostic
znichollscr Jul 17, 2025
6db5002
Try adding explicit install
znichollscr Jul 17, 2025
0a6c5bc
Revert diagnostic changes to workflow
znichollscr Jul 17, 2025
fb81fbc
Update dependencies and CI build
znichollscr Jul 17, 2025
0e59d2f
CHANGELOG
znichollscr Jul 17, 2025
3e727ca
Merge pull request #37 from openscm/fix-mac-pypi-install
znichollscr Jul 17, 2025
1ab1c93
bump: version 0.10.1a1 -> 0.10.1
Jul 17, 2025
2428868
bump(pre-release): version 0.10.1 > 0.10.2a1
Jul 17, 2025
6e94d42
Update scmdata pin
znichollscr Jul 23, 2025
ac0cb92
CHANGELOG
znichollscr Jul 23, 2025
8eddbcc
Move long-running test that was forgotten
znichollscr Jul 23, 2025
fbe5d32
Merge pull request #38 from openscm/unlock-scmdata
znicholls Jul 23, 2025
10d0ca1
bump: version 0.10.2a1 -> 0.11.0
Jul 23, 2025
7af6db2
bump(pre-release): version 0.11.0 > 0.11.1a1
Jul 23, 2025
de939df
wip
mzecc Sep 26, 2025
a3baa72
Turn off Carbon Removal tree checking
mzecc Sep 26, 2025
6307c87
Passed tests
mzecc Sep 26, 2025
db61fb0
Added 39.breaking.md changelog
mzecc Sep 26, 2025
e562373
Added 39.breaking.md changelog item
mzecc Sep 26, 2025
899d438
CDR suppressed internal consistency check
mzecc Sep 29, 2025
8cc529d
Modified check of internal consistency
mzecc Oct 9, 2025
366fd57
Update changelog/39.breaking.md
mzecc Oct 10, 2025
96e3efe
Update tests/integration/cmip7-scenariomip/test_integration_cmip7_sce…
mzecc Oct 10, 2025
9fffb10
Update src/gcages/cmip7_scenariomip/pre_processing/reaggregation/basi…
mzecc Oct 10, 2025
10598b4
Updated comments in basic.py
mzecc Oct 10, 2025
33c18b9
Updated small comment
mzecc Oct 10, 2025
0b10cff
Merge pull request #39 from mzecc/CDR_splitting
mzecc Oct 10, 2025
d5c7acd
bump: version 0.11.1a1 -> 0.12.0
Oct 10, 2025
f6ee641
bump(pre-release): version 0.12.0 > 0.12.1a1
Oct 10, 2025
89a78fc
Added CDR| Biochar and Soil Carbon Management
mzecc Nov 26, 2025
8164f46
Updated salted files
mzecc Nov 27, 2025
8d47a2f
Small typo
mzecc Nov 27, 2025
60c2076
Added 40.breaking.md changelog
mzecc Dec 1, 2025
ef971cf
Merge pull request #40 from mzecc/BiocharAndSCM
mzecc Dec 1, 2025
ba4b11f
bump: version 0.12.1a1 -> 0.13.0
Dec 2, 2025
87daaa4
bump(pre-release): version 0.13.0 > 0.13.1a1
Dec 2, 2025
84e098c
Test: pin macOS runner to macos-15
mzecc Dec 3, 2025
1fd305d
Test: reverting to macos-latest
mzecc Dec 4, 2025
666367d
bump: version 0.12.1a1 -> 0.13.0
Dec 2, 2025
16e3fe7
bump(pre-release): version 0.13.0 > 0.13.1a1
Dec 2, 2025
08d4df8
Added changelog
mzecc Dec 5, 2025
83820ce
ci-main-only correction
mzecc Dec 5, 2025
efde837
Final clean-up
mzecc Dec 5, 2025
1edfb8c
Merge branch 'main' into macos-bump
znichollscr Dec 5, 2025
6a6f4c3
Merge pull request #41 from mzecc/macos-bump
znichollscr Dec 5, 2025
bc6f20f
SCM-Biochar fix attempt
mzecc Feb 3, 2026
12e676e
Failing regression tests
mzecc Feb 4, 2026
9518ae9
remapped Biochar and SCM
mzecc Feb 4, 2026
e8c414f
hacked consistency for Carbon Removal|Land Use variables
mzecc Feb 4, 2026
a0e9b4a
regenerated salted files
mzecc Feb 4, 2026
5d92874
Remove commented-out breakpoint in regression test
mzecc Feb 4, 2026
e10d9ec
Apply suggestion from @znichollscr
mzecc Feb 4, 2026
63f94f0
Added Forest Management, and Other in CR|Land Use
mzecc Feb 5, 2026
b1168a6
Merge branch 'biochar_SCM_fix2' of github.com:mzecc/gcages into bioch…
mzecc Feb 5, 2026
9f0fade
Merge pull request #42 from mzecc/biochar_SCM_fix2
mzecc Feb 5, 2026
3450b2b
bump: version 0.13.1a1 -> 0.14.0
Feb 5, 2026
e3053d9
bump(pre-release): version 0.14.0 > 0.14.1a1
Feb 5, 2026
8ef7d85
WIP
mzecc Mar 4, 2026
1eeedaf
Add failing test
znichollscr Mar 4, 2026
8e4f873
Outline implementation
znichollscr Mar 5, 2026
b5323d6
First set of models passing
znichollscr Mar 5, 2026
5658d0f
Extract results from more recent run
znichollscr Mar 5, 2026
c5acdfc
Fix up harmonisation errors
znichollscr Mar 5, 2026
27a0d31
Add parallel harmonisation test
znichollscr Mar 5, 2026
3cdb2f9
Fix import in download script
znichollscr Mar 5, 2026
63bdb86
Fix up tests
znichollscr Mar 5, 2026
8a03ac4
Update docs
znichollscr Mar 5, 2026
be4cbba
Update windows hashes
znichollscr Mar 5, 2026
a86f2f5
Swapped expected hash
mzecc Mar 5, 2026
45a9250
forced aneris_overrides to DataFrame
mzecc Mar 5, 2026
d92f4f4
type: ignore[arg-type] workaround
mzecc Mar 5, 2026
b718992
type juggling
mzecc Mar 5, 2026
a9c6dc2
Country gridding + infilling
mzecc Mar 12, 2026
76ccade
Country gridding + infilling
mzecc Mar 12, 2026
75c5269
infilling and global harmonisation
mzecc Mar 13, 2026
4e51f95
cleaned how-to-run-the-cmip7-scenariomip-workflow
mzecc Mar 13, 2026
286487d
Failing tests/integration/harmonisation/test_integration_harmonisation
mzecc Mar 13, 2026
4064581
Tests passing locally
mzecc Mar 13, 2026
6856041
Added pandas-indexing into pyproject
mzecc Mar 14, 2026
a73006b
Added changelogs and cleaning
mzecc Mar 16, 2026
e6b1858
Revert changes to pyproject.toml
mzecc Mar 16, 2026
adeab51
Updated path on test
mzecc Mar 16, 2026
b57c363
Updated changelog
mzecc Mar 16, 2026
24ac103
Helping mkdocs with docstring
mzecc Mar 16, 2026
7f490a8
Update pyproject.toml
znichollscr Mar 17, 2026
d6fa70c
Merge pull request #3 from openscm/pz-44-mz-zn
mzecc Mar 17, 2026
11193c6
Merge pull request #45 from mzecc/pr-44-mz
mzecc Mar 17, 2026
9744763
Resolve merge conflicts with main
mzecc Mar 17, 2026
49c2027
Updated test files
mzecc Mar 17, 2026
c82cab3
Splitted get_pre_industrial_aware_direct_scaling_infiller out
mzecc Mar 17, 2026
a761134
mypy: 1
mzecc Mar 18, 2026
a5c26d7
mypy: 2
mzecc Mar 18, 2026
555b5bf
mypy: 3
mzecc Mar 18, 2026
558371e
mypy: 4
mzecc Mar 18, 2026
9dd8723
mypy: 5
mzecc Mar 18, 2026
e0e3bb7
mypy: 5
mzecc Mar 18, 2026
4164a01
mypy: 7
mzecc Mar 18, 2026
50f6e85
mypy: 9
mzecc Mar 18, 2026
9003906
mypy: 11
mzecc Mar 18, 2026
025a523
mypy:11
mzecc Mar 18, 2026
cf5ce7f
mypy :11
mzecc Mar 18, 2026
1ae66fd
mypy :14
mzecc Mar 18, 2026
51eaac7
mypy :16
mzecc Mar 18, 2026
830a2dc
mypy :17
mzecc Mar 18, 2026
b7ee45a
mypy :18
mzecc Mar 18, 2026
2b586e2
Implemented Corrections
mzecc Mar 19, 2026
3cf1cb4
Added class for infilling
mzecc Mar 19, 2026
9421466
tests passing
mzecc Mar 20, 2026
416f76e
moved complete_index_gcages_names into infilling.py
mzecc Mar 20, 2026
760a76c
removed scm_runnig.py
mzecc Mar 20, 2026
504affd
cleaned common.py
mzecc Mar 20, 2026
18ad33d
Updated how-to-run-the-cmip7-scenariomip-workflow
mzecc Mar 20, 2026
611ee19
Revert changes to pyproject.toml
mzecc Mar 20, 2026
b5dd418
Corrected how-to-run-the-cmip7-scenariomip-workflow.py
mzecc Mar 20, 2026
8df4528
Small errors mypy
mzecc Mar 20, 2026
b2ca0b9
Removed year column form get_cmip7_scenariomip_harmonised_emissions
mzecc Mar 20, 2026
eed1e31
Removed year column form get_cmip7_scenariomip_infilled_emissions
mzecc Mar 20, 2026
0563dfc
Clean up
mzecc Mar 25, 2026
57cf468
Clean up
mzecc Mar 25, 2026
90e4d15
Clean up
mzecc Mar 25, 2026
9a4fec2
removed cmip7 infilled result option
mzecc Mar 26, 2026
d1e6c97
Added changelog
mzecc Mar 26, 2026
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
68 changes: 63 additions & 5 deletions .github/workflows/ci-main-only.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,63 @@ on:
# pull_request:
push:
branches: [main]
workflow_dispatch:

jobs:
tests:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
# Not running on windows, see https://github.com/openscm/gcages/issues/36
# os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
os: [ "ubuntu-latest", "macos-latest" ]
# Just test on a sensible version
python-version: [ "3.12" ]
# Use 3.11 while cicero-scm uses distutils in openscm-runner,
# see https://github.com/openscm/openscm-runner/blob/261bd177b86a708b0080eed245b6511ebb0051bb/src/openscm_runner/adapters/ciceroscm_adapter/ciceroscm_wrapper.py#L10
python-version: [ "3.11" ]
runs-on: "${{ matrix.os }}"
steps:
- name: Check out repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
uv-dependency-install-flags: "--all-extras --group tests"
- name: Set DYLD path
if: matrix.os == 'macos-latest'
run: |
# # Useful if the path appears to have changed
# find / -name 'libgfortran.5.dylib' 2>/dev/null
find /opt/homebrew -name libgfortran.5.dylib 2>/dev/null | head -1
echo "DYLD_LIBRARY_PATH=$(dirname $(find /opt/homebrew -name libgfortran.5.dylib 2>/dev/null | head -1))" >> $GITHUB_ENV
- name: Try to run MAGICC
if: matrix.os == 'windows-latest'
run: |
# This is the thing I can't figure out, even just getting the version to appear doesn't work
# x-ref https://github.com/openscm/gcages/issues/36
D:\a\gcages\gcages\tests\regression\ar6\ar6-workflow-inputs\magicc-v7.5.3\bin\magicc.exe --version
- name: Run tests that are otherwise skipped (mostly regression tests for specific set ups)
run: |
uv run pytest -r a -v -s tests -m "skip_ci_default"

tests-resolution-strategies:
strategy:
fail-fast: false
matrix:
# Only test on ubuntu here for now.
# We could consider doing this on different platforms too,
# although that probably belongs better with the PyPI tests.
os: [ "ubuntu-latest" ]
# Tests with lowest direct resolution.
# We don't do lowest because that is essentially testing
# whether downstream dependencies
# have set their minimum support dependencies correctly,
# which isn't our problem to solve.
resolution-strategy: [ "lowest-direct" ]
# Only test against the oldest supported python version
# because python is itself a direct dependency
# (so we're testing against the lowest direct python too).
python-version: [ "3.9" ]
runs-on: "${{ matrix.os }}"
defaults:
run:
Expand All @@ -24,10 +72,20 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Setup uv
id: setup-uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.21"
python-version: ${{ matrix.python-version }}
uv-dependency-install-flags: "--all-extras --group tests"
- name: Create venv
run: |
uv venv --seed
- name: Install dependencies
run: |
uv pip install --requirements requirements-only-tests-locked.txt
uv pip compile --python ${{ matrix.python-version }} --resolution ${{ matrix.resolution-strategy }} --all-extras pyproject.toml -o requirements-tmp.txt
uv pip install --requirements requirements-tmp.txt .
- name: Run tests
run: |
uv run pytest -r a -v -s tests -m "skip_ci_default"
MAGICC_EXECUTABLE_7="tests/regression/ar6/ar6-workflow-inputs/magicc-v7.5.3/bin/magicc" uv run --no-sync pytest -r a -v -s tests -m "skip_ci_default"
15 changes: 13 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ jobs:
os: [ "ubuntu-latest" ]
# Test against all security and bugfix versions: https://devguide.python.org/versions/
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
include:
# Include other OS for latest Python
# because these seem to be the flakiest from experience
# so are worth the extra testing
- os: "windows-latest"
python-version: "3.13"
- os: "macos-latest"
python-version: "3.13"
runs-on: "${{ matrix.os }}"
defaults:
run:
Expand Down Expand Up @@ -149,7 +157,7 @@ jobs:
uv pip install --requirements requirements-tmp.txt .
- name: Run tests
run: |
MAGICC_EXECUTABLE_7="tests/regression/ar6/ar6-workflow-inputs/magicc-v7.5.3/bin/magicc" uv run --no-sync pytest tests -r a -v
uv run --no-sync pytest tests -r a -v -m "not skip_ci_default"

tests-without-extras:
# Run the tests without installing extras.
Expand Down Expand Up @@ -233,7 +241,10 @@ jobs:
# Required for building the locked version of the package
# with pdm-build-locked (see pyproject.toml)
run: |
pdm lock --group :all --strategy inherit_metadata
pdm lock --group :all --strategy inherit_metadata --python=">=3.10,<3.12"
pdm lock --group :all --python=">=3.12,<3.13" --append
pdm lock --group :all --python=">=3.13" --append
pdm lock --group :all --python=">=3.9,<3.10" --append
- name: Build package
run: |
uv build
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ jobs:
# Required for building the locked version of the package
# with pdm-build-locked (see pyproject.toml)
run: |
pdm lock --group :all --strategy inherit_metadata
pdm lock --group :all --strategy inherit_metadata --python=">=3.10,<3.12"
pdm lock --group :all --python=">=3.12,<3.13" --append
pdm lock --group :all --python=">=3.13" --append
pdm lock --group :all --python=">=3.9,<3.10" --append
- name: Publish to PyPI
run: |
uv build
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/install-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,39 @@ jobs:
run: |
# Can't run doctests here because the paths are different.
pytest tests -r a -vv tests
- name: Install all AR6 dependencies application
if: contains(matrix.install-target, 'locked')
run: |
pip install 'gcages[ar6-locked]'
- name: Install all AR6 dependencies library
if: "!contains(matrix.install-target, 'locked')"
run: |
pip install 'gcages[ar6]'
- name: Set MAGICC executable environment variable
if: matrix.os == 'ubuntu-latest'
run: |
echo "MAGICC_EXECUTABLE_7=./tests/regression/ar6/ar6-workflow-inputs/magicc-v7.5.3/bin/magicc" >> $GITHUB_ENV
- name: Set MAGICC executable environment variable
if: matrix.os == 'macos-latest'
run: |
echo "MAGICC_EXECUTABLE_7=./tests/regression/ar6/ar6-workflow-inputs/magicc-v7.5.3/bin/magicc-darwin-arm64" >> $GITHUB_ENV
# # Useful if the path appears to have changed
# find / -name 'libgfortran.5.dylib' 2>/dev/null
echo "DYLD_LIBRARY_PATH=/opt/homebrew/lib/gcc/12/" >> $GITHUB_ENV
- name: Set MAGICC executable environment variable
if: matrix.os == 'windows-latest'
run: |
chcp 65001 # set code page to utf-8
echo "MAGICC_EXECUTABLE_7=./tests/regression/ar6/ar6-workflow-inputs/magicc-v7.5.3/bin/magicc.exe" >> $env:GITHUB_ENV
- name: Install distutils
# Workaround needed while cicero-scm uses distutils in openscm-runner,
# see https://github.com/openscm/openscm-runner/blob/261bd177b86a708b0080eed245b6511ebb0051bb/src/openscm_runner/adapters/ciceroscm_adapter/ciceroscm_wrapper.py#L10
if: (matrix.python-version == '3.12') || (matrix.python-version == '3.13')
run: |
pip install setuptools
- name: Run AR6 regression tests
# I can't figure out how to get MAGICC to run in CI,
# see https://github.com/openscm/gcages/issues/36
if: matrix.os != 'windows-latest'
run: |
pytest tests -r a -vv tests/regression/ar6
5 changes: 4 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ jobs:
# Required for building the locked version of the package
# with pdm-build-locked (see pyproject.toml)
run: |
pdm lock --group :all --strategy inherit_metadata
pdm lock --group :all --strategy inherit_metadata --python=">=3.10,<3.12"
pdm lock --group :all --python=">=3.12,<3.13" --append
pdm lock --group :all --python=">=3.13" --append
pdm lock --group :all --python=">=3.9,<3.10" --append
- name: Add version to environment
run: |
PROJECT_VERSION=`sed -ne 's/^version = "\([0-9\.a]*\)"/\1/p' pyproject.toml`
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Binary files
*.feather

# MAGICC
magicc-v7.5.3

Expand Down
4 changes: 4 additions & 0 deletions changelog/45.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- renamed `harmonise_scenario` to `harmonise_single_scenario` in [gcages.ar6.harmonisation][]
- renamed `year` to `harmonisation_year` in [gcages.ar6.harmonisation.harmonise_single_scenario][]
- Renamed `KEY_TESTING_MODEL_SCENARIOS` to `KEY_AR6_TESTING_MODEL_SCENARIOS` in [gcages.testing][]
- added a required `model_scenarios` argument to [gcages.testing.get_key_testing_model_scenario_parameters][gcages.testing.get_key_testing_model_scenario_parameters]
2 changes: 2 additions & 0 deletions changelog/45.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added global-level harmonisation in line with what was used for CMIP7 ScenarioMIP, see [gcages.cmip7_scenariomip.harmonisation][].
Note that this is still being tweaked so will change in future.
2 changes: 2 additions & 0 deletions changelog/46.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added species infilling in line with what was used for CMIP7 ScenarioMIP, see [gcages.cmip7_scenariomip.infilling][].
Note that this is still being tweaked so will change in future.
116 changes: 116 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,122 @@ from the examples given in that link.

<!-- towncrier release notes start -->

## gcages v0.14.0 (2026-02-05)

### 🐛 Bug Fixes

- Fixed Biochar and Soil Carbon Management accounting in the CMIP7 ScenarioMIP pre-processing. Soil carbon removal is now subtracted from `AFOLU|Land|Land Use and Land-Use Change` while biochar from `AFOLU|Land|Other. ([#42](https://github.com/openscm/gcages/pull/42))

### 🔧 Trivial/Internal Changes

- [#41](https://github.com/openscm/gcages/pull/41)


## gcages v0.13.0 (2025-12-02)

### ⚠️ Breaking Changes

- # Additional CDR split

Improved CDR granularity adding the `Biochar` and `Soil Carbon Management` new componentes from the Carbon Removal tree. ([#40](https://github.com/openscm/gcages/pull/40))


## gcages v0.12.0 (2025-10-10)

### ⚠️ Breaking Changes

- Split out the Carbon Removal variable tree in a way that better facilitates downstream spatial downscaling.
This means that we no longer split out `Carbon Removal|Geological Storage|Other Sources` and `Carbon Removal|Geological Storage|Synthetic Fuels`, and have created four new gridding sector components:

- `Other CDR` (based on the emissions tree)
- `Enhanced Weathering`, `Direct Air Capture`, `Ocean` (based on the carbon removal tree)

([#39](https://github.com/openscm/gcages/pull/39))


## gcages v0.11.0 (2025-07-23)

### ⚠️ Breaking Changes

- Updated minimum supported version of scmdata to v0.18.0. As a result, we could also drop the pin of xarray (as scmdata v0.18.0 fixes xarray compatibility issues, see https://github.com/openscm/scmdata/blob/main/docs/source/changelog.md). ([#38](https://github.com/openscm/gcages/pull/38))

### 🔧 Trivial/Internal Changes

- [#38](https://github.com/openscm/gcages/pull/38)


## gcages v0.10.1 (2025-07-17)

### 🐛 Bug Fixes

- Added explicit requirement on importlib-resources for running the AR6 setup as this seems to be needed to make things work on MacOS with Python 3.10 and 3.11 ([#37](https://github.com/openscm/gcages/pull/37))


## gcages v0.10.0 (2025-07-16)

### ⚠️ Breaking Changes

- - Renamed the extra "cmip7_scenariomip" to "cmip7scenariomip"
- Stopped packaging the tests as part of releases (this significantly reduces the size of the distributions)

([#35](https://github.com/openscm/gcages/pull/35))

### 🐛 Bug Fixes

- - Fixed the dependencies required for running the AR6 setup
- Made it possible to run the AR6 setup on windows

([#35](https://github.com/openscm/gcages/pull/35))

### 🔧 Trivial/Internal Changes

- [#35](https://github.com/openscm/gcages/pull/35)


## gcages v0.9.0 (2025-07-16)

### ⚠️ Breaking Changes

- - Changed CMIP7 ScenarioMIP pre-processing. Carbon removal variables are now pre-processed into the Emissions tree, rather than being kept separate as part of the Carbon Removal tree. This greatly simplifies downstream use as all variables are in one tree.
- Updated to requiring pandas-openscm>=0.5.1

([#30](https://github.com/openscm/gcages/pull/30))
- Updated minimum numpy version to 1.26.0, the earliest that is not in end-of-life. Fixed the numpy pin for Python 3.13 to >=2.1.0, the first numpy version which supported Python 3.13. ([#34](https://github.com/openscm/gcages/pull/34))

### 🎉 Improvements

- Added unit conversion support to [gcages.harmonisation.common.assert_harmonised][] ([#33](https://github.com/openscm/gcages/pull/33))

### 🔧 Trivial/Internal Changes

- [#30](https://github.com/openscm/gcages/pull/30), [#31](https://github.com/openscm/gcages/pull/31), [#32](https://github.com/openscm/gcages/pull/32), [#34](https://github.com/openscm/gcages/pull/34)


## gcages v0.8.0 (2025-07-12)

### ⚠️ Breaking Changes

- Reverted the addition of a CO2 AFOLU gridding sector in CMIP7 ScenarioMIP pre-processing. ([#29](https://github.com/openscm/gcages/pull/29))


## gcages v0.7.0 (2025-07-11)

### ⚠️ Breaking Changes

- Managed the removal of subsectors for `Emissions|CO2|AFOLU` tree ([#23](https://github.com/openscm/gcages/pull/23))
- Introduced the handling of the `Carbon Removal` tree ([#25](https://github.com/openscm/gcages/pull/25))

### 🐛 Bug Fixes

- Moved in `Agriculture` input sectors previously accounted in `Agriculture Waste Burning` ([#18](https://github.com/openscm/gcages/pull/18))


## gcages v0.6.1 (2025-07-10)

This release included the changes for the v0.7.0 release,
but was released with the wrong version number.


## gcages v0.6.0 (2025-05-04)

### ⚠️ Breaking Changes
Expand Down
12 changes: 6 additions & 6 deletions docs/how-to-guides/how-to-run-the-ar6-workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
# %% [markdown]
# With this file, we can initialise a harmoniser exactly like that used in AR6.

# %%
# %% editable=true slideshow={"slide_type": ""}
harmoniser = AR6Harmoniser.from_ar6_config(
ar6_historical_emissions_file=AR6_HISTORICAL_EMISSIONS_FILE,
n_processes=None, # run serially for this demo
Expand All @@ -274,17 +274,17 @@
# %% [markdown]
# And harmonise

# %%
# %% editable=true slideshow={"slide_type": ""}
harmonised = harmoniser(pre_processed)
harmonised

# %% [markdown]
# %% [markdown] editable=true slideshow={"slide_type": ""}
# You can see the modification to the pathways
# as a result of the harmonisation in the plot below.
# In scenarios that have more emissions,
# the same idea is applied to all variables.

# %%
# %% editable=true slideshow={"slide_type": ""}
pdf = (
pix.concat(
[
Expand Down Expand Up @@ -353,7 +353,7 @@
# %% [markdown]
# With the infilling databases, we can initialise our infiller.

# %%
# %% editable=true slideshow={"slide_type": ""}
infiller = AR6Infiller.from_ar6_config(
ar6_infilling_db_file=AR6_INFILLING_DB_FILE,
ar6_infilling_db_cfcs_file=AR6_INFILLING_DB_CFCS_FILE,
Expand Down Expand Up @@ -470,7 +470,7 @@
if platform.system() == "Darwin":
if platform.processor() == "arm":
MAGICC_EXE = MAGICC_EXE_PATH / "magicc-darwin-arm64"
os.environ["DYLD_LIBRARY_PATH"] = "/opt/homebrew/opt/gfortran/lib/gcc/current/"
os.environ["DYLD_LIBRARY_PATH"] = "/opt/homebrew/lib/gcc/current/"

elif platform.system() == "Linux":
MAGICC_EXE = MAGICC_EXE_PATH / "magicc"
Expand Down
Loading
Loading