Closed dafyddstephenson closed 1 month ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
ok some stuff got chewed up in the merges but I think we're good to go now, have updated the diffs here
Branched from #74 , do not merge until after merging #74
The initial purpose of this PR was a short refactor of the
exists_locally
attribute to allow the case when a yaml file describing an input dataset existed locally, but the associated netCDF file did not. It kept unspooling from there with no clear finish line.Ultimately, this is a lot of spring cleaning that is going to be necessary for the roms-tools integration. Changes to the user experience are fairly minimal (though have been updated in the example notebook), but what's happening behind the scenes is a lot cleaner and more intuitive, with hopefully all bodges and hacks removed.
closes #25
Summary:
local_path
attribute onInputDataset
andAdditionalCode
toworking_path
to avoid suggesting that the file(s) described by the path exist.InputDataset.get(local_dir)
andAdditionalCode.get(local_dir)
to actually fetch files tolocal_dir
, not a convoluted subdirectory structure of it.Case.setup()
now calls these methods with the required structure as an argument.check_exists_locally
onInputDataset
andAdditionalCode
with a propertyexists_locally
which was not previously possible (and do the same forcheck_is_setup
onCase
,check_local_config_status
onBaseModel
)AdditionalCode
in terms of expected directory/repo layout.subdir
attr/init argument toAdditionalCode
in case the additional code lives in the subdirectory of a remote repository.output_dir
argument toComponent.run()
so it doesn't have to try and figure it out from the additional code directory structure anymore, which was ugly and confusing.