Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## new-data-input #373 +/- ##
==================================================
- Coverage 71.39% 71.38% -0.01%
==================================================
Files 44 44
Lines 5887 5892 +5
Branches 1162 1163 +1
==================================================
+ Hits 4203 4206 +3
- Misses 1364 1367 +3
+ Partials 320 319 -1 ☔ View full report in Codecov by Sentry. |
tsmbland
approved these changes
Jun 26, 2024
alexdewar
approved these changes
Jun 26, 2024
Collaborator
alexdewar
left a comment
There was a problem hiding this comment.
LGTM, modulo a couple of comments.
tests/test_readers.py
Outdated
| "CO2f", | ||
| } | ||
|
|
||
| assert data.sel(year="2020", commodity="electricity", region="R1", timeslice=0) == 1 |
Collaborator
There was a problem hiding this comment.
Why is year a string here?
Comment on lines
+969
to
+970
| - 14.81481, | ||
| abs=1e-4, |
Collaborator
There was a problem hiding this comment.
Can't we just use the default value for abs?
Suggested change
| - 14.81481, | |
| abs=1e-4, | |
| - 14.81481 |
This file contains hidden or 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
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.
Description
This PR adds the data files for the planned changes to the data input (created by @tsmbland) as a new example model and scaffolds several tests that cover the commodities section of the planned data schema (also created by @tsmbland).
It's expected that the test functions will have to be customised slightly based on the different implementations we try but the datastructures they check shouldn't change much.
Putting this against the
new-data-inputbranch in lieu ofdevelopso we have somewhere to collate our experimentation before attempting to put anything intodevelop.Fixes # (issue)
Type of change
Please add a line in the relevant section of
CHANGELOG.md to
document the change (include PR #) - note reverse order of PR #s.
Key checklist
$ python -m pytest$ python -m sphinx -b html docs docs/buildFurther checks