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

Framework introduction #26

Merged
merged 6 commits into from
Jul 12, 2018
Merged

Framework introduction #26

merged 6 commits into from
Jul 12, 2018

Conversation

TonioF
Copy link
Collaborator

@TonioF TonioF commented May 31, 2018

In this branch, I have renamed the class Prior to PriorCreator, and all sub-classes accordingly. A PriorCreator has to implement two methods:

@abstractmethod
def compute_prior_file(self) -> str:
    """
    Might perform some computation, then retrieves the path to a file containing the prior info
    :return:
    """

@classmethod
def get_variable_names(cls) -> List[str]:
    """
    :return: A list of the variables that this prior creator is able to create priors for
    """

compute_prior_file replaces the method formerly known as RetrievePrior, the latter simply returns a list of variable names.
This approach eliminates all explicit mentions of soilmoisture prior or vegetation prior in the prior engine. It has got quite a few renamings, so please check whether you agree with them. Also, it will probably clash with the user_prior branch, so we might want to merge that one first.

@tramsauer
Copy link
Collaborator

triggering a new build via re-opening.
build error seem to be related to: ContinuumIO/anaconda-issues#9449

@tramsauer tramsauer closed this Jun 13, 2018
@tramsauer tramsauer reopened this Jun 13, 2018
@tramsauer
Copy link
Collaborator

I made the get_variable_names method also an @abstractmethod as this should also be mandatory for each new prior_creator. see #31

@tramsauer tramsauer merged commit 32c636e into master Jul 12, 2018
@tramsauer tramsauer deleted the framework_introduction branch July 12, 2018 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants