Skip to content

[WIP] Adding abstraction#9

Merged
ehsteve merged 4 commits intomainfrom
abstracting
Oct 28, 2022
Merged

[WIP] Adding abstraction#9
ehsteve merged 4 commits intomainfrom
abstracting

Conversation

@ehsteve
Copy link
Member

@ehsteve ehsteve commented Sep 29, 2022

The purpose of this merge request is to abstract out our instrument and mission names so that other missions could use this. I also was able to optimize some of the code.

This is a work in progress.

@ehsteve ehsteve added the enhancement New feature or request label Sep 29, 2022
@ehsteve ehsteve requested a review from dbarrous September 29, 2022 14:53
@ehsteve
Copy link
Member Author

ehsteve commented Sep 29, 2022

Open tasks

  • Could not figure out how to programmatically import hermes.log
  • Not sure i understand how level upgrade occurs. Looks like data levels are hard coded which is bad practice.

@ehsteve
Copy link
Member Author

ehsteve commented Oct 13, 2022

@dbarrous how do you want to proceed with this PR?

@dbarrous
Copy link
Member

@dbarrous how do you want to proceed with this PR?

@ehsteve I'm currently trying to abstract it a bit more so that we just have a singular vars.py file that we can modify with the mission name, mission package, and instrument name instead.

For the open tasks on the levels, I'm going to import them from the mission package since that makes the most sense, and that way it isn't hard-coded into the processing module. Also still trying to figure out how to import hermes.log programmatically as well.

@ehsteve
Copy link
Member Author

ehsteve commented Oct 17, 2022

I like the idea of hosting the variables in another file but seems like it would more appropriate as a non python file. Maybe a simple csv or a toml or yaml file?

@dbarrous
Copy link
Member

Great idea! ^ I'll put them in a YAML file, and pull from there.

… that parses the yaml and can include any future helper functions. Fix dynamic import of instrument packages. Fix data_levels being hardcoded
… that parses the yaml and can include any future helper functions. Fix dynamic import of instrument packages. Fix data_levels being hardcoded
@ehsteve ehsteve marked this pull request as ready for review October 28, 2022 14:45
@ehsteve ehsteve merged commit 2eb6f10 into main Oct 28, 2022
@ehsteve ehsteve deleted the abstracting branch October 28, 2022 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants