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

DM-11215 #45

Merged
merged 22 commits into from
Jul 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
820c6e0
Wrap plotting in try/except loops.
wmwv May 15, 2017
ef3ee3d
Plot AMx, AFx with loop.
wmwv May 16, 2017
8d49322
Print our the RuntimeError message for informational value.
wmwv May 16, 2017
c219cd3
Break print_metrics and plot_metrics into separate functions.
wmwv May 16, 2017
27bd2c4
Use more information in Job object for printing and plotting.
wmwv May 16, 2017
b142ac1
Print metrics, then plot.
wmwv May 16, 2017
9787b18
Separate out and use print_pass_fail_summary function.
wmwv May 16, 2017
7742649
Add Cfht Quick JSON file for JSON-loading testing.
wmwv Jul 6, 2017
7bf8ad8
Test printing metrics read-in from JSON.
wmwv Jul 6, 2017
369eb26
Restructuring to read either JSON cache or repo.
wmwv Jul 6, 2017
2eefadb
Load JSON data with Job.from_json
wmwv Jul 10, 2017
fa0780b
Clean up argument passing.
wmwv Jul 10, 2017
fbbabca
Spot-test that JSON-loaded Job has attributes of the right size.
wmwv Jul 10, 2017
cb8b28d
Duplicate JSON vs. repo logic in validate.run and validateDrp.py
wmwv Jul 12, 2017
16aa60e
Move print, plot to validate.run from runOneFilter.
wmwv Jul 12, 2017
8db21c7
Add test to introspect Job to get metric names.
wmwv Jul 12, 2017
80e49c7
Correctly iterate over measurements+metrics in print_metrics and test…
wmwv Jul 12, 2017
878873c
Learn location of test data from __file__.
wmwv Jul 13, 2017
6335914
Add metrics.yaml example to tests.
wmwv Jul 14, 2017
4d8a9b4
Use next() instead of .next() to satisfy py3.
wmwv Jul 17, 2017
1d68ecb
Trivial whitespace linting change.
wmwv Jul 17, 2017
d179ec1
Use os.path.splitext instead of more fragile [-5:]
wmwv Jul 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 20 additions & 17 deletions bin.src/validateDrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,30 +68,33 @@

args = parser.parse_args()

if not os.path.isdir(args.repo):
print("Could not find repo %r" % (args.repo,))
sys.exit(1)
# Should clean up the duplication here between this and validate.run
if args.repo[-5:] == '.json':
load_json = True
else:
load_json = False

kwargs = {}
if args.configFile:
pbStruct = util.loadDataIdsAndParameters(args.configFile)
kwargs = pbStruct.getDict()

kwargs['verbose'] = args.verbose
kwargs['makePlot'] = args.makePlot

if not args.configFile or not pbStruct.dataIds:
kwargs['dataIds'] = util.discoverDataIds(args.repo)
if args.verbose:
print("VISITDATAIDS: ", kwargs['dataIds'])

kwargs['verbose'] = args.verbose
kwargs['level'] = args.level

if not os.path.exists(args.metricsFile):
print('Could not find metric definitions: {0}'.format(args.metricsFile))
sys.exit(1)
metrics = load_metrics(args.metricsFile)
kwargs['metrics'] = metrics
if not load_json:
if args.configFile:
pbStruct = util.loadDataIdsAndParameters(args.configFile)
kwargs = pbStruct.getDict()

if not args.configFile or not pbStruct.dataIds:
kwargs['dataIds'] = util.discoverDataIds(args.repo)
if args.verbose:
print("VISITDATAIDS: ", kwargs['dataIds'])

if not os.path.exists(args.metricsFile):
print('Could not find metric definitions: {0}'.format(args.metricsFile))
sys.exit(1)
metrics = load_metrics(args.metricsFile)
kwargs['metrics'] = metrics

validate.run(args.repo, **kwargs)