-
Notifications
You must be signed in to change notification settings - Fork 6
Move shell out commands into separate library #19
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
base: main
Are you sure you want to change the base?
Changes from 15 commits
1b4368b
de73ecd
f8b0a3a
786900f
7da2a02
da9af7d
bb4667a
9ca9722
baac45d
bf3f823
787b5b5
665b2fa
af43b3c
abe99cd
d3aafae
e3219e0
b5aaefc
49e485d
4a50e2d
ecedc2e
757f378
5afda7e
ca5b95a
8c575a0
04e4a1f
018bc2b
8074de2
19e7e24
4203810
17fb5c9
10a063a
f91f9b9
a1296d3
a125be9
7bb2cf1
25974d2
1191b57
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here I think that where you have replaced |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| #!/usr/bin/env python3 | ||
| ''' | ||
| *****************************COPYRIGHT****************************** | ||
| (C) Crown copyright 2021-2025 Met Office. All rights reserved. | ||
| (C) Crown copyright 2021-2026 Met Office. All rights reserved. | ||
|
|
||
| Use, duplication or disclosure of this code is subject to the restrictions | ||
| as set forth in the licence. If no licence has been raised with this copy | ||
|
|
@@ -11,6 +11,10 @@ | |
|
|
||
| Met Office, FitzRoy Road, Exeter, Devon, EX1 3PB, United Kingdom | ||
| *****************************COPYRIGHT****************************** | ||
|
|
||
| # Some of the content of this file has been produced with the assistance of | ||
| # Claude Sonnet 4.5. | ||
|
|
||
| NAME | ||
| cpmip_xios.py | ||
|
|
||
|
|
@@ -21,6 +25,7 @@ | |
| import shutil | ||
| import sys | ||
| import common | ||
| import shellout | ||
|
|
||
| def data_metrics_setup_nemo(): | ||
| ''' | ||
|
|
@@ -58,8 +63,8 @@ def measure_xios_client_times(timeout=120): | |
| 'xios_client' in i_f and 'out' in i_f] | ||
| total_files = len(files) | ||
| for i_f in files: | ||
| rcode, out = common.exec_subproc_timeout( | ||
| ['grep', 'total time', i_f], timeout) | ||
| rcode, out = shellout._exec_subprocess( | ||
| 'grep "total time" %s' % i_f, timeout) | ||
|
||
| if rcode == 0: | ||
| meas_time = float(out.split()[-2]) | ||
| total_measured += 1 | ||
|
|
||
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.
If you have definitely replace all calls to these functions from drivers code, then by all means remove these methods. rose-stem will be required to check most of these. If you have only replaced a subset then please leave these here, with "Method deprecated in favour of moci_utils.shellout" added to the docstring.