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

refactor configs to runtimes #75

Merged
merged 15 commits into from
Jan 25, 2022
Merged

refactor configs to runtimes #75

merged 15 commits into from
Jan 25, 2022

Conversation

jhamman
Copy link
Contributor

@jhamman jhamman commented Jan 21, 2022

No description provided.

@jhamman jhamman requested a review from norlandrhagen January 21, 2022 20:31


class BaseRuntime:
"""Base configuration class that defines abstract methods (storage, run_config and executor) for subclasses."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"""Base runtime class

cmip6_downscaling/workflows/bcsd_flow.py Outdated Show resolved Hide resolved
@norlandrhagen
Copy link
Contributor

Values to move to donfig config.py:

  • connection_string (environment variables can be imported with donfig)
  • cache_paths (intermediate and results)
  • xpersist serializer

@jhamman jhamman mentioned this pull request Jan 25, 2022
4 tasks
Comment on lines +6 to +8
'intermediate': {'uri': '/tmp/flow-outputs/intermediates', 'storage_options': {}},
'results': {'uri': '/tmp/flow-outputs/results', 'storage_options': {}},
'temporary': {'uri': '/tmp/cmip6/temp/', 'storage_options': {}},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #76 for a follow up that will allow more reasonable defaults.

'results': {'uri': '/tmp/flow-outputs/results', 'storage_options': {}},
'temporary': {'uri': '/tmp/cmip6/temp/', 'storage_options': {}},
},
'methods': {'bcsd': {}, 'gard': {}, 'maca': {}},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orianac - anything you think should be added here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'deepsd'?

'storage.results.uri': '/tmp/results',
'storage.temporary.uri': '/tmp/temporary',
}
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #76 for a todo item here (this does not work as desired)

Comment on lines +12 to +13
# cloud_runtime = CloudRuntime()
# assert isinstance(cloud_runtime, BaseRuntime)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to find a way to mock this runtime. Added a todo in #76

@jhamman jhamman merged commit f81482b into main Jan 25, 2022
@jhamman jhamman deleted the feature/runtimes branch January 25, 2022 17:30
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

Successfully merging this pull request may close these issues.

3 participants