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

Support symbolic links in input files #518

Merged
merged 3 commits into from
Sep 29, 2024

Conversation

jo-basevi
Copy link
Collaborator

This PR:

  • adds a step to model setup to resolve the input directory paths to absolute paths and resolve symlinks.
  • pass follow_symlink=True to copy commands when copying config files. However this is already a default value but I added in so it clear in the code that it's intentional.
  • more tests for the above

In 0daf911, I had just one test that would run payu setup once and test that inputs, configuration files and executables that were set up as expected. In 6d97515, I split up the tests to try(?) make it simpler to read and have one test for one thing. My concern was that it would make running tests slower as were running a payu setup multiple times. It ended up only adding a couple seconds to the tests..

To check how current manifests are changed due to these changes, I ran payu setup for release-1deg_jra55_ryf branch in access-om2-configs(https://github.com/ACCESS-NRI/access-om2-configs/tree/release-1deg_jra55_ryf). One of the full path changes are in input.yaml manifest are:

 work/INPUT/JRA55_MOM1_conserve2nd.nc:
-  fullpath: /g/data/vk83/experiments/inputs/access-om2/remapping_weights/JRA55/global.1deg/2020.05.30/JRA55_MOM1_conserve2nd.nc
+  fullpath: /g/data/vk83/configurations/inputs/access-om2/remapping_weights/JRA55/global.1deg/2020.05.30/JRA55_MOM1_conserve2nd.nc
   hashes:
-    binhash: abe66e4b33cbb75d25c010ea5f96f053
+    binhash: 3ba86d1ae2c7641a29dce1179c55ad64
     md5: 00be8ec0f1126055b65dc68178ce4eb5

(as /g/data/vk83/experiments/ is a symlink for /g/data/vk83/configurations)

Closes #385
Closes #450

@coveralls
Copy link

Coverage Status

coverage: 56.131% (+0.2%) from 55.951%
when pulling 6d97515 on ACCESS-NRI:450-support-symbolic-links
into 68d8482 on payu-org:master.

@jo-basevi jo-basevi self-assigned this Sep 20, 2024
@jo-basevi jo-basevi marked this pull request as ready for review September 20, 2024 05:44
@aidanheerdegen aidanheerdegen self-requested a review September 27, 2024 07:10
Copy link
Collaborator

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@jo-basevi jo-basevi merged commit dc07d40 into payu-org:master Sep 29, 2024
8 checks passed
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.

Support symbolic links to configuration files Support symbolic links in inputs
3 participants