oeds: update mastr to english table names from open-mastr - #839
oeds: update mastr to english table names from open-mastr#839maurerle wants to merge 11 commits into
Conversation
PR Reviewer Guide 🔍(Review updated until commit dff9853)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to dff9853
Previous suggestionsSuggestions up to commit 08f2322
|
Assisted-by: gemini-3.5-flash
Assisted-by: gemini-3.5-flash
Assisted-by: gemini-3.5-flash
Ensure postcode queries format values as 5-digit zero-padded strings. This prevents Zone 0 (Eastern Germany) from being excluded by truncating leading zeros. Assisted-by: gemini-3.5-flash
Use LEFT JOIN instead of INNER JOIN with solar_eeg to ensure active PV systems that do not receive EEG payments (e.g. merchant, balcony, direct marketing) are included in the queries. Assisted-by: gemini-3.5-flash
Remove the redundant and unsafe `::int` cast on `Postleitzahl` in hydro and storage queries. This ensures postcode comparison is handled via string matching, allowing PostgreSQL to utilize index scans. Assisted-by: gemini-3.5-flash
Refactor the ownConsumption extraction block in get_solar_systems_in_area so that it parses ownConsumption correctly for all solar types (including ground-mounted arrays) rather than defaulting to 0 for non-rooftop systems. Assisted-by: gemini-3.5-flash
…stems_in_area - Add "Postleitzahl" as "plzCode" to solar units query. - Use numeric 699 instead of "Süd" when coalescing "Hauptausrichtung" to avoid conversion crash. Assisted-by: gemini-3.5-flash
Assisted-by: gemini-3.5-flash
Assisted-by: gemini-3.5-flash
|
Persistent review updated to latest commit dff9853 |
User description
Description
When setting up the OEDS using the latest version of the mastr crawler: https://github.com/open-energy-data-server/open-energy-data-server/blob/main/oeds/crawler/mastr.py
we are now using open-mastr which uses english table names instead of the German default table names.
We therefore need to adjust the crawler as well.
For this, we did rerun the crawler and validated its usage to evaluate the compared renewable timeseries data as well as total generation capacities.
Checklist
docsfolder updates, etc.)Additional Notes (optional)
PR Type
Enhancement, Bug fix
Description
Migrates MaStR queries to open-mastr tables
Adds time-aware asset filtering in loaders
Fixes postcode and solar parsing issues
Updates demand, weather, and static mappings
Diagram Walkthrough
File Walkthrough
loader_oeds.py
Add time-aware OEDS asset loadingassume/scenario/loader_oeds.py
created_beforeandstopped_afterinto biomass, hydro, storage,and conventional plant queries.
redundant
if Truewrapper.startDateandendDate.infrastructure.py
Migrate infrastructure interface to open-mastrassume/scenario/oeds/infrastructure.py
solar_extended,wind_extended,combustion_extended, andstorage_extended.leading zeros.
and solar-storage coordinates.
EEG joins, and battery-linked PV systems.
weathertoecmwfand demand access fromdemandtoego_demand.static.py
Update MaStR static string mappingsassume/scenario/oeds/static.py
mastr_wind_typemappings for onshore and offshore string labels.mastr_solar_codesfrom numeric MaStR codes to open-mastrGerman labels.
mastr_solar_power_limitfactors for PV output limitationhandling.
pyproject.toml
Ignore German MaStR spelling termspyproject.toml
vertikalandunterto thecodespellignored words list.