message_ix_models coexists with the private repository/package currently named
The latter is the location for code related to new research that has not yet been completed and published, data that must remain closed-source permanently, etc.
All other code will be migrated from
Code and data for individual projects will be moved from
message_ix_modelsat a suitable point during the process of publication. (This point may vary from project to project.)
message_datamay be renamed.
This page gives some practices and tips for using the two packages together.
- Always import via
message_ix_models.project.project_nameis imported, and
This module does not actually exist in
Then the code will instead file the respective modules
Even when using code that currently or temporarily lives in
message_data, access it like this:
# Code in message_data/model/mymodelvariant.py from message_ix_models.model import mymodelvariant mymodelvariant.build(...)
This code is future-proof: it will not need adjustment if/when “mymodelvariant” is eventually moved from
- Use the mix-models command-line interface (CLI)
All CLI commands and subcommands defined in
message_dataare also made available through the
message_ix_modelsCLI, the executable mix-models.
Use this program in documentation examples and in scripts. In a similar manner to the point above, these documents and scripts will remain correct if/when code is moved.
- Don’t import from
The open-source code should not depend on any private code. If this appears necessary, the code in
message_datacan probably be moved to
The former have stricter quality standards and are more transparent, which is better for reproducibility.
At some points, similar code may appear in both packages as it is being migrated. In such cases, always import and use the code in
message_ix_models, making any adjustments that are necessary.