message_ix_models.tests.model.test_bmt
Tests for the BMT workflow (Buildings, Materials, Transport).
Covers workflow steps and build functions in message_ix_models.model.bmt:
- BM built / build_B (buildings), in model.buildings.build
- BMTX built / build_PM (power sector materials), in model.bmt.utils
Coverage notes: - prepare_data_B and build_B: tested with and without materials
(with_materials=False and with_materials=True in test_prepare_data_B_*, test_build_B_runs_with_minimal_data, test_build_B_runs_with_materials).
utils: build_PM (test_build_PM_*), _generate_vetting_csv (test_generate_vetting_csv*).
CLI: bmt group and run subcommand (test_bmt_cli_help, test_bmt_run_dry_run).
Functions
|
BMT context (R12) and buildings config with paths to minimal CSVs. |
|
Like bmt_context but with with_materials=True for build_B materials path. |
|
bmt and bmt run show --help. |
|
bmt run --dry-run TARGET runs workflow in dry-run (writes SVG, no execution). |
|
The BMT workflow includes the 'BM built' step that calls build_B. |
The BMT workflow includes the 'BMTX built' step that calls build_PM. |
|
|
build_PM(context, scenario) runs; skip if scenario lacks inv_cost. |
|
build_PM returns the scenario and skips when input_cap_new already has cement. |
|
_generate_vetting_csv writes CSV of original/modified demand and subtraction. |
|
_generate_vetting_csv handles zero original demand (no div-by-zero). |