Closed mlincett closed 2 years ago
I think that there was no use case for this previously, and therefore I never separated it out. But if you have one, that's a good enough motivation!
I guess the other question is whether there flarestack__data
creation is overzealous. If there are cases where you do not want to trigger the flaresctack__data
creation, that place where the creation-trigger is done could be changed to a different file or behaviour.
My use case was creating the flarestack catalogue in a script (or notebook) that is not necessarily the same used for setting up the analysis.
On the other hand I see how it is preferable to have the catalogue stored inside flarestack__data
in the first place so it would make sense that the script creating the catalogue is aware of the data dir.
All in all this is not essential, I just still like the idea of dataformat specifications having their own place and not be mixed up with "functional" code :)
The catalogue data type (
cat_dtype
) is currently part ofutils.prepare_catalogue.py
, that in turns imports fromflarestack.shared
, triggering the creation of theflarestack__data
directory tree.I would like to separate the definition of the catalogue data type in a separate module, so that importing
cat_dtype
is independent offlarestack__data
and does not attempt to write to disk.Such module could be called
data_types
and located in a directory of our choice (please advise!)