IMAP-Science-Operations-Center / imap-data-access

Package to download, query, and upload files from the IMAP Science Data Center.
MIT License
0 stars 7 forks source link

Adding filename utility filename #12

Closed maxinelasp closed 4 months ago

maxinelasp commented 4 months ago

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

maxinelasp commented 4 months ago

@greglucas Agreed with your notes, I wanted to open the discussion and see what people thought before adding more stuff here.

maxinelasp commented 4 months ago

@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?

bourque commented 4 months ago

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) ?

maxinelasp commented 4 months ago

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.

tech3371 commented 4 months ago

I haven't given much though but yeah, I like the idea of keeping things that's commonly used in this library.

maxinelasp commented 4 months ago

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

tech3371 commented 4 months ago

@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.