Skip to content

Work around iiasa/ixmp4#272 - #654

Merged
khaeru merged 5 commits into
mainfrom
ci/ixmp4-272
Sep 29, 2026
Merged

khaeru merged 5 commits into
mainfrom
ci/ixmp4-272

Conversation

@khaeru

@khaeru khaeru commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Similar to khaeru/genno#205.

This PR adjusts in the following ways:

  • Add .util.ixmp4.has_ixmp4(), a general-purpose function to check whether ixmp4 is not only installed but also importable without raising an exception; use this instead of similar code in a few places.
  • Add .testing.MARK["ixmp4-importable"] for tests that will fail if ixmp4 is not importable; apply this to some tests. These include tests that import pyam, which always imports ixmp4 and thus triggers SQLAlchemy dependency issue ixmp4#272.

Through the above, we ensure that Pytest can start, load the plugin ixmp.testing, and run tests, even when ixmp4 raises exceptions on import. This means that the scheduled CI runs for ixmp itself should not fail if upstream pyam or ixmp4 break, for whatever reason. However, this in turn means we don't get as clear/obvious signal when such breakage occurs, and will need to keep an eye for it, for instance when merging PRs.

How to review

  • Read the diff and note that the CI checks all pass.

PR checklist

  • Continuous integration checks all ✅
  • Add or expand tests; coverage checks both ✅
  • Add, expand, or update documentation. N/A; CI changes only
  • Update release notes. ditto

@khaeru khaeru added this to the 3.12 milestone Sep 29, 2026
@khaeru khaeru self-assigned this Sep 29, 2026
@khaeru khaeru added the ci Continuous integration label Sep 29, 2026
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.5%. Comparing base (0032b0c) to head (f2f369e).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #654     +/-   ##
=======================================
+ Coverage   98.4%   98.5%   +0.1%     
=======================================
  Files         55      55             
  Lines       6756    6767     +11     
=======================================
+ Hits        6650    6669     +19     
+ Misses       106      98      -8     
Files with missing lines Coverage Δ
ixmp/_config.py 96.3% <100.0%> (+1.7%) ⬆️
ixmp/testing/__init__.py 95.2% <100.0%> (+0.8%) ⬆️
ixmp/testing/data.py 97.5% <100.0%> (-0.1%) ⬇️
ixmp/tests/backend/test_ixmp4.py 100.0% <100.0%> (ø)
ixmp/tests/backend/test_ixmp4_io.py 100.0% <100.0%> (ø)
ixmp/tests/core/test_platform.py 100.0% <100.0%> (ø)
ixmp/tests/report/test_operator.py 100.0% <100.0%> (ø)
ixmp/util/ixmp4.py 100.0% <100.0%> (+2.7%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khaeru
khaeru merged commit 0bc6bd9 into main Sep 29, 2026
22 checks passed
@khaeru
khaeru deleted the ci/ixmp4-272 branch September 29, 2026 17:19
@khaeru khaeru mentioned this pull request Oct 5, 2026
2 tasks done

This branch was successfully deployed

1 active deployment
publish — f2f369ef Deployed Sep 29, 2026 by khaeru via publish #852
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant