Skip to content

Some feedbacks/suggestions/questions looking at esrf-pathlib documentation and repo

By @tvincent

  1. I truely miss a curated reference doc!
  2. 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 in RAW_DATA?
  3. Do you plane to also have processed_data_dataset_path (any better name welcomed)?
  4. Would be good to also have properties for raw_data, processed_data, nobackup and scripts folders
  5. 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 between ESRFv*Info looks to be data_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)
  6. 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.
  7. Why exposing ESRFPath.esrf_info if all it's fields are exposed in ESRFPath?
  8. Did you consider a bunch of simple helper functions rather than inheritance?