lstosa 0.10.15__tar.gz → 0.10.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lstosa-0.10.15 → lstosa-0.10.17}/PKG-INFO +1 -1
- {lstosa-0.10.15 → lstosa-0.10.17}/src/lstosa.egg-info/PKG-INFO +1 -1
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/_version.py +2 -2
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/closer.py +12 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/gain_selection.py +11 -2
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/sequencer.py +25 -1
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/tests/test_osa_scripts.py +3 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/workflow/stages.py +13 -6
- {lstosa-0.10.15 → lstosa-0.10.17}/.coveragerc +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/.gitignore +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/.mailmap +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/.pre-commit-config.yaml +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/.readthedocs.yml +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/LICENSE +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/MANIFEST.in +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/README.md +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/codemeta.json +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/crontab/crontab.txt +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/dev/mysql.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/Makefile +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/_static/logo_lstosa.png +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/authors.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/components/index.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/conf.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/configuration.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/contribute.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/documents/index.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/howto/index.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/index.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/introduction/index.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/introduction/reduction_steps_lstchain.png +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/jobs.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/make.bat +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/nightsummary.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/provenance.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/references.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/reports.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/scripts/index.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/troubleshooting/index.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/utils.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/veto.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/workflow/LSTOSA_flow.png +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/docs/workflow/index.rst +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/environment.yml +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/extra/example_sequencer.txt +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/extra/history_files/sequence_LST1_04183.history +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/extra/history_files/sequence_LST1_04183_failed.history +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/extra/history_files/sequence_LST1_04183_oneline.history +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/extra/history_files/sequence_LST1_04185.0010.history +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/extra/sacct_output.csv +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/extra/squeue_output.csv +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/pyproject.toml +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/setup.cfg +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/lstosa.egg-info/SOURCES.txt +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/lstosa.egg-info/dependency_links.txt +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/lstosa.egg-info/entry_points.txt +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/lstosa.egg-info/requires.txt +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/lstosa.egg-info/top_level.txt +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/configs/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/configs/config.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/configs/datamodel.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/configs/options.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/configs/sequencer.cfg +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/conftest.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/high_level/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/high_level/selection_cuts.toml +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/high_level/significance.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/high_level/tests/test_significance.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/job.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/nightsummary/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/nightsummary/database.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/nightsummary/extract.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/nightsummary/nightsummary.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/nightsummary/set_source_coordinates.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/nightsummary/tests/test_database.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/nightsummary/tests/test_extract.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/nightsummary/tests/test_nightsummary.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/nightsummary/tests/test_source_coordinates.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/osadb.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/paths.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/provenance/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/provenance/capture.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/provenance/config/definition.yaml +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/provenance/config/environment.yaml +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/provenance/config/logger.yaml +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/provenance/io.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/provenance/utils.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/raw.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/report.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/autocloser.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/calibration_pipeline.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/copy_datacheck.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/datasequence.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/gainsel_webmaker.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/provprocess.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/reprocess_longterm.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/reprocessing.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/sequencer_webmaker.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/show_run_summary.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/simulate_processing.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/tests/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/scripts/update_source_catalog.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/tests/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/tests/test_jobs.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/tests/test_osa.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/tests/test_osadb.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/tests/test_paths.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/tests/test_raw.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/tests/test_report.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/tests/test_veto.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/utils/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/utils/cliopts.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/utils/iofile.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/utils/logging.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/utils/mail.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/utils/register.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/utils/tests/test_iofile.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/utils/tests/test_utils.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/utils/utils.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/version.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/veto.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/webserver/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/webserver/utils.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/workflow/__init__.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/workflow/dl3.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/workflow/tests/test_dl3.py +0 -0
- {lstosa-0.10.15 → lstosa-0.10.17}/src/osa/workflow/tests/test_stages.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lstosa
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.17
|
|
4
4
|
Summary: Onsite analysis pipeline for the CTA LST-1
|
|
5
5
|
Author: María Láinez, José Enrique Ruiz, Lab Saha, Andrés Baquero, José Luis Contreras, Maximilian Linhoff
|
|
6
6
|
Author-email: Daniel Morcuende <dmorcuen@ucm.es>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lstosa
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.17
|
|
4
4
|
Summary: Onsite analysis pipeline for the CTA LST-1
|
|
5
5
|
Author: María Láinez, José Enrique Ruiz, Lab Saha, Andrés Baquero, José Luis Contreras, Maximilian Linhoff
|
|
6
6
|
Author-email: Daniel Morcuende <dmorcuen@ucm.es>
|
|
@@ -336,6 +336,7 @@ def merge_dl1_datacheck(seq_list) -> List[str]:
|
|
|
336
336
|
|
|
337
337
|
muons_dir = destination_dir("MUON", create_dir=False)
|
|
338
338
|
datacheck_dir = destination_dir("DATACHECK", create_dir=False)
|
|
339
|
+
slurm_account = cfg.get("SLURM", "ACCOUNT")
|
|
339
340
|
|
|
340
341
|
list_job_id = []
|
|
341
342
|
|
|
@@ -344,6 +345,7 @@ def merge_dl1_datacheck(seq_list) -> List[str]:
|
|
|
344
345
|
cmd = [
|
|
345
346
|
"sbatch",
|
|
346
347
|
"--parsable",
|
|
348
|
+
f"--account={slurm_account}",
|
|
347
349
|
"-D",
|
|
348
350
|
options.directory,
|
|
349
351
|
"-o",
|
|
@@ -386,6 +388,7 @@ def extract_provenance(seq_list):
|
|
|
386
388
|
log.info("Extract provenance run wise")
|
|
387
389
|
|
|
388
390
|
nightdir = date_to_dir(options.date)
|
|
391
|
+
slurm_account = cfg.get("SLURM", "ACCOUNT")
|
|
389
392
|
|
|
390
393
|
for sequence in seq_list:
|
|
391
394
|
if sequence.type == "DATA":
|
|
@@ -393,6 +396,7 @@ def extract_provenance(seq_list):
|
|
|
393
396
|
pedcal_run_id = str(sequence.pedcal_run)
|
|
394
397
|
cmd = [
|
|
395
398
|
"sbatch",
|
|
399
|
+
f"--account={slurm_account}",
|
|
396
400
|
"-D",
|
|
397
401
|
options.directory,
|
|
398
402
|
"-o",
|
|
@@ -433,6 +437,7 @@ def merge_files(sequence_list, data_level="DL2"):
|
|
|
433
437
|
|
|
434
438
|
data_dir = destination_dir(data_level, create_dir=False)
|
|
435
439
|
pattern, prefix = get_pattern(data_level)
|
|
440
|
+
slurm_account = cfg.get("SLURM", "ACCOUNT")
|
|
436
441
|
|
|
437
442
|
for sequence in sequence_list:
|
|
438
443
|
if sequence.type == "DATA":
|
|
@@ -440,6 +445,7 @@ def merge_files(sequence_list, data_level="DL2"):
|
|
|
440
445
|
|
|
441
446
|
cmd = [
|
|
442
447
|
"sbatch",
|
|
448
|
+
f"--account={slurm_account}",
|
|
443
449
|
"-D",
|
|
444
450
|
options.directory,
|
|
445
451
|
"-o",
|
|
@@ -467,12 +473,14 @@ def merge_muon_files(sequence_list):
|
|
|
467
473
|
|
|
468
474
|
data_dir = destination_dir("MUON", create_dir=False)
|
|
469
475
|
pattern, prefix = get_pattern("MUON")
|
|
476
|
+
slurm_account = cfg.get("SLURM", "ACCOUNT")
|
|
470
477
|
|
|
471
478
|
for sequence in sequence_list:
|
|
472
479
|
merged_file = Path(data_dir) / f"muons_LST-1.Run{sequence.run:05d}.fits"
|
|
473
480
|
|
|
474
481
|
cmd = [
|
|
475
482
|
"sbatch",
|
|
483
|
+
f"--account={slurm_account}",
|
|
476
484
|
"-D",
|
|
477
485
|
options.directory,
|
|
478
486
|
"-o",
|
|
@@ -499,10 +507,12 @@ def daily_longterm_cmd(parent_job_ids: List[str]) -> List[str]:
|
|
|
499
507
|
muons_dir = destination_dir("MUON", create_dir=False)
|
|
500
508
|
longterm_dir = Path(cfg.get("LST1", "LONGTERM_DIR")) / options.prod_id / nightdir
|
|
501
509
|
longterm_output_file = longterm_dir / f"DL1_datacheck_{nightdir}.h5"
|
|
510
|
+
slurm_account = cfg.get("SLURM", "ACCOUNT")
|
|
502
511
|
|
|
503
512
|
return [
|
|
504
513
|
"sbatch",
|
|
505
514
|
"--parsable",
|
|
515
|
+
f"--account={slurm_account}",
|
|
506
516
|
"-D",
|
|
507
517
|
options.directory,
|
|
508
518
|
"-o",
|
|
@@ -541,10 +551,12 @@ def cherenkov_transparency_cmd(longterm_job_id: str) -> List[str]:
|
|
|
541
551
|
datacheck_dir = destination_dir("DATACHECK", create_dir=False)
|
|
542
552
|
longterm_dir = Path(cfg.get("LST1", "LONGTERM_DIR")) / options.prod_id / nightdir
|
|
543
553
|
longterm_datacheck_file = longterm_dir / f"DL1_datacheck_{nightdir}.h5"
|
|
554
|
+
slurm_account = cfg.get("SLURM", "ACCOUNT")
|
|
544
555
|
|
|
545
556
|
return [
|
|
546
557
|
"sbatch",
|
|
547
558
|
"--parsable",
|
|
559
|
+
f"--account={slurm_account}",
|
|
548
560
|
"-D",
|
|
549
561
|
options.directory,
|
|
550
562
|
"-o",
|
|
@@ -114,6 +114,7 @@ def get_sbatch_script(
|
|
|
114
114
|
):
|
|
115
115
|
"""Build the sbatch job pilot script for running the gain selection."""
|
|
116
116
|
mem_per_job = cfg.get("SLURM", "MEMSIZE_GAINSEL")
|
|
117
|
+
slurm_account = cfg.get("SLURM", "ACCOUNT")
|
|
117
118
|
sbatch_script = dedent(
|
|
118
119
|
f"""\
|
|
119
120
|
#!/bin/bash
|
|
@@ -123,6 +124,7 @@ def get_sbatch_script(
|
|
|
123
124
|
#SBATCH --job-name "gain_selection_{run_id:05d}"
|
|
124
125
|
#SBATCH --partition=short,long
|
|
125
126
|
#SBATCH --mem={mem_per_job}
|
|
127
|
+
#SBATCH --account={slurm_account}
|
|
126
128
|
"""
|
|
127
129
|
)
|
|
128
130
|
|
|
@@ -380,13 +382,20 @@ def GainSel_finished(date: datetime) -> bool:
|
|
|
380
382
|
"""Check if gain selection finished successfully."""
|
|
381
383
|
flagfile = GainSel_flag_file(date)
|
|
382
384
|
return flagfile.exists()
|
|
383
|
-
|
|
385
|
+
|
|
384
386
|
|
|
385
387
|
def check_gainsel_jobs_runwise(date: datetime, run_id: int) -> bool:
|
|
386
388
|
"""Search for failed jobs in the log directory."""
|
|
387
389
|
base_dir = Path(cfg.get("LST1", "BASE"))
|
|
388
390
|
log_dir = base_dir / f"R0G/log/{date_to_dir(date)}"
|
|
389
|
-
history_files = log_dir.glob(f"gain_selection_{run_id:05d}.????.history")
|
|
391
|
+
history_files = list(log_dir.glob(f"gain_selection_{run_id:05d}.????.history"))
|
|
392
|
+
summary_table = run_summary_table(date)
|
|
393
|
+
n_subruns = summary_table[summary_table["run_id"] == run_id]["n_subruns"]
|
|
394
|
+
|
|
395
|
+
if len(history_files) != n_subruns:
|
|
396
|
+
log.debug(f"All history files of run {run_id} were not created yet")
|
|
397
|
+
return False
|
|
398
|
+
|
|
390
399
|
failed_subruns = []
|
|
391
400
|
log.info(f"Checking all history files of run {run_id}")
|
|
392
401
|
|
|
@@ -119,6 +119,11 @@ def single_process(telescope):
|
|
|
119
119
|
log.info(f"Sequencer already finished for date {date_to_iso(options.date)}. Exiting")
|
|
120
120
|
sys.exit(0)
|
|
121
121
|
|
|
122
|
+
elif timeout_in_sequencer(options.date) and not options.force_submit:
|
|
123
|
+
log.info(f"Some jobs of sequencer finished in TIMEOUT for date {date_to_iso(options.date)}."
|
|
124
|
+
" Please relaunch the affected sequences manually.")
|
|
125
|
+
sys.exit(0)
|
|
126
|
+
|
|
122
127
|
# Build the sequences
|
|
123
128
|
sequence_list = build_sequences(options.date)
|
|
124
129
|
|
|
@@ -332,7 +337,7 @@ def is_sequencer_running(date: datetime.datetime) -> bool:
|
|
|
332
337
|
|
|
333
338
|
|
|
334
339
|
def is_sequencer_completed(date: datetime.datetime) -> bool:
|
|
335
|
-
"""Check if the jobs launched by sequencer are
|
|
340
|
+
"""Check if the jobs launched by sequencer are already completed."""
|
|
336
341
|
summary_table = run_summary_table(date)
|
|
337
342
|
data_runs = summary_table[summary_table["run_type"] == "DATA"]
|
|
338
343
|
sacct_output = run_sacct()
|
|
@@ -350,5 +355,24 @@ def is_sequencer_completed(date: datetime.datetime) -> bool:
|
|
|
350
355
|
return True
|
|
351
356
|
|
|
352
357
|
|
|
358
|
+
def timeout_in_sequencer(date: datetime.datetime) -> bool:
|
|
359
|
+
"""Check if any of the jobs launched by sequencer finished in timeout."""
|
|
360
|
+
summary_table = run_summary_table(date)
|
|
361
|
+
data_runs = summary_table[summary_table["run_type"] == "DATA"]
|
|
362
|
+
sacct_output = run_sacct()
|
|
363
|
+
sacct_info = get_sacct_output(sacct_output)
|
|
364
|
+
|
|
365
|
+
for run in data_runs["run_id"]:
|
|
366
|
+
jobs_run = sacct_info[sacct_info["JobName"]==f"LST1_{run:05d}"]
|
|
367
|
+
if len(jobs_run["JobID"].unique())>1:
|
|
368
|
+
last_job_id = sorted(jobs_run["JobID"].unique())[-1]
|
|
369
|
+
jobs_run = sacct_info[sacct_info["JobID"]==last_job_id]
|
|
370
|
+
timeout_jobs = jobs_run[(jobs_run["State"] == "TIMEOUT")]
|
|
371
|
+
if len(timeout_jobs) != 0:
|
|
372
|
+
return True
|
|
373
|
+
|
|
374
|
+
return False
|
|
375
|
+
|
|
376
|
+
|
|
353
377
|
if __name__ == "__main__":
|
|
354
378
|
main()
|
|
@@ -8,6 +8,7 @@ import pytest
|
|
|
8
8
|
import yaml
|
|
9
9
|
|
|
10
10
|
from osa.configs import options
|
|
11
|
+
from osa.configs.config import cfg
|
|
11
12
|
from osa.scripts.closer import is_sequencer_successful, is_finished_check
|
|
12
13
|
|
|
13
14
|
ALL_SCRIPTS = [
|
|
@@ -326,10 +327,12 @@ def test_daily_longterm_cmd():
|
|
|
326
327
|
|
|
327
328
|
job_ids = ["12345", "54321"]
|
|
328
329
|
cmd = daily_longterm_cmd(parent_job_ids=job_ids)
|
|
330
|
+
slurm_account = cfg.get("SLURM", "ACCOUNT")
|
|
329
331
|
|
|
330
332
|
expected_cmd = [
|
|
331
333
|
"sbatch",
|
|
332
334
|
"--parsable",
|
|
335
|
+
f"--account={slurm_account}",
|
|
333
336
|
"-D",
|
|
334
337
|
options.directory,
|
|
335
338
|
"-o",
|
|
@@ -75,15 +75,15 @@ class AnalysisStage:
|
|
|
75
75
|
reproduced in subsequent trials.
|
|
76
76
|
"""
|
|
77
77
|
|
|
78
|
-
if self.command == "
|
|
78
|
+
if self.command == cfg.get("lstchain", "r0_to_dl1"):
|
|
79
79
|
self._remove_dl1a_output()
|
|
80
|
-
elif self.command == "
|
|
80
|
+
elif self.command == cfg.get("lstchain", "dl1ab"):
|
|
81
81
|
self._remove_dl1b_output('dl1_LST-1.Run')
|
|
82
|
-
elif self.command == "
|
|
82
|
+
elif self.command == cfg.get("lstchain", "check_dl1"):
|
|
83
83
|
self._remove_dl1b_output('datacheck_dl1_LST-1.Run')
|
|
84
|
-
elif self.command == "
|
|
84
|
+
elif self.command == cfg.get("lstchain", "charge_calibration"):
|
|
85
85
|
self._remove_calibration()
|
|
86
|
-
elif self.command == "
|
|
86
|
+
elif self.command == cfg.get("lstchain", "drs4_baseline"):
|
|
87
87
|
self._remove_drs4_baseline()
|
|
88
88
|
|
|
89
89
|
def _remove_drs4_baseline(self):
|
|
@@ -121,9 +121,16 @@ class AnalysisStage:
|
|
|
121
121
|
|
|
122
122
|
def _write_checkpoint(self):
|
|
123
123
|
"""Write the checkpoint in the history file."""
|
|
124
|
+
command_to_prod_id = {
|
|
125
|
+
cfg.get("lstchain", "r0_to_dl1"): options.prod_id,
|
|
126
|
+
cfg.get("lstchain", "dl1ab"): options.dl1_prod_id,
|
|
127
|
+
cfg.get("lstchain", "check_dl1"): options.dl1_prod_id,
|
|
128
|
+
cfg.get("lstchain", "dl1_to_dl2"): options.dl2_prod_id
|
|
129
|
+
}
|
|
130
|
+
prod_id = command_to_prod_id.get(self.command)
|
|
124
131
|
history(
|
|
125
132
|
run=self.run,
|
|
126
|
-
prod_id=
|
|
133
|
+
prod_id=prod_id,
|
|
127
134
|
stage=self.command,
|
|
128
135
|
return_code=self.rc,
|
|
129
136
|
history_file=self.history_file,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|