-
Notifications
You must be signed in to change notification settings - Fork 272
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
TableLoader #1771
TableLoader #1771
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1771 +/- ##
==========================================
+ Coverage 91.80% 91.84% +0.03%
==========================================
Files 188 190 +2
Lines 14910 15237 +327
==========================================
+ Hits 13688 13994 +306
- Misses 1222 1243 +21
Continue to review full report at Codecov.
|
UpdatesI have improved the current PR with
(Current) Caveats
TODO
|
Ok, I came finally around to doing this. I think the code is much cleaner now, especially by itroducing the There are now only three public methods:
The latter two support the use cases of the previous many functions by having this |
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.
Look good! Much simpler, and works in all my use cases.
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.
There are a lot of codacy complaints. Some are false positives, some are minor issues. I dont see any of them as severe, but want to bring up the topic before approving.
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.
I somehow missed all the codacy complaints. I agree with @LukasNickel that most are minor, but a few should be addressed. It would be good to at least:
- document
get_structure
(it is a public function, exported from the module in__all__
, and is really not clear at all what it does from the name) - document
read_subarray_events
- probably want a
# pylint: disable= protected-access
at the top of any files that uses low-level hdf5 commands (like_v_*
, which give false-positive warnings) - don't use the variable name
tables
(used a few times), since it shadows thetables
module, and that could lead to bugs in the future - either disable the warning, or document each test with at least a few words about what the test does: e.g.
def test_read_subarray_events(test_file_dl2):
""" check that we get some expected columns when reading a file with DL2 """
- It's not clear to my why we suddenly are getting
redefined-outer-name
warnings in the tests - also not sure why we get a
List[TelescopeDescription] is not iterable
warning here: (aren't lists iterable?)
valid_tel_types = {str(tel_type) for tel_type in self.telescope_types}
Edit: it's a @lazyproperty, so I guess that gives a false positive, since it looks like a function to the linter
@kosack I think I addressed most/all relevant codacy issues |
Ok, now the docs should be fixed as well, at least with regard to table loader and processor tool, for the rest I opened #1786 |
@@ -425,6 +425,7 @@ good-names=i, | |||
x, | |||
y, | |||
n, | |||
f, |
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.
The indentation seems off here, tab vs spaces?
I adapted this from the class in the dl1 benchmarks workshop, but changed the structure a bit.
I added options for what to load and for now a single method
load_telescope_events(tel_id)
to read / join all needed columns for one telescope.Methods to come:
Needs #1769