Skip to content
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

Add timestamps to calculation summary output #1041

Merged
merged 6 commits into from Feb 21, 2013

Conversation

larsbutler
Copy link
Contributor

Addresses https://bugs.launchpad.net/openquake/+bug/1129271

The formatting of calculation and output summaries has changed as well. It's cleaner and more consistent now. For example:

$ bin/openquake  --lhc
calc_id | num_jobs | latest_job_status | last_update | description
1 | 1 | pending | 2013-02-19 09:25:57  | Simple Fault Demo, Classical PSHA
2 | 1 | pending | 2013-02-19 09:26:05  | Simple Fault Demo, Classical PSHA
3 | 1 | failed | 2013-02-19 09:26:06  | Simple Fault Demo, Classical PSHA
4 | 1 | failed | 2013-02-19 09:26:07  | Simple Fault Demo, Classical PSHA
5 | 1 | failed | 2013-02-19 09:26:08  | Simple Fault Demo, Classical PSHA
6 | 1 | failed | 2013-02-19 09:26:09  | Simple Fault Demo, Classical PSHA
7 | 1 | failed | 2013-02-19 09:26:10  | Simple Fault Demo, Classical PSHA
9 | 1 | failed | 2013-02-19 09:26:22  | Simple Fault Demo, Classical PSHA
24 | 1 | successful | 2013-02-19 09:27:16  | Simple Fault Demo, Classical PSHA
10 | 1 | pending | 2013-02-19 09:26:22  | Simple Fault Demo, Classical PSHA
11 | 1 | failed | 2013-02-19 09:26:31  | Simple Fault Demo, Classical PSHA
12 | 1 | successful | 2013-02-19 09:26:32  | Hazard Map test job, 1 realization, no mean/quantile
25 | 1 | successful | 2013-02-19 09:27:28  | Simple Fault Demo, Classical PSHA
$ bin/openquake --lho 75
id | output_type | name
218 | ses | ses-coll-rlz-104
219 | gmf | gmf-rlz-104
220 | ses | ses-coll-rlz-105
221 | gmf | gmf-rlz-105
222 | complete_lt_ses | complete logic tree SES
223 | complete_lt_gmf | complete logic tree GMF
224 | hazard_curve | hazard-curve-rlz-104-SA(0.1)
225 | hazard_curve | hazard-curve-rlz-105-SA(0.1)
226 | hazard_curve | hazard-curve-rlz-104-PGA
227 | hazard_curve | hazard-curve-rlz-105-PGA
228 | hazard_curve | mean curve for SA(0.1)
229 | hazard_curve | quantile curve (poe >= 0.15) for imt SA(0.1)
230 | hazard_curve | quantile curve (poe >= 0.5) for imt SA(0.1)
231 | hazard_curve | quantile curve (poe >= 0.85) for imt SA(0.1)
232 | hazard_curve | mean curve for PGA
233 | hazard_curve | quantile curve (poe >= 0.15) for imt PGA
234 | hazard_curve | quantile curve (poe >= 0.5) for imt PGA
235 | hazard_curve | quantile curve (poe >= 0.85) for imt PGA

Rewrote the --lhc and --lrc output formatting. The timestamp of the latest job
is also included.
Added a docstring to _print_calcs_summary.
Removed some unnecessary print statements.
Cleaned up the --lho and --lro output as well, to be consistent with --lhc and
--lrc.
Added some missing docstrings.
Cleaned up imports and fixed some pep8 warnings.
@@ -472,7 +494,8 @@ def main():
elif args.run_risk is not None:
if args.hazard_output_id is None and args.hazard_calculation_id is None:
complain_and_exit(MISSING_HAZARD_MSG)
log_file = expanduser(args.log_file) if args.log_file is not None else None
log_file = expanduser(args.log_file) \
if args.log_file is not None else None
run_risk(expanduser(args.run_risk), args.log_level, log_file,
args.force_inputs, args.exports,
hazard_output_id=args.hazard_output_id,
Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM

@larsbutler
Copy link
Contributor Author

At the moment, I'm waiting for input from a few of our scientific users to see if they approve of these changes to the interface.

larsbutler added a commit that referenced this pull request Feb 21, 2013
Add timestamps to calculation summary output

[r=micheles] [f=1129271]
@larsbutler larsbutler merged commit faa12c0 into gem:master Feb 21, 2013
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.

None yet

2 participants