Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous enhancements for 2023-W36 #122

Merged
merged 44 commits into from
Sep 12, 2023
Merged

Miscellaneous enhancements for 2023-W36 #122

merged 44 commits into from
Sep 12, 2023

Conversation

khaeru
Copy link
Member

@khaeru khaeru commented Sep 5, 2023

  • New module .project.ssp to:
    • Generate SDMX codelists for the 2017/original SSPs and the 2024 update.
    • Provide these as enums to other code.
  • New module .tools.exo_data to retrieve exogenous data for, for instance, population and GDP.
  • New function .model.emissions.get_emission_factors() and associated data file to provide data from this table in message_doc.
  • New functions in .util.sdmx:
    • read(), write() to retrieve/store package data in SDMX-ML.
    • make_enum() to make pure-Python Enum (or subclass) data structures based on SDMX code lists.
  • same_node(): also fill "node_shares", "node_loc", and "node", as appropriate.
  • Use pre-commit to invoke mypy, black, and ruff; see Use pre-commit to invoke ruff, mypy message_ix#742.

Housekeeping:

  • Revert workaround for Adjust CI for missing codecov #96 in order to reactivate tests for upstream versions 3.4, 3.5, and 3.6.
  • Numerous fixes to Sphinx "nitpicks": warnings about missing references. These are reduced by more than 50%, but many still remain. The -n flag is added to the test docs build in the CI workflow so we can see an up-to-date list of these.

How to review

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

PR checklist

@khaeru khaeru added the enh New features or functionality label Sep 5, 2023
@khaeru khaeru self-assigned this Sep 5, 2023
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #122 (4074c83) into main (7eb2a16) will increase coverage by 2.1%.
The diff coverage is 99.1%.

@@           Coverage Diff           @@
##            main    #122     +/-   ##
=======================================
+ Coverage   67.1%   69.3%   +2.1%     
=======================================
  Files         70      75      +5     
  Lines       4640    4975    +335     
=======================================
+ Hits        3116    3448    +332     
- Misses      1524    1527      +3     
Files Changed Coverage Δ
message_ix_models/cli.py 100.0% <ø> (ø)
message_ix_models/model/bare.py 100.0% <ø> (ø)
message_ix_models/model/disutility.py 100.0% <ø> (ø)
message_ix_models/model/macro.py 100.0% <ø> (ø)
message_ix_models/model/structure.py 100.0% <ø> (ø)
message_ix_models/report/util.py 51.8% <ø> (ø)
message_ix_models/testing.py 100.0% <ø> (ø)
message_ix_models/tests/model/test_bare.py 100.0% <ø> (ø)
message_ix_models/tests/model/test_disutility.py 100.0% <ø> (ø)
message_ix_models/tests/test_cli.py 100.0% <ø> (ø)
... and 27 more

@khaeru khaeru force-pushed the enh/2023-W36 branch 5 times, most recently from 44ff097 to 3c29235 Compare September 8, 2023 21:44
@khaeru khaeru marked this pull request as ready for review September 11, 2023 13:58
- Add "Code quality" job in "pytest" CI workflow.
- Remove "lint" CI workflow.
- Remove flake8, isort configuration.
- Set nitpick_ignore_regex to hide known warnings.
- Set rst_prolog to allow shorter references to common classes.
- Set napoleon_type_aliases, ditto in docstrings.
- Add intersphinx configuration for pint.
- Use a local copy of the message_data inventory, if available.
Sphinx ignores only the former, but will nitpick about the latter.
- Use ReST replacements where possible.
Generate warnings about broken references.
@khaeru khaeru merged commit fba5320 into main Sep 12, 2023
19 checks passed
@khaeru khaeru mentioned this pull request Sep 13, 2023
4 tasks
@khaeru khaeru deleted the enh/2023-W36 branch September 18, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enh New features or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant