ai2cm / fv3config

Manipulate FV3GFS run directories
Apache License 2.0
1 stars 0 forks source link

Robustly handle custom/built-in options and allow remote downloads #15

Closed oliverwm1 closed 4 years ago

oliverwm1 commented 4 years ago

Closes #10 and #11

This PR will improve the handling of custom configuration options. It introduces a function resolve_option which distinguishes between custom local paths, custom remote (Google storage bucket) paths and built-in tags. This abstracts away logic that was previously repeated in many places. It also adds functionality to download data from a remote path instead of symlinking from a local path.

oliverwm1 commented 4 years ago

This PR is ready for review. Note some functions have no unit tests (specifically link_or_copy_directory, copy_file and gsutil_is_installed in _datastore.py) because they depend on gsutil. This is about 15 simple lines of code. I have verified that all of these work as intended in my own usage.

oliverwm1 commented 4 years ago
  • PR description doesn't include all changes (specifically, enable_restart)

As mentioned in some of my specific replies, the enable_restart functionality was actually introduced in #9. I don't know why it's showing up here, since this code already exists in master. So I think my PR description is complete. I agree docs/tests could be improved for enable_restart, so I added an issue #24.