Commit b23cf721 authored by Daniel Morcuende's avatar Daniel Morcuende
Browse files

resolve conflicts

parents 5f465bf0 d823c765
......@@ -12,15 +12,15 @@ before_script:
- conda develop .
testcode:
tags:
- kubernetes
# tags:
# - kubernetes
stage: test
script:
- pytest
deploydocs:
tags:
- kubernetes
# tags:
# - kubernetes
stage: docs
script:
- cd docs && make clean html
......@@ -532,7 +532,7 @@ def setqueuevalues(queue_list, sequence_list):
df_queue = pd.DataFrame.from_dict(queue_list)
# Add column with elapsed seconds of the job run-time to be averaged
if "JobName" in df_queue.columns:
df_queue_filtered = df_queue[df_queue["JobName"].isin(sequences_df["jobname"])]
df_queue_filtered = df_queue[df_queue["JobName"].isin(sequences_df["jobname"])].copy()
df_queue_filtered["DeltaTime"] = df_queue_filtered["CPUTime"].apply(time_to_seconds)
for s in sequence_list:
df_jobname = df_queue_filtered[df_queue_filtered["JobName"] == s.jobname]
......@@ -565,3 +565,4 @@ def setqueuevalues(queue_list, sequence_list):
log.debug(f"Queue attributes for sequence {s.seq} not present in sacct output.")
else:
log.debug("No jobs reported in sacct queue.")
......@@ -85,8 +85,8 @@ def read_nightsummary():
sys.exit(1)
else:
log.error("No night summary file specified")
log.debug(f"Night summary file path: {nightsummary_file}")
log.debug(f"Night summary:\n{stdout}")
log.debug(f"Night summary file path {nightsummary_file}")
log.debug(f"Content \n{stdout}")
return stdout
......
......@@ -8,6 +8,8 @@ from osa.configs import config, options
from osa.configs.config import cfg
from osa.rawcopy.raw import getrawdir
from osa.utils.iofile import appendtofile
from osa.utils.logging import MyFormatter
from osa.utils.standardhandle import output, gettag
log = logging.getLogger(__name__)
......@@ -37,12 +39,14 @@ def header(message):
----------
message
"""
tag = gettag()
framesize = size()
if len(message) < framesize - 2:
prettyframe = int((framesize - 2 - len(message)) / 2) * "="
else:
prettyframe = ""
log.info(f"{prettyframe} {message} {prettyframe}")
# FIXME: should be log.info but it does not work
output(tag, f"{prettyframe} {message} {prettyframe}")
def rule():
......
......@@ -57,7 +57,7 @@ def main():
sequencercliparsing()
if options.verbose:
logging.root.setLevel(logging.DEBUG)
log.setLevel(logging.DEBUG)
else:
log.setLevel(logging.INFO)
......
import os
import logging
from argparse import ArgumentParser
from optparse import OptionParser
......@@ -140,7 +141,7 @@ def closercliparsing():
opts = closer_argparser().parse_args()
# set global variables
options.configfile = opts.configfile
options.configfile = os.path.abspath(opts.configfile)
options.stderr = opts.stderr
options.stdout = opts.stdout
options.date = opts.date
......@@ -821,7 +822,7 @@ def provprocessparsing():
options.run = opts.run
options.date = opts.date
options.prod_id = get_prod_id()
options.configfile = opts.configfile
options.configfile = os.path.abspath(opts.configfile)
options.filter = opts.filter
options.quit = opts.quit
options.lstchain_version = get_lstchain_version()
......
......@@ -68,9 +68,9 @@ def getnightdirectory():
if not exists(directory):
if options.nightsummary and options.tel_id != "ST":
log.error(f"Night directory {directory} does not exists!")
log.error(f"Analysis directory {directory} does not exists!")
elif options.simulate:
log.warning(f"Directory {directory} does not exists")
log.debug(f"SIMULATE the creation of the analysis directory.")
else:
make_directory(directory)
log.debug(f"Analysis directory: {directory}")
......@@ -457,3 +457,4 @@ def date_in_yymmdd(datestring):
mm = "".join(date[4:6])
dd = "".join(date[6:8])
return yy, mm, dd
......@@ -3,8 +3,7 @@
#SBATCH -A dpps
#SBATCH -p short
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=2G
#SBATCH -D=/fefs/aswg/data/real/OSA/DL1DataCheck_LongTerm
#SBATCH --mem-per-cpu=4G
#SBATCH -o slurm_longterm_datacheck_%j.out
#SBATCH -e slurm_longterm_datacheck_%j.err
......@@ -23,6 +22,8 @@ if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
exit 1
fi
# Commented ##SBATCH -D=/fefs/aswg/data/real/OSA/DL1DataCheck_LongTerm
# Make sure tmp directory gets removed even if the script exits abnormally.
trap "exit 1" HUP INT PIPE QUIT TERM
trap 'rm -rf "$WORK_DIR"' EXIT
......@@ -30,7 +31,7 @@ trap 'rm -rf "$WORK_DIR"' EXIT
echo Start copy: `date +%FT%T`
# Copy files month by month: muons files subrun-wise and dl1 datacheck run-wise
# FIXME: loop over months or directories without having to assume any prior month list.
for month in 201911 202001 202002 202006 202007 202008 202009 202010 202011
for month in 201911 202001 202002 202006 202007 202008 202009 202010 202011 202012 202101
do
cp $DL1DIR/${month}*/v0.6.[13]_v05/datacheck_dl1_LST-1.Run?????.h5 $WORK_DIR/.
cp $DL1DIR/${month}*/v0.6.[13]_v05/muons_LST-1.Run*.fits $WORK_DIR/.
......@@ -45,7 +46,8 @@ cd $CURRENT_DIRECTORY
# Copy outcome to final destination
cp $WORK_DIR/longterm_dl1_check.* $OUTPUT_DIR/.
# Copy to datacheck webserver
scp $OUTPUT_DIR/longterm_dl1_check.{h5,html} datacheck:/home/www/html/datacheck/dl1/.
# FIXME: For the moment the copy to datacheck webserver is not working within this script
# It must be done separately.
#scp $OUTPUT_DIR/longterm_dl1_check.{h5,html} datacheck:/home/www/html/datacheck/dl1/.
exit 0
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