-
Notifications
You must be signed in to change notification settings - Fork 11
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
Delete opts after post install #312
Delete opts after post install #312
Conversation
@@ -353,10 +353,3 @@ def broken(): | |||
(tmp_path / 'rose-suite.conf').touch() | |||
with pytest.raises(FileNotFoundError): | |||
rose_fileinstall(srcdir=tmp_path, rundir=tmp_path) | |||
|
|||
|
|||
def test_cylc_no_rose(tmp_path): |
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.
Precisely duplicated test_no_rose_suite_conf_in_devdir
at line 60.
7773d76
to
2278f31
Compare
Removed the runN from the tests
if not args or not args.get('workflow_name', ''): | ||
id_ = test_workflow_name() | ||
args = {'workflow_name': id_} | ||
|
||
args.update({'no_run_name': True}) | ||
options = Options(install_gop(), args)() | ||
output = SimpleNamespace() | ||
output.id = args['workflow_name'] |
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.
FYI, this is going to conflict when merged into master because all the output.ret
, output.exc
, output.out
, etc stuff was stripped in favour of native pytest functionalities.
I think what you've added here mirrors the behaviour on master so should be easy to reconcile.
Lines 175 to 205 in ed485a8
def _cylc_install_cli(test_dir): | |
"""Access the install CLI""" | |
async def _inner(srcpath, workflow_name=None, opts=None): | |
"""Install a workflow. | |
Args: | |
srcpath: | |
The workflow to install | |
workflow_name: | |
The workflow ID prefix to install this workflow as. | |
If you leave this blank, it will use the module/function's | |
test directory as appropriate. | |
opts: | |
Dictionary of arguments for cylc install. | |
""" | |
nonlocal test_dir | |
if not workflow_name: | |
workflow_name = str( | |
(test_dir / str(uuid4())[:4]).relative_to(CYLC_RUN_DIR) | |
) | |
options = Options( | |
install_gop(), opts or {} | |
)(workflow_name=workflow_name) | |
if not options.workflow_name: | |
options.workflow_name = workflow_name | |
if not opts or not opts.get('no_run_name', ''): | |
options.no_run_name = True | |
return await cylc_install(options, str(srcpath)) | |
return _inner |
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
…/cylc-rose into fix.delete_opts_after_post-install * 'fix.delete_opts_after_post-install' of github.com:wxtim/cylc-rose: Update setup.cfg
@wxtim, tests are still failing I'm afraid. |
I think that I've fixed it. I don't like the functional testing I've built, but because I don't anticipate there ever being a need for much functional testing I don't think it's worth building anything better. Cylc Rose should never have needed these tests, and they only demonstrate that it doesn't have functionality it wasn't meant to have. |
1fcb22c
to
032ba65
Compare
032ba65
to
9df1d59
Compare
You seem to have removed the tests you added. At the moment there are no tests added in this PR |
…ter_post-install * upstream/1.3.x: Fix changelog
MetRonnies test fix
773e473
to
101e766
Compare
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.
Couple of small suggestions
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
Closes cylc/cylc-flow#5968 alongside a cylc/cylc-flow#6068.
Additionally closes cylc/cylc-flow#6058, which was caused by an earlier incomplete solution cylc/cylc-flow#5996
Rose variables should be removed from the options object after post install plugin to prevent them being used by any downstream Cylc Scripts.
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.