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

Implement config loadig via AttributeDict #12

Open
tramsauer opened this issue Jan 19, 2018 · 0 comments
Open

Implement config loadig via AttributeDict #12

tramsauer opened this issue Jan 19, 2018 · 0 comments
Assignees

Comments

@tramsauer
Copy link
Collaborator

Config file parameter loading with method AttributeDict may be implemented for more readable code.

Read config via:

    def _get_config(self):
        """
        Load configuration from self.config.bb.pre_process()
           writes to self.config.
        """
        with open(self.config, 'r') as cfg:
            self.config = yaml.load(cfg)
            self.config = AttributeDict(**self.config)

and access in our case e.g.:

    self.config.Prior.priors.sm_clim.type
@tramsauer tramsauer self-assigned this Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant