Open macflo8 opened 1 month ago
As part of #253, we noticed that the test message_ix_models.tests.model.material.test_build.test_build_bare_res
(added per review requests on #218) is currently the longest-running test in the test suite, e.g.:
============================= slowest 20 durations =============================
1362.11s call message_ix_models/tests/model/material/test_build.py::test_build_bare_res[R12-B-B-False]
323.67s call message_ix_models/tests/model/transport/test_disutility.py::test_disutility
263.82s call message_ix_models/tests/model/water/test_build.py::test_build
110.43s call message_ix_models/tests/model/water/data/test_water_for_ppl.py::test_cool_tec[no_climate]
102.73s call message_ix_models/tests/model/water/data/test_water_for_ppl.py::test_cool_tec[6p0]
93.80s call message_ix_models/tests/tools/costs/test_gdp.py::test_adjust_cost_ratios_with_gdp[materials]
62.39s call message_ix_models/tests/tools/costs/test_projections.py::test_bare_res[R12]
61.54s call message_ix_models/tests/tools/costs/test_gdp.py::test_adjust_cost_ratios_with_gdp[cooling]
—over 22 minutes on one of the macOS jobs.
@glatterf42's suggestion, which I like, is that as this current issue is progressively addressed, this particular test could be moved to a nightly CI job, so that:
This is a tracking issue as a follow-up of adding more tests as one of the improvement items listed in #194.
With #218 the model build of MESSAGEix-Materials has become testable, which significantly raised coverage. @glatterf42 has suggested a few more test cases, which are listed here:
test_build()
test_make_spec()
material-ix
CLI commandsIn addition, the following model workflow parts need tests:
model/report/reporting.py
, refactored version is in development)