Skip to content
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

Issue/pv inputs #225

Merged
merged 42 commits into from
Aug 30, 2023
Merged

Issue/pv inputs #225

merged 42 commits into from
Aug 30, 2023

Conversation

dfulu
Copy link
Member

@dfulu dfulu commented Aug 25, 2023

Pull Request

Description

This pull request grew unfortunately organically. But in essence, boils down to

  • Update functions to load PV training data to be able to use the new ml_id which will be consistent across training and database data. I wanted to move aspects like infilling and filtering out of the main loading function to make this more composable
    • Refactoring the loading function loading had the knock on affect of needing to write new datapipe components to do infilling, and fix/refactor a couple of datapipes that do filtering
  • Remove the OSGB coordinates from PV data - only use lon-lat from now on
    • This had a big knock on affect that meant I had to strip OSGB from other components of the library
  • General refactor - the pull request had me messing with a lot of the library in order to fix knock on effects of my changes. I've also tried to clean up some of the code I touched in the hopes of making it easier to read, and/or more maintainable.

#major

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@dfulu dfulu requested a review from jacobbieker August 25, 2023 14:30
Copy link
Member

@jacobbieker jacobbieker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good to me! Thanks for all this, should make the code a lot more readable and easier to understand, as well as better suited for out of UK work.

Super minor comments, and I might also take a stab at the failing spatial slicing. With all the other tests passing, it seems like your changes shouldn't be incorrect, so am curious as to why that might be happening.

ocf_datapipes/load/pv/pv.py Outdated Show resolved Hide resolved
ocf_datapipes/select/location_picker.py Show resolved Hide resolved
ocf_datapipes/select/select_spatial_slice.py Show resolved Hide resolved
ocf_datapipes/utils/geospatial.py Outdated Show resolved Hide resolved
tests/select/test_select_spatial_slice.py Outdated Show resolved Hide resolved
dfulu and others added 2 commits August 25, 2023 16:14
Co-authored-by: Jacob Bieker <jacob@bieker.tech>
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #225 (19d0816) into main (4a7c7df) will increase coverage by 0.97%.
The diff coverage is 86.05%.

@@            Coverage Diff             @@
##             main     #225      +/-   ##
==========================================
+ Coverage   81.47%   82.45%   +0.97%     
==========================================
  Files         132      125       -7     
  Lines        5690     5402     -288     
==========================================
- Hits         4636     4454     -182     
+ Misses       1054      948     -106     
Files Changed Coverage Δ
ocf_datapipes/convert/numpy/batch/pv.py 100.00% <ø> (ø)
ocf_datapipes/select/__init__.py 100.00% <ø> (ø)
..._datapipes/select/select_pv_systems_on_capacity.py 0.00% <0.00%> (ø)
ocf_datapipes/training/example/gsp_national.py 100.00% <ø> (ø)
ocf_datapipes/training/pseudo_irradience.py 75.00% <ø> (ø)
ocf_datapipes/training/pvnet.py 82.02% <ø> (ø)
ocf_datapipes/transform/numpy/__init__.py 100.00% <ø> (ø)
ocf_datapipes/transform/xarray/create_sun_image.py 85.71% <25.00%> (+4.58%) ⬆️
ocf_datapipes/convert/numpy/pv.py 81.81% <50.00%> (ø)
ocf_datapipes/load/pv/utils.py 92.59% <50.00%> (-2.15%) ⬇️
... and 27 more

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jacobbieker jacobbieker self-requested a review August 30, 2023 15:51
Copy link
Member

@jacobbieker jacobbieker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dfulu dfulu merged commit 2004e2f into main Aug 30, 2023
5 checks passed
This was referenced Oct 27, 2023
@dfulu dfulu deleted the issue/pv_inputs branch December 19, 2023 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants