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 to configuration files #450

Open
aidanheerdegen opened this issue Jun 25, 2024 · 1 comment · May be fixed by #518
Open

Support symbolic links to configuration files #450

aidanheerdegen opened this issue Jun 25, 2024 · 1 comment · May be fixed by #518
Labels

Comments

@aidanheerdegen
Copy link
Collaborator

For ACCESS models it would be convenient to have a number of possible pre-set diagnostic output profiles and use symbolic links to select the desired output profile.

Currently this is not supported correctly with payu. Configuration files are copied into the work directory here

https://github.com/payu-org/payu/blob/master/payu/models/model.py#L234

and

https://github.com/payu-org/payu/blob/master/payu/models/model.py#L239

According to the documentation of the shutil.copy function this will copy a symbolic link rather than the file it points to.

This is undesirable behaviour for payu: if it is a symbolic link we want a copy of the file in work. This can be achieved by adding the follow_symlinks=True option to the copy command.

@jo-basevi
Copy link
Collaborator

I think follow_symlink=True is the default value for shutil.copy? I only noticed it when I was writing a test that would reproduce this bug, and it passed the test with no changes..

@jo-basevi jo-basevi linked a pull request Sep 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants