-
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
Remove cylc submit and cylc jobscript #3653
Conversation
Convert Jobscript Functional Tests to Unit Tests
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.
Quick skim, looks good.
assert (os.path.exists(local_job_file_path)) | ||
size_of_file = os.stat(local_job_file_path).st_size | ||
print(size_of_file) | ||
assert(size_of_file == 1715) |
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.
That's a somewhat strange way to test it!
This is effectively a "known good output" test, so we could just include the "good output", that way when the test breaks you get a diff.
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.
Looks good to me. Impressive work @datamel, to go through all these tests, and update some to unit tests! 👏
Later I think we also need to update the cylc-docs? e.g. https://github.com/cylc/cylc-doc/blob/06beda801367437072cc485a9262efda678f991a/src/user-guide/task-job-submission.rst#task-job-submission-and-management & https://github.com/cylc/cylc-doc/blob/06beda801367437072cc485a9262efda678f991a/src/user-guide/task-implementation.rst#task-job-scripts ? (EDIT: just saw your comment in the pull request issue template, ignore that :-) )
The CLI docs are probably a bit out-of-wack, once we've got the CLI properly implemented we will auto-document the CLI. |
@kinow 's links above do point at references to |
True, though there is something we can do to automate this. We now write cylc configurations in this syntax: You can change this with :cylc:conf:`suite.rc[scheduling]max active cycle points`. If we renamed or removed You can see what the job script looks like using the :command:`cylc jobscript` command. |
This PR also involves rewriting some functional tests as unit tests.
Note, I have not removed all of the functional tests in the
jobscript
directory. I believe the ones I have left are useful functional tests that test jobscript and are more suited to functional tests than unit tests.The functional tests removed have been replaced by unit tests, with the exception of
tests/jobscript/01-multi.t
- this currently relies oncylc jobscript
command and is not suited to unit testing. This is testing thatnamespace_hierarchy
is correctly populated and is covered by other tests.These changes relate to #1249
CONTRIBUTING.md
and added my name as a Code Contributor.