def create_full_runplans(self): table = RunPlanTable() print_banner('CREATING FULL RUNPLAN TABLES') test_campaigns = [str_to_tc(tc) for tc in table.TestCampaigns if tc == self.TestCampaign or self.TestCampaign is None] for tc in test_campaigns: h = HomePage() h.set_file_path(join('BeamTests', tc_to_str(tc), 'RunPlans.html')) h.set_body(table.get_tc_body(tc)) h.create()
def create_runs(dia_scans): table = RunTable() dia = dia_scans[0].Diamond dias = table.Diamonds print_banner('CREATING RUN TABLES FOR {} ({}/{}) in {}'.format(dia, dias.index(dia), len(dias), tc_to_str(dia_scans[0].TestCampaign, short=False))) for dia_scan in dia_scans: if dia_scan.TestCampaign < '201508': continue h = HomePage() h.set_file_path(join(dia_scan.Path, 'index.html')) h.set_body(table.get_body(dia_scan)) h.create()
def create_dias(self): if self.TestCampaign is not None: return table = DiaTable() print_banner('CREATING SINGLE DIAMOND TABLES') diamonds = [dia for dia in table.Diamonds if dia == self.Diamond or self.Diamond is None] table.start_pbar(len(diamonds)) for i, dia in enumerate(diamonds, 1): dia_scans = table.DiaScans.get_diamond_scans(dia) h = HomePage() h.set_file_path(join('Diamonds', dia, 'index.html')) h.set_body(table.get_body(dia_scans)) h.create() table.ProgressBar.update(i) table.ProgressBar.finish()
def create_dia_runplans(self): table = RunPlanTable() print_banner('CREATING DIAMOND RUNPLAN TABLES') diamonds = [dia for dia in table.Diamonds if dia == self.Diamond or self.Diamond is None] test_campaigns = [str_to_tc(tc) for tc in table.TestCampaigns if tc == self.TestCampaign or self.TestCampaign is None] for dia in diamonds: for tc in test_campaigns: dia_scans = table.DiaScans.get_tc_diamond_scans(dia, tc) if not dia_scans: continue # continue if the diamond was not measured during this campaign h = HomePage() h.set_file_path(join(dirname(dia_scans[0].Path), 'index.html')) h.set_body(table.get_dia_body(dia_scans)) h.create() self.create_runs(dia_scans) self.create_picture_pages(dia_scans)