Skip to content

Commit

Permalink
Improving CoTeDe's test selection.
Browse files Browse the repository at this point in the history
There was a conceptual error before. It should be faster now.
  • Loading branch information
castelao committed Apr 9, 2016
1 parent 4b0cf96 commit cf9144e
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions cotede_qc/cotede_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,31 @@ def get_qc(p, config, test):
config != cotede_results[1] or
p.uid() is None):
inputs = Wod4CoTeDe(p)
try:

# If config is a dictionary, use it.
if type(config) is not dict:
try:
# Assumes config as the QC test group, like 'cotede',
# and load only the desired 'test'
pqc = ProfileQC(inputs, cfg=load_cfg(config)[var][test])
# Load config from CoTeDe
cfg = load_cfg(config)

if test == config:
# AutoQC runs only on TEMP, so clean the rest.
for v in cfg.keys():
if v not in ['main', var]:
del(cfg[v])
# If is a specific test,
elif test != config:
# Load from TEMP,
try:
cfg = {var: {test: cfg[var][test]}}
# otherwise load it from main.
except:
cfg = {'main': {test: cfg['main'][test]}}
except:
# In case of a full set, like full GTSPP suite of tests, in
# that case test='overall', or a dictionary
pqc = ProfileQC(inputs, cfg=config)
except:
with open('cotede_qc/qc_cfg/' + config + '.json') as f:
cfg = json.load(f)
pqc = ProfileQC(inputs, cfg=cfg)
with open('cotede_qc/qc_cfg/' + config + '.json') as f:
cfg = json.load(f)

pqc = ProfileQC(inputs, cfg=cfg)

cotede_results = [p.uid(), config, pqc]

Expand Down

0 comments on commit cf9144e

Please sign in to comment.