Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive refactor in python #13

Open
mnlevy1981 opened this issue Mar 8, 2019 · 0 comments
Open

Massive refactor in python #13

mnlevy1981 opened this issue Mar 8, 2019 · 0 comments

Comments

@mnlevy1981
Copy link
Contributor

I like the schema for the YAML files that describe the analysis to be done (e.g. CORE_vs_JRA.yml) but the python code that parses it (specifically analysis_class.py, data_source_classes.py, and generic_classes.py) all have remnants of previous iterations of the YAML file scattered throughout. I think a top-down rewrite should focus on the following:

  1. better class names (already a ticket via Better names for classes in code #2 and I'll comment on that issue with some thoughts)

  2. AnalysisCategory._open_datasets() should be far slimmer. No need for code like

         if 'climo' in self.operation:
             if 'ann_climo' in self.operation:
                 AnalysisElement.climo = 'ann_climo'
             elif 'mon_climo' in self.operation:
                 AnalysisElement.climo = 'mon_climo'
             else:
                 raise ValueError("'{}' is not a valid operation".format(self.operation))
    

    when we can manage all of that in an Operators class (see how xcollection handles operators for motivation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant