Skip to content

Make splitting job and test files optional#1064

Merged
bgruening merged 1 commit intogalaxyproject:masterfrom
jmchilton:keep_job_and_test_in_one_file
Aug 5, 2020
Merged

Make splitting job and test files optional#1064
bgruening merged 1 commit intogalaxyproject:masterfrom
jmchilton:keep_job_and_test_in_one_file

Conversation

@jmchilton
Copy link
Member

I think that makes writing tests easier and I think @bgruening agrees (galaxyproject/training-material#2021 (comment))

if split_test:
job_output = new_workflow_associated_path(workflow_path, suffix="job1")
if not can_write_to_path(job_output, **kwds):
ctx.exit(1)
Copy link
Member

Choose a reason for hiding this comment

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

Does that print some information about why this failed ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think so:

error("%s already exists, exiting." % path)

Copy link
Member Author

Choose a reason for hiding this comment

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

It'd be good to also check the directory exists and is writable... but yeah...

@bgruening
Copy link
Member

Indeed, I think as the default behavior this is better. For power users, the split one is probably best. I like it! Thanks both!

@bgruening bgruening merged commit 8f3f706 into galaxyproject:master Aug 5, 2020
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.

3 participants