def _get_analysis_from_source(self, rid): if rid.count('-') > 1: args = rid.split('-') step = None lan = '-'.join(args[:-1]) aliquot = args[-1] else: lan, aliquot, step = strip_runid(rid) lan = convert_identifier_to_int(lan) db = self.source.db dban = db.get_unique_analysis(lan, aliquot, step) return dban
def _get_analysis_from_source(self, rid): if rid.count('-')>1: args=rid.split('-') step=None lan='-'.join(args[:-1]) aliquot=args[-1] else: lan, aliquot, step = strip_runid(rid) lan = convert_identifier_to_int(lan) db = self.source.db dban = db.get_unique_analysis(lan, aliquot, step) return dban
def _map_paths(self, repo, src, dst): root = os.path.join(paths.repository_dataset_dir, repo) ps = [] def debug(msg, a, b): self.debug('{:<20s} {:<35s} >> {}'.format(msg, os.path.relpath(a, root), os.path.relpath(b, root))) sp = analysis_path(src, repo) dp = analysis_path(dst, repo, mode='w') ps.append(sp) ps.append(dp) if not os.path.isfile(sp): self.warning('not a file {}'.format(sp)) return dl, da, ds = strip_runid(dst) jd = dvc_load(sp) jd['identifier'] = dl jd['aliquot'] = da jd['increment'] = alpha_to_int(ds) dvc_dump(jd, dp) debug('----------', sp, dp) for modifier in ('baselines', 'blanks', 'extraction', 'intercepts', 'icfactors', 'peakcenter', '.data'): sp = analysis_path(src, repo, modifier=modifier) dp = analysis_path(dst, repo, modifier=modifier, mode='w') if sp and os.path.isfile(sp): debug('{:<20s}'.format(modifier), sp, dp) ps.append(sp) ps.append(dp) shutil.move(sp, dp) return ps
def _assemble_runids(self, d): rids = d['runids'] return [strip_runid(r) for r in rids]
def _assemble_runids(self, d): rids = d['runids'] return [strip_runid(r) for r in rids]