Open
Conversation
Collaborator
There was a problem hiding this comment.
Can you please run ruff over your changes? I do not know what the default settings are in terms of styling but some consistency in the spacing before/after commas and operators would be appreciated.
Unit tests -
- These should be added as a task as part of the "tests" group in rose-stem. At the moment it is not obvious how to run these from the command line, which is necessary for this.
- Either add a top level test.py executable (see examples in
Postprocessing/unittests/test_postprocorCoupled_Drviers/unittests/test.py, or else add anif __name__ == "__main__": unittest.main()tounittests/test_shellout.py - Please change the name of the tested method to remove the
_prefix - Please ensure that all tests pass - there should be one test per path through the code. Testing to check we have an expected failure counts as a pass!
- If possible please assert which exception path we've gone through.
- Either add a top level test.py executable (see examples in
Contributor
Author
|
@ericaneininger hopefully this should be ready to go on now, let me know if there's anything else that is needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Code Reviewer: @ericaneininger
This PR aims to unify shell out commands across MOCI so that they all have the same semantics. The changes involved include adding a separate library to handle shell operations and replacing current shell operations with a newly implemented
exec_subprocessfunction and subsequently also deprecates legacy shell out commands to be redirected to useexec_subprocessinmocilib.closes #12
closes #23
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
readability of the code
Testing
acceptable (eg. kgo changes)
tests, unit tests, etc.)
Test Suite Results - moci - test-mocilib/run2
Suite Information
Task Information
✅ succeeded tasks - 116
Security Considerations
Performance Impact
performance measurements have been conducted
AI Assistance and Attribution
of Generative AI tool name (e.g., Met Office Github Copilot Enterprise,
Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the
Simulation Systems AI policy
(including attribution labels)
Documentation
confirmed that it builds correctly
Code Review