Some feedbacks/suggestions/questions looking at esrf-pathlib documentation and repo
By @tvincent
- I truely miss a curated reference doc!
- Convert
get_raw_dataset_path
to a property (raw_dataset_path
) to be consistent with the other fields and pathlib Is it the corresponding path inRAW_DATA
? - Do you plane to also have
processed_data_dataset_path
(any better name welcomed)? - Would be good to also have properties for
raw_data
,processed_data
,nobackup
andscripts
folders - I would avoid
__getattr__
and__dict__
and have explicit fields instead. IMO, the user should not care which schema he is using and the same fields should always be available. The only difference betweenESRFv*Info
looks to bedata_type
. Why shouldn't it always be: data_type: Optional[ Literal["RAW_DATA", "PROCESSED_DATA", "NOBACKUP", "SCRIPTS"] ] = None And have the schema take care of the conversion, eventually raising and exception if not supported (or not caring) - Using explicit arguments in
ESRFPath.from_fields
(data_root
,proposal
, ....) instead of a fields dict would avoid a level of dict and make the method self-documents. - Why exposing
ESRFPath.esrf_info
if all it's fields are exposed inESRFPath
? - Did you consider a bunch of simple helper functions rather than inheritance?