-
Notifications
You must be signed in to change notification settings - Fork 51
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
Service transparency and usability: expected data keys, supported representations, unit tests #817
Service transparency and usability: expected data keys, supported representations, unit tests #817
Conversation
…ected to be present in all containers and some necessary logic in container.py; also modify some services from example configs accordingly
… services (with case distinction in utils.hist)
…param filepaths so they are always found by find_resource
…y expected container keys
…each service) and improve test script summary output
…id populating of data attribute), add GLoBES to list of optional modules, add initialisation examples for several services
…r for xsec.dis_sys; instantiation examples for three data services
…e standalone mode flag and an attribute for the pre-setup data); get hypersurfaces test to work (and ultrasurfaces, but only prelim.); + minor
…ck into instance method, execute calc_mode setter code only when change requested, document
… reps. for several services supporting only binnings, make their tests succeed
… setup-time warning about missing container keys for now
…ip for now; raise exception after completion of service tests with >= 1 failure
…s for data.toy_event_generator for correct inference of flav
…ly complete for now
…rh/pisa-1 into stage_declare_expected_keys
resolves #795 |
These are really welcome changes and improvements to the entire codebase! The PR contains:
|
The formatting changes were done by Thomas manually. So no automatic tool that can screw up our code. |
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.
Ok, sounds reasonable! From my side green light 🚥
draft PR to enhance visibility of foreseen changes (cf. Let each
Stage
transparently declare expected and new container keys upon initialisation #809)main changes to
Stage
base class:expected_container_keys
attribute must be set (no deviation from current behaviour if empty/wrong, but unit test likely to fail)supported_reps
attribute may be set (informs new setters forcalc_mode
andapply_mode
)in_standalone_mode
attribute (when set to True: automatically rerunsetup()
with resetdata
whencalc_mode
is changed, but not when set to False, in which case user must take care to rerun pipeline setup manually, see pisa modes guide notebookservice unit tests:
pisa_tests/test_services.py
, which is modelled afterrun_unit_tests.py
.github/workflows/pythonpackage.yml
(each test needs to pass)init_test
function that returns a test instancecalc_mode
andapply_mode
, then callssetup()
andrun()
resolves Let each
Stage
transparently declare expected and new container keys upon initialisation #809, resolvesContainerSet
's_representation
attribute is not set upon initialisation (possibly related to unuseddata_specs
constructor parameter) #811, resolves Bugs inreco.simple_param
service #814