-
Notifications
You must be signed in to change notification settings - Fork 113
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
Rename 'report', 'util' + miscellaneous clean-ups #500
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
khaeru
added
enh
New features & functionality
docs
Documentation, tutorials, etc.
reporting
Post-processing of model results
labels
Nov 14, 2023
- Rename .report.computations → .report.operator. - Adjust some usage/references.
- Warn about imports from deprecated/old module names. - Preserve backwards-compatible imports downstream.
- Consistent with the rest of the message_ix stack. - Add to DeprecatedPathFinder. - Adjust references to satisfy mypy.
- :class:`Foo` → :class:`.Foo`. - Don't use vague names ("array"). - Type with Literal[...] to make fixed values explicit. - Expand testing.__all__. - Patch outdated references in RELEASE_NOTES for usability. - Update Sphinx configuration: - napoleon_process_types to handle "optional", literals. - napoleon_type_aliases. - nitpick_ignore_regex. - rst_prolog - add :py:`…` role - intersphinx_mapping - add 5 packages. - Miscellaneous others.
khaeru
force-pushed
the
enh/report-2023-W45
branch
from
November 14, 2023 13:24
ee0cde4
to
985398b
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #500 +/- ##
=======================================
+ Coverage 98.5% 98.8% +0.3%
=======================================
Files 42 44 +2
Lines 4554 4747 +193
=======================================
+ Hits 4489 4694 +205
+ Misses 65 53 -12
|
4 tasks
ixmp_source insists on particular idx_sets/idx_names for some MsgScenario items, for instance COST_NODAL. But MsgScenario.initializeVar() fails to initialize the item if *any* idx_sets/idx_names are given—even the correct ones. This change allows Scenario.init_var() to accept the correct values. In this case it silently discards matching values. If non-matching values are given, it raises a Python (rather than Java) exception.
- Add Scenario.item_list(), Scenario.has_item(). - Use these to provide Scenario.*_list(), Scenario.has_*().
khaeru
changed the title
Rename 'report', 'util'; update docs
Rename 'report', 'util' + miscellaneous clean-ups
Nov 16, 2023
Lightly modified from message_data.model.transport.cli.
khaeru
force-pushed
the
enh/report-2023-W45
branch
from
November 16, 2023 15:35
c301fed
to
5f9b1a9
Compare
Use protect_rename_dims fixture.
- This avoids other modules getting a module-specific global also named RENAME_DIMS, that may be out of sync with the common one. - Preserves behaviour downstream in message_ix and message-ix-models. - Absolute imports ("from ixmp.report import common") MUST be used; a relative "from . import common" does not work.
- Checking and sanitizing user input is the task of the front-end. - Consolidate Scenario.init_*() methods, parallel to has_*, *_list.
khaeru
added a commit
to iiasa/message_ix
that referenced
this pull request
Nov 17, 2023
khaeru
added a commit
to iiasa/message_ix
that referenced
this pull request
Nov 17, 2023
khaeru
added a commit
to iiasa/message_ix
that referenced
this pull request
Nov 17, 2023
khaeru
added a commit
to iiasa/message_ix
that referenced
this pull request
Nov 17, 2023
khaeru
force-pushed
the
enh/report-2023-W45
branch
from
November 21, 2023 11:16
4c479f6
to
f743e57
Compare
- Add a context-manager form of .jdbc._raise_jexception.
khaeru
force-pushed
the
enh/report-2023-W45
branch
from
November 21, 2023 11:34
f743e57
to
3f99fc4
Compare
khaeru
added a commit
to iiasa/message-ix-models
that referenced
this pull request
Nov 22, 2023
- Import RENAME_DIMS through a function that provides backwards compatibility. - Use MESSAGE.items and MACRO.items; remove redefinitions. - Simplify simulate_qty() to accept a list of dimensions directly.
khaeru
added a commit
to iiasa/message-ix-models
that referenced
this pull request
Nov 22, 2023
- Import RENAME_DIMS through a function that provides backwards compatibility. - Use MESSAGE.items and MACRO.items; remove redefinitions. - Simplify simulate_qty() to accept a list of dimensions directly.
khaeru
added a commit
to iiasa/message-ix-models
that referenced
this pull request
Nov 22, 2023
- Import RENAME_DIMS through a function that provides backwards compatibility. - Use MESSAGE.items and MACRO.items; remove redefinitions. - Simplify simulate_qty() to accept a list of dimensions directly.
khaeru
added a commit
to iiasa/message-ix-models
that referenced
this pull request
Nov 22, 2023
- Import RENAME_DIMS through a function that provides backwards compatibility. - Use MESSAGE.items and MACRO.items; remove redefinitions. - Simplify simulate_qty() to accept a list of dimensions directly.
khaeru
added a commit
to iiasa/message-ix-models
that referenced
this pull request
Nov 23, 2023
- Import RENAME_DIMS through a function that provides backwards compatibility. - Use MESSAGE.items and MACRO.items; remove redefinitions. - Simplify simulate_qty() to accept a list of dimensions directly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
message-ix-models
andgenno
:ixmp.reporting
→ixmp.report
.reporting.computations
→report.operator
(cf. Change term ‘computations’? khaeru/genno#34, Add an Operator class khaeru/genno#98).ixmp.utils
→ixmp.util
.make SPHINXOPTS="-n" html
... automodule:: ixmp
for the top-level module; this allows other projects to link to:mod:'ixmp'
directly via intersphinx.--no-implicit-optional
#465.Items related to TODOs and FIXMEs in message_ix, message-ix-models, and message_data:
""
cannot be added with Oracle driver (currently in message-ix-models here). Closes Adding dimensionless unit through add_units() leads to an error #425.Miscellaneous housekeeping:
How to review
PR checklist
Add or expand tests;coverage checks both ✅