-
Notifications
You must be signed in to change notification settings - Fork 18
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
Refactor parameter checks #251
Conversation
I am still working on adding unit tests. The interesting parts are the classes ConfigChecker, PostprocessingChecker and PreprocessingChecker and the way they are instantiated in preprocessing_runner.py (line 188) and postprocessing_runner.py (line 44). The rest is just (a lot of) cleaning up. |
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.
From what I saw the changes are consistent, looks nice !
Thanks, it seems great. |
None will be loaded as the string 'None', then you have to convert it to Python None when validating the parameters (this is done in |
Yes. Then it means the run() functions of preprocess_runner and postprocess_runner implicitly need parameters that have already been loaded by bcdi. I parse my own dictionaries to these runners. Anyway, problem solved with 'null' (directly converted to None when read by yaml python loader). |
…od does not return anything
Before this modification, parameters check and configuration were all over the place in
bcdi_strain.py
andbcdi_preprocessing_bcdi.py
. Now everything is managed by a single class.Partially related to #146
bcdi.utils.parameters.ConfigChecker
and the child classesbcdi.utils.parameters.PostprocessingChecker
andbcdi.utils.parameters.PreprocessingChecker
to perform the script-dependent configuration of parameters.scan
inbcdi_strain.py
was renamedscans
to match preprocessing terminologysdd
was renameddetector_distance
to match PyNX terminologydata_dir
,save_dir
,specfile_name
,template_imagefile
andreconstruction_file
as lists of stringsType of change
How has this been tested?
Example dataset with a series of 2 scans (post & preprocessing)
Checklist:
doit
and all tasks have passed