Skip to content

Conversation

@Tarek98
Copy link

@Tarek98 Tarek98 commented Jan 12, 2026

Issue

Closes #8581

Description

Migrates OPENNEM Production to V4

Preview

  • Passed parser test suite w/ mock API response files
image
  • Passed running print(fetch_production(ZoneKey("AU-NSW"))) in OPENNEM.py
Screenshot from 2026-01-11 18-29-36

Double check

  • I have tested my parser changes locally with poetry run test_parser "zone_key"
  • I have run pnpx prettier@2 --write . and poetry run format in the top level directory to format my changes.

@github-actions github-actions bot added the python Pull requests that update Python code label Jan 12, 2026
@Tarek98 Tarek98 marked this pull request as ready for review January 12, 2026 02:42
@Tarek98 Tarek98 requested a review from a team as a code owner January 12, 2026 02:42
@Tarek98
Copy link
Author

Tarek98 commented Jan 12, 2026

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?
image

cc @VIKTORVAV99

@VIKTORVAV99 VIKTORVAV99 self-requested a review January 14, 2026 07:40
@VIKTORVAV99 VIKTORVAV99 self-assigned this Jan 14, 2026
Copy link
Member

@VIKTORVAV99 VIKTORVAV99 left a 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!

Copy link
Member

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 = {
Copy link
Member

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.")
Copy link
Member

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:
Copy link
Member

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.

@VIKTORVAV99
Copy link
Member

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? image

cc @VIKTORVAV99

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update OPENNEM Production

2 participants