-
Notifications
You must be signed in to change notification settings - Fork 1k
Migrate OPENNEM Production to V4 #8587
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
base: master
Are you sure you want to change the base?
Conversation
|
Should we include these changes in a followup PR?
OR
This is because I noticed OPENNEM_PRODUCTION_CATEGORIES is missing some new electricity sources in the API such as "gas" missing "gas_wcmg" and "solar" missing "solar_thermal": Are these supposed to be added or did we leave them out on purpose? cc @VIKTORVAV99 |
VIKTORVAV99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes!
There are good progress in here but a few things need to be changed or double checked before we can merge this.
Thanks for your work so far!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this file called .json.v3?
v3 is not a valid file extension (at least not for this).
Please change it back to the old name and use file.v4.json for the new ones instead so we get clean diffs and avoid merge conflicts.
| }, | ||
| } | ||
|
|
||
| OPENNEM_PRODUCTION_CATEGORIES = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No added nuclear? As far as I know the API supports it even if it's 0 at the moment.
This should support all values documented here: https://docs.openelectricity.org.au/guides/fueltechs#fueltechs
| is_production = False | ||
| is_storage = True | ||
| else: | ||
| logger.debug(f"Unknown fueltech {fueltech} in result, skipping.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be way to silent, I think we should raise an error instead as we can just backfill the data when it has been fixed.
| logger.debug(f"Unknown fueltech {fueltech} in result, skipping.") | ||
| continue | ||
|
|
||
| if category in IGNORED_FUEL_TECH_KEYS: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be before the debug/warning.
This is part of the feedback I gave. We need to map out all fueltech types to their emaps versions. We should not use the pre grouped versions. |


Issue
Closes #8581
Description
Migrates OPENNEM Production to V4
Preview
print(fetch_production(ZoneKey("AU-NSW")))inOPENNEM.pyAlso ensured running fetch_production with target_datetime parameter works in
OPENNEM.pymain function testTested OPENNEM API v4 production endpoint on Postman: https://cloudy-station-454499.postman.co/workspace/Electricity-Maps-Testing~9bffee22-0b33-40eb-bf73-2c4a20b7ac56/request/6354983-15b4c7ef-08d8-4fa8-97d5-7c187e23c21f?action=share&creator=6354983
Double check
poetry run test_parser "zone_key"pnpx prettier@2 --write .andpoetry run formatin the top level directory to format my changes.