B2OC: add a wrapper to check process argument
- Add a python wrapper to check the
process
argument is eitherhlt2
orspruce
. - Raise
ConfigurationError
instead ofAssertionError
. - Apply the wrapper to some line builders in
bbaryon_to_cbaryon_hh
To-do:
-
Apply the wrapper to all line builder with assert
inside. This should be done after !1035 (merged) is merged to avoid conflict. -
Remove all @configurable
in line builders
Related to #282 (closed).
cc @abertoli
Merge request reports
Activity
requested review from @abertoli
assigned to @shunan
- Resolved by Eduardo Rodrigues
Very nice to see this, @shunan. The same idea has been in the back of my head for a while ...
I would argue, though, that such a check would be best included in the configurable decorator for everyone, to avoid having every and single user to double decorate any maker function. I can't see a drawback to that. What do you think @rmatev, @poluekt and @mvesteri?
- Resolved by Shunan Zhang
@shunan this is very nice and indeed it would also be very nice to understand if we can get rid of
@configurable
everywhereadded 7 commits
-
21aff6d4...bbd0b310 - 6 commits from branch
b2oc_upgrade
- 078e7ddc - Merge branch 'b2oc_upgrade' into b2oc-shunan-utils
-
21aff6d4...bbd0b310 - 6 commits from branch
added 1 commit
- d36b7d6c - remove configurable wrapper for line builders
added 7 commits
- 0c788a7f - assert cleanup in b_to_dh.py
- ae59132f - assert cleanup in b_to_dhh.py
- 89940882 - assert cleanup in b_to_dhhh.py
- dcd7edef - assert cleanup in b_to_dmunu.py
- ce5948cc - remove all_lines = {} in b_to_dh.py and b_to_dmunu.py, forgotten assert in b_to_dhh.py
- 9bc94e70 - assert cleanup in b_to_cbaryon_hh.py
- fce91f67 - import check_process from utils
Toggle commit listmarked the checklist item Apply the wrapper to all line builder with
assert
inside. This should be done after !1035 (merged) is merged to avoid conflict. as completedmentioned in commit cb864829