Commit f7e27197 authored by Jose Enrique.Ruiz's avatar Jose Enrique.Ruiz
Browse files

replace hard coded paths in provprocess.py

parent c10998b9
......@@ -501,7 +501,7 @@ def provprocessparsing():
parser = OptionParser(usage=message)
parser.add_option("-p", "--prov", action="store", dest="provfile", default="prov.log",
help="provenance file to process [default prov.log]")
parser.add_option("-c", "--config", action="store", dest="configfile", default = None,
parser.add_option("-c", "--config", action="store", dest="configfile", default="cfg/sequencer.cfg",
help="use specific config file [default cfg/sequencer.cfg]")
# Parse the command line
......@@ -514,6 +514,7 @@ def provprocessparsing():
options.run = args[0]
options.out = args[1]
options.src = opts.provfile
options.configfile = opts.configfile
return options, tag
......
......@@ -40,6 +40,11 @@ def copy_used_file(src, out, tag_handle):
def parse_lines_dl1(prov_lines, out, tag_handle):
"""Process r0 to dl1 provenance info to bundle session at run scope."""
from osa.configs.config import cfg
pathR0 = cfg.get("LST1", "RAWDIR")
pathDL1 = cfg.get("LST1", "ANALYSISDIR")
i = 0
size = 0
working_lines = []
......@@ -59,11 +64,11 @@ def parse_lines_dl1(prov_lines, out, tag_handle):
name = line.get("name", "")
# remove subruns info
if "data/real/R0/" in filepath or used_role == "Observation subrun":
if pathR0 in filepath or used_role == "Observation subrun":
if filepath:
r0filepath_str = filepath
remove = True
if "data/real/DL1/" in filepath or generated_role == "DL1 subrun dataset":
if pathDL1 in filepath or generated_role == "DL1 subrun dataset":
if filepath:
dl1filepath_str = filepath
remove = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment