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
Laboratory name is always used as a path #167
Comments
I've "fixed" it by changing the logic to this: # If no lab path is set, generate a default path
if not self.basepath or not os.path.isabs(self.basepath):
self.basepath = self.get_default_lab_path(config) should I then remove the |
So I'm confused because |
I want to be able to have this:
So when I share this config it will make a |
The code seems to suggest this is possible |
i think it's just not handled, i.e. a bug. Maybe just convert |
This seems equally relevant to |
Seems like this whole block is presuming absolute paths (if that is the problem, still not clear):
maybe save to a temp variable then conditionally convert it to absolute path before saving to |
Either way, I would not recommend calling |
So why does this check even exist? if os.path.isabs(lab_name):
lab_path = lab_name
else:
user_name = config.get('user', default_user)
lab_path = os.path.join(short_path, user_name, lab_name) |
That is literally what I want to do, but am prevented by the code above |
In a way, you can use the way the code currently works to sort of have what @nichannah would like, and make the laboratory local. I know, he doesn't want all the symlinks, but it is 70% of what he wants. What I am suggesting would require something like
to have a local laboratory |
I think what I am suggesting would make it behave the same way as I don't see why |
get_default_lap_path being called. Fixes https://github.com/marshallward/payu/issues/167
Agreed that relative laboratory paths should be supported. Implemented here https://github.com/marshallward/payu/pull/166 Will close this as a result. |
I thought I could set laboratory name, without a path, and that would allow a config to be shared without a hard coded path. I formed that belief based on this code block:
https://github.com/marshallward/payu/blob/master/payu/laboratory.py#L65-L69
That code is never reached, as this logic:
https://github.com/marshallward/payu/blob/master/payu/laboratory.py#L40-L44
means it isn't called, even if laboratory isn't a full path.
The text was updated successfully, but these errors were encountered: