-
Notifications
You must be signed in to change notification settings - Fork 94
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
Allow src dir in run dir #4861
Allow src dir in run dir #4861
Conversation
I think a test that you can install from a source dir that is inside And perhaps a test that you can't do that if the source dir was itself |
9e624e6
to
55b0f54
Compare
👍 done |
@MetRonnie - I'll merge this, as the last item on the rc3 milestone. Perhaps you can do a quick post-merge sanity check on the two unit tests added in response to your comment though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
(src_dir / WorkflowFiles.FLOW_FILE).touch() | ||
validate_source_dir(src_dir, 'dieter') | ||
# Test that src dir is not allowed to be an installed dir. | ||
src_dir = cylc_run_dir / 'ajay' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hehe, I hope so 🤣
[UPDATE] For the record, this superseded the aborted "support for sub-workflows" PRs #4811 #4821. Allowing source dirs under cylc-run allows proper installation of sub-workflows that belong to a parent workflow; beyond that we're leaving it to external scripts to manage sub-workflow names and run directories. |
This is a (very) small change with no associated issue - it just removes a check on source dir location.
Currently
cylc install
refuses to install a source directory that is located under~/cylc-run
, but I don't think there's a good technical reason for that, is there?? We probably just thought it indicated user CLI error or messy housekeeping practices.Note there's an additional check that a source dir does not contain
_cylc_install
andlog
dirs etc., which should be sufficient for catching the primary CLI error we're presumably trying to catch (i.e. referring to run directory as a source directory).Unfortunately the location check prevents a sub-worfklow source dir installed as part of a main workflow, from being used as the
cylc install
source for sub-workflow instances at run time.Sub-workflow instances can of course be manually installed by simply copying the source from the main workflow run directory each time, but then we don't get the benefits of
cylc install
andcylc reinstall
.With this check disabled, I have everything I need to get (non-nested) sub-workflows working rather nicely, e.g. with the ability to fix and continue a broken sub-workflow or run a new instance of it by re-triggering the main-workflow task - but I'll demo that next week.
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.