-
-
Notifications
You must be signed in to change notification settings - Fork 12
Refactor common.py: Added helper function to reduce code duplication #291
Conversation
for more information, see https://pre-commit.ci
Thanks for working on this. Just an FYI there was something that needed fixing on the main branch to get the CI tests passing so you may need to merge those changes from the main branch in first to get the tests passing on here, overall the changes look good but just want to make sure all the tests are passing first |
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #291 +/- ##
==========================================
+ Coverage 76.52% 76.55% +0.02%
==========================================
Files 124 125 +1
Lines 5875 5912 +37
==========================================
+ Hits 4496 4526 +30
- Misses 1379 1386 +7 ☔ View full report in Codecov by Sentry. |
@@ -123,7 +123,6 @@ def __init__(self, filenames: List[str], keys: List[str]): | |||
|
|||
def __iter__(self): | |||
"""Iterate through each filename, loading it, uncombining it, and then yielding it""" | |||
import numpy as np |
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.
@jacobbieker just checking this import of numpy here didn't have some specific use and can be removed?
Tests are passing, nice work :) will approve after the last few small checks, thanks again @roshnaeem! |
@Sukh-P, done. Happy working with you :)) |
Pull Request
Description
Added a helper function to reduce code repetition in
[open_and_return_data_pipes](https://github.com/openclimatefix/ocf_datapipes/blob/main/ocf_datapipes/training/common.py#L40)
.Fixes #279