You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, that just raises a KeyError at some point, but given the complex inheritance structure, it's easy to loose track of which keywords are required and which ones are optional.
Ideas:
Compile list of required and optional keywords. This probably needs a class level variable that hold this info.
It can also hold docs - can be added to the class docstring on generate with a metaclass.
The top of every __init__ could have a check that prints the help for missing keywords - a metaclass might help again.
I've heard of "traits" at some point. Need to investigate if that already provides this functionality.
The text was updated successfully, but these errors were encountered:
if photons is empty (I got a "col missing" error, because I processed an empty table, so the process_photons added that column because it was never needed).
if photons is so long / big that memory problems might arise
if there are nans in pos, dir (in other columns, nan might mean "not applicable")?
...
Could put these tests into __call__, so they would run only then and internally I continue to call process_photons. Would miss some warnings, but also save time.
Currently, that just raises a
KeyError
at some point, but given the complex inheritance structure, it's easy to loose track of which keywords are required and which ones are optional.Ideas:
__init__
could have a check that prints the help for missing keywords - a metaclass might help again.I've heard of "traits" at some point. Need to investigate if that already provides this functionality.
The text was updated successfully, but these errors were encountered: