Skip to content
Daniel Morcuende edited this page Mar 23, 2023 · 5 revisions

How to

How to run tests locally:

After installing lstosa run pytest --basetemp=test_osa from the root directory of the repository (where setup.py is placed). You can control verbosity with -v, -vv, etc. If you want to execute a given test use -k <test_name> or only some tests from a given subfolder with -m <path_to_subfolder>.

Tests should be self-contained, i.e., everything needed by the tests should be either within the extra subfolder or just produced by the test fixtures. Therefore, they should be able to run in any environment adequately set.

How to resume a job that failed to be launched and holds in the queue waiting for a user action:

The message in the queue output says: launch failed requeued held

             JOBID PARTITION     NAME      USER ST       TIME  NODES NODELIST(REASON) 
        323390_112      long LST1_089 user.name PD       0:00      1 (launch failed requeued held)

This job can be resumed by doing: scontrol release 323390_112

OSA database

How to create an osa database.

sqlite3 /your/path/to/osa.db

Create the processing table:

CREATE TABLE IF NOT EXISTS processing                               
            (telescope, date, prod_id, start, end, is_finished)

How to access processing information in the osa database.

sqlite3 /path/to/osa.db

To see the columns of the processing table:

sqlite> .schema processing
CREATE TABLE processing`
            `(telescope, date, prod_id, start, end, is_finished);

Content of the processing table

sqlite> select * from processing;
LST1|2022-06-05|v0.9|2022-06-09 19:58:03.124332|2022-06-09 21:10:10.637506|1