Closed maxinelasp closed 4 months ago
@greglucas Agreed with your notes, I wanted to open the discussion and see what people thought before adding more stuff here.
@tech3371 , you wrote most/all of pathhelper, what do you think about moving it here and making it a common utility across sds_data_manager and imap-processing?
Along the same lines of not repeating code across sds-data-manager
& imap_processing
, would this repo be a good place to store stuff like valid instrument names and data levels (i.e. what is listed here) ?
Along the same lines of not repeating code across sds-data-manager & imap_processing, would this repo be a good place to store stuff like valid instrument names and data levels (i.e. what is listed here) ?
I think this makes a lot of sense, especially as it's part of checking a valid file name. It's not super related to data access beyond that... but also it's a minor thing that would be really easy to add here and just reference everywhere, so ... I like that idea.
I haven't given much though but yeah, I like the idea of keeping things that's commonly used in this library.
Since I'm hearing some positive info, I will add some of the filename utilities into this repo and open a more comprehensive code review. Then, we can remove some code from sds-data-manager and imap_processing
@maxinelasp I was going to ask if you could help me improve path_helper.py class. If you could improve it during this movement, I appreciate.
Change Summary
This is a proposal for this data-access repo - that we should move various filename related utilities out of SDS data manager/imap_processing and into this repo. Then it could be imported into both projects without duplicating code or needing to import large sds-data-manager into imap-processing. This could also be used to make additional command line utilities, such as
--validate filename
.Overview
For now, just added a split method to break a file name into multiple components. In the future, I think moving path_helper.py into this project would make sense.
New Dependencies
New Files
file_utils.py