Argument processing needs refactoring
The treatment applied to the command line arguments is not necessary very clear (it also needs more forward doc), and hidden in lib/__init__.py
AND lib/data/__init__.py
.
The treatment is not easy to apply to any function, mostly because of a clear lack of documentation of functions in lib/data/__init__.py
, and because the code therein is scary.
Also, current implementation hiccups when calling lib.data.<dataset>.get_filename()
with a kwargs corresponding to the ARGS
constant of that dataset (but other than a fix), get_data_args()
logs that it is not in the matchers names, which it shouldn't.
A simple fix is to use a dict instead (get_filename(dict(region='any'))
). But this is an annoying hack.
Suggestion: argument processing and management might be better off independant from the rest of the project, ie reimplemented as a separate package.