Skip to content

Commit a3123f3

Browse files
committed
fix: use thyme everywhere
1 parent 33507ae commit a3123f3

15 files changed

Lines changed: 75 additions & 77 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
run: ls *.tar.zst | xargs -I{} tar xavf {}
100100
- run: tree
101101
- name: run monitoring
102-
run: bin/run-monitoring.sh -d ${{env.dataset}} --findhipo --series --focus-${{matrix.type}} validation_files
102+
run: thyme histogram -d ${{env.dataset}} --findhipo --series --focus-${{matrix.type}} validation_files
103103
- run: tree slurm
104104
- run: tree outfiles
105105
- uses: actions/upload-artifact@v4
@@ -160,8 +160,8 @@ jobs:
160160
fail-fast: false
161161
matrix:
162162
include:
163-
- { type: detectors, args: '-n 4 --skip-mya' }
164-
- { type: physics, args: '' }
163+
- { type: detectors, run_script: 'bin/thyme analysis', args: '-n 4 --skip-mya' }
164+
- { type: physics, run_script: 'bin/run-physics-timelines.sh', args: '' }
165165
steps:
166166
- uses: actions/checkout@v4
167167
- name: download outfiles
@@ -178,7 +178,7 @@ jobs:
178178
run: ls *.tar.zst | xargs -I{} tar xavf {}
179179
- run: tree
180180
- name: run timelines
181-
run: bin/run-${{matrix.type}}-timelines.sh -d ${{env.dataset}} ${{matrix.args}}
181+
run: ${{matrix.run_script}} -d ${{env.dataset}} ${{matrix.args}}
182182
- run: tree outfiles
183183
- uses: actions/upload-artifact@v4
184184
with:
@@ -219,7 +219,7 @@ jobs:
219219
tree outfiles | xargs -0 -I{} echo {} >> $GITHUB_STEP_SUMMARY
220220
echo '```' >> $GITHUB_STEP_SUMMARY
221221
- name: deploy
222-
run: bin/deploy-timelines.sh -d ${{env.dataset}} -c -t web
222+
run: thyme deploy -d ${{env.dataset}} -c -t web
223223
- uses: actions/upload-artifact@v4
224224
with:
225225
name: web

data/metadata/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Metadata JSON files
22

3-
These files are used by `deploy-timelines.sh` to provide run filter controls on the front-end webpage.
3+
These files are used by `thyme deploy` to provide run filter controls on the front-end webpage.

doc/chef_guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Output files will appear in your chosen output directory, within `hist/detectors
1717
## :green_circle: Step 2: Make the timelines
1818

1919
```bash
20-
run-detectors-timelines.sh -d $dataset -i $out_dir/hist/detectors
20+
thyme analysis -d $dataset -i $out_dir/hist/detectors
2121
```
2222
where `$out_dir` is your output directory from **Step 1** and `$dataset` is a unique name for this cook, _e.g._, `rga_v1.23`.
2323

@@ -26,7 +26,7 @@ Output will appear in `./outfiles/$dataset/`.
2626
## :green_circle: Step 3: Deploy the timelines
2727

2828
```bash
29-
deploy-timelines.sh -d $dataset -t $target_dir -D
29+
thyme deploy -d $dataset -t $target_dir -D
3030
```
3131
where `$target_dir` is a subdirectory of `/group/clas/www/clas12mon/html/hipo`, for example,
3232
```bash

doc/dev_notes.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ flowchart TB
1212
dst[(Input HIPO Files)]:::data
1313
1414
subgraph Data Monitoring
15-
subgraph "<strong>bin/run-monitoring.sh</strong>"
15+
subgraph "<strong>bin/thyme histogram</strong>"
1616
monitorDetectors["<strong>Make detector histograms</strong><br/>org.jlab.clas.timeline.histograms.run_histograms"]:::proc
1717
monitorPhysics["<strong>Make physics QA histograms</strong><br/>qa-physics/: monitorRead.groovy"]:::proc
1818
end
@@ -27,7 +27,7 @@ flowchart TB
2727
monitorPhysics --> outmon
2828
2929
subgraph Timeline Production
30-
subgraph "<strong>bin/run-detectors-timelines.sh</strong>"
30+
subgraph "<strong>bin/thyme analysis</strong>"
3131
timelineDetectorsPreQA["<strong>Make detector timelines</strong><br/>org.jlab.clas.timeline.analysis.run_analysis"]:::proc
3232
outTimelineDetectorsPreQA{{outfiles/$dataset/timeline_web_preQA/$detector/*.hipo}}:::timeline
3333
timelineDetectors["<strong>Draw QA lines</strong><br/>qa-detectors/: applyBounds.groovy"]:::proc
@@ -39,7 +39,7 @@ flowchart TB
3939
subgraph Final Timelines
4040
outTimelinePhysics{{outfiles/$dataset/timeline_web/phys_*/*}}:::timeline
4141
outTimelineDetectors{{outfiles/$dataset/timeline_web/$detector/*.hipo}}:::timeline
42-
deploy["<strong>Deployment</strong><br/>bin/deploy-timelines.sh"]:::proc
42+
deploy["<strong>Deployment</strong><br/>thyme deploy"]:::proc
4343
timelineDir{{timelines on web server}}:::timeline
4444
end
4545
outplots --> timelineDetectorsPreQA --> outTimelineDetectorsPreQA --> timelineDetectors --> outTimelineDetectors
@@ -69,7 +69,7 @@ Temporary files are additionally stored in `tmp/`, including backups (for the ca
6969
outfiles
7070
└── $dataset
7171
72-
   ├── timeline_detectors # histograms, etc. for detector timelines, from `bin/run-monitoring.sh`
72+
   ├── timeline_detectors # histograms, etc. for detector timelines, from `bin/thyme histogram`
7373
   │ │
7474
   │ ├── 5000 # for run number 5000
7575
│ │   ├── out_HTCC_5000.hipo
@@ -79,7 +79,7 @@ outfiles
7979
   │ ├── 5001 # for run number 5001
8080
│ └── ...
8181
82-
   ├── timeline_physics # histograms, etc. for physics timelines, from `bin/run-monitoring.sh`
82+
   ├── timeline_physics # histograms, etc. for physics timelines, from `bin/thyme histogram`
8383
   │ │
8484
   │ ├── 5000 # for run number 5000
8585
│ │   ├── data_table_5000.dat
@@ -105,25 +105,25 @@ outfiles
105105
106106
   ├── timeline_web # final output timeline files, for deployment to web server
107107
│ │
108-
│ ├── htcc # detector timelines, with QA, from `bin/run-detectors-timelines.sh`
108+
│ ├── htcc # detector timelines, with QA, from `bin/thyme analysis`
109109
│ ├── ltcc
110110
│ ├── ...
111111
│ │
112112
│ ├── phys_qa # physics timelines, with QA, from `bin/run-physics-timelines.sh`
113113
│ ├── phys_qa_extra # extra physics QA timelines, for experts
114114
│ └── qadb # QADB results timeline
115115
116-
   └── log # log files from `bin/run-*-timelines.sh` (not slurm logs (/farm_out/$LOGNAME/))
116+
   └── log # log files from `bin/thyme analysis` (not slurm logs (/farm_out/$LOGNAME/))
117117
   ├── $timeline.out
118118
└── $timeline.err
119119
```
120120

121121
# Notes on SWIF Workflows
122122

123-
For [CLAS12 `swif` workflow](https://github.com/baltzell/clas12-workflow) integration, the `bin/run-monitoring.sh` script (which normally generates `slurm` jobs) has a specific mode `--swifjob`:
123+
For [CLAS12 `swif` workflow](https://github.com/baltzell/clas12-workflow) integration, the `bin/thyme histogram` command (which normally generates `slurm` jobs) has a specific mode `--swifjob`:
124124
```bash
125-
bin/run-monitoring.sh --swifjob --focus-detectors # generate files for detector timelines
126-
bin/run-monitoring.sh --swifjob --focus-physics # generate files for physics QA timelines
125+
thyme histogram --swifjob --focus-detectors # generate files for detector timelines
126+
thyme histogram --swifjob --focus-physics # generate files for physics QA timelines
127127
```
128128
Either or both of these commands is _all_ that needs to be executed on a runner node, within [`clas12-workflow`](https://github.com/baltzell/clas12-workflow); calling one of these will automatically run the wrapped code, with the following assumptions and conventions:
129129
- input HIPO files are at `./` and only a single run will be processed
@@ -149,7 +149,7 @@ top_level_target_directory
149149
150150
└── ...
151151
```
152-
For compatibility with the file tree expected by downstream `bin/run-*-timelines.sh` scripts (see above), symbolic links may be made to these `timeline_{detectors,physics}` directories, but this is not required since these scripts also allow for the specification of an input directory.
152+
For compatibility with the file tree expected by downstream `thyme analysis` (see above), symbolic links may be made to these `timeline_{detectors,physics}` directories, but this is not required since these scripts also allow for the specification of an input directory.
153153

154154
Separate `--focus-detectors` and `--focus-physics` options are preferred, since:
155155
- offers better organization of the contract data between `swif` jobs and downstream scripts

doc/procedure.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ This step reads input HIPO files (_e.g._, DST or `mon` files) and produces histo
1515

1616
This step can either be run during the usual data cooking procedure, using [`clas12-workflow`](https://github.com/baltzell/clas12-workflow) (see its usage guide), or it may be run separately on already-cooked data using:
1717
```bash
18-
bin/run-monitoring.sh
18+
thyme histogram
1919
```
2020
Running it with no arguments will print the usage guide; use the `--help` option for more detailed guidance.
2121

2222
> [!NOTE]
23-
> If you are performing physics QA for QADB, consider using [**prescaled trains**](/qa-physics/prescaler) (and `run-monitoring.sh` will need the `--flatdir` argument)
23+
> If you are performing physics QA for QADB, consider using [**prescaled trains**](/qa-physics/prescaler) (and `thyme histogram` will need the `--flatdir` argument)
2424
2525
### Example
26-
If using `clas12-workflow`, see it's documentation; otherwise if using `run-monitoring.sh`:
26+
If using `clas12-workflow`, see it's documentation; otherwise if using `thyme histogram`:
2727
```bash
28-
bin/run-monitoring.sh -d rga_sp19_v5 /volatile/clas12/rg-a/production/pass0/sp19/v5/mon
28+
thyme histogram -d rga_sp19_v5 /volatile/clas12/rg-a/production/pass0/sp19/v5/mon
2929
```
3030
- sets the `dataset` name to `"rga_sp19_v5"`, which will be referenced in subsequent steps
3131
- assumes the input data are found in `/volatile/clas12/rg-a/production/pass0/sp19/v5/mon`
@@ -36,7 +36,7 @@ sbatch ./slurm/job.rga_sp19_v5.detectors.slurm # for detector timelines (need
3636
sbatch ./slurm/job.rga_sp19_v5.physics.slurm # for physics timelines
3737
```
3838
- monitor progress with Slurm tools (e.g., `squeue -u $LOGNAME`)
39-
- monitor output logs in `/farm_out/$LOGNAME/` or use `bin/error-print.sh`
39+
- monitor output logs in `/farm_out/$LOGNAME/` or use `thyme error`
4040

4141
> [!NOTE]
4242
> - data monitoring for detector timelines is handled by the [`org.jlab.clas.timeline.histograms` package](/src/main/java/org/jlab/clas/timeline/histograms)
@@ -48,8 +48,8 @@ sbatch ./slurm/job.rga_sp19_v5.physics.slurm # for physics timelines
4848
After Step 1 is complete, run the following Step 2 scripts to produce the timeline HIPO files and to run the automatic QA procedures. There is one script for each timeline type: run them with no arguments to print the usage guides:
4949

5050
```bash
51-
bin/run-detectors-timelines.sh
52-
bin/run-physics-timelines.sh
51+
thyme analysis # for detector timelines
52+
run-physics-timelines.sh # for physics timelines (will eventually be combined with 'thyme analysis')
5353
```
5454

5555
> [!IMPORTANT]
@@ -58,18 +58,16 @@ bin/run-physics-timelines.sh
5858
> - use the scripts' `-o` option to set the output locations
5959
6060
### Example
61-
**If** you used `clas12-workflow` for Step 1:
61+
**If** you used `clas12-workflow` for Step 1, the script arguments should be
6262
```bash
63-
bin/run-detectors-timelines.sh -d rga_sp19_v5 -i /path/to/output/files # for detector timelines
64-
bin/run-physics-timelines.sh -d rga_sp19_v5 -i /path/to/output/files # for physics timelines
63+
-d rga_sp19_v5 -i /path/to/output/files
6564
```
6665
- the dataset is _given_ the name `"rga_sp19_v5"` (and does not have to be related to any name given from Step 1)
6766
- the output from `clas12-workflow` is `/path/to/output/files`; its subdirectories should be run numbers
6867

6968
**Otherwise**, you may omit the `-i /path/to/output/files` option (unless you customized it from Step 1):
7069
```bash
71-
bin/run-detectors-timelines.sh -d rga_sp19_v5 # for detector timelines
72-
bin/run-physics-timelines.sh -d rga_sp19_v5 # for physics timelines
70+
-d rga_sp19_v5
7371
```
7472
- the dataset name must match that of Step 1, otherwise you need to specify the path to the input files with `-i`
7573

@@ -86,16 +84,16 @@ bin/run-physics-timelines.sh -d rga_sp19_v5 # for physics timelines
8684
To view the timelines on the web, you must deploy them by copying the timeline HIPO files to a directory with a running web server. Note that you must have write-permission for that directory. To deploy, run (with no arguments, for the usage guide):
8785

8886
```bash
89-
bin/deploy-timelines.sh
87+
thyme deploy
9088
```
9189

9290
If all went well, a URL for the new timelines will be printed; open it in a browser to view them.
9391

9492
### Example
9593
```bash
96-
bin/deploy-timelines.sh -d rga_sp19_v5 -t rga/sp19/pass0/v5 -D # deploy to a run-group web directory (for chefs)
94+
thyme deploy -d rga_sp19_v5 -t rga/sp19/pass0/v5 -D # deploy to a run-group web directory (for chefs)
9795
### or ###
98-
bin/deploy-timelines.sh -d rga_sp19_v5 -t $LOGNAME/my_test -D # deploy to a personal web directory (for testing)
96+
thyme deploy -d rga_sp19_v5 -t $LOGNAME/my_test -D # deploy to a personal web directory (for testing)
9997
```
10098
- this will _only_ print what will be done: deploy the timelines from dataset `"rga_sp19_v5"` (defined in previous step(s)) to the printed path
10199
- you must have write access to that path; contact the maintainers if you need help with this

qa-detectors/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ The specifications are specified by text files in [the `cuts` directory](cuts).
2222
## Procedure
2323
- Run one of:
2424
```bash
25-
../bin/run-detectors-timelines.sh # print usage guide
26-
../bin/run-detectors-timelines.sh --focus-qa # run detector QA only (for debugging this QA code; you may need to set other options)
25+
thyme analysis # print usage guide
26+
thyme analysis --focus-qa # run detector QA only (for debugging this QA code; you may need to set other options)
2727
```
2828
- see [main documentation](../README.md) for more details
2929
- note to developers: if you want to run local scripts, call `source ../libexec/environ.sh` (this is
30-
automatically done when running the wrapper `../bin/run-detectors-timelines.sh`)
30+
automatically done when running the wrapper `thyme analysis`)

qa-physics/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ For run-group specific notes, including the commands used to perform the QA, see
4343
* if you find that the DAQ-gated FC charge is larger than the ungated
4444
charge, you may have assumed here that the recharge option was ON, when
4545
actually it was OFF and needs to be ON
46-
* `../bin/run-monitoring.sh`: runs `monitorRead.groovy` on DSTs using `slurm`
46+
* `thyme histogram`: runs `monitorRead.groovy` on DSTs using `slurm`
4747
* **IMPORTANT**: call this first with the `--check-cache` option to make sure that ALL required DST files are cached; if all files are on `/cache`, you may proceed, removing the `--check-cache` option
4848
* **IMPORTANT**: if you do **NOT** want to analyze full DSTs, and prefer to analyze trains:
4949
* use the option `--flatdir`, since likely all the HIPO files are in a single directory
5050
* use the scripts in the [`prescaler/` directory](prescaler) if you want to create a random "prescale" train
5151
* wait for `slurm` jobs to finish
52-
* inspect error logs (_e.g._, `../bin/error-print.sh`) to make sure all jobs ran successfully
52+
* inspect error logs (_e.g._, `thyme error`) to make sure all jobs ran successfully
5353
* `../bin/run-physics-timelines.sh $dataset`, which does the following:
5454
* runs `datasetOrganize.sh`
5555
* runs `qaPlot.groovy` (on FD and FT)

qa-physics/docs/docDiagram.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Note: output directories `$output_dir` and `$qa_dir` are typically set by wrappe
3030
```mermaid
3131
flowchart TB
3232
33-
subgraph "Automated by ../bin/run-monitoring.sh"
33+
subgraph "Automated by thyme histogram"
3434
dst{{DSTs}}:::data
3535
monitorRead[monitorRead.groovy]:::auto
3636
monitorReadOut{{$output_dir/data_table_$run.dat<br>$output_dir/monitor_$run.hipo}}:::data

qa-physics/notes/rga_fa18.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ We will use the `nSidis` train.
99

1010
First make sure all skim files are cached:
1111
```bash
12-
bin/run-monitoring.sh -d rga_fa18_inbending_nSidis --check-cache --flatdir --focus-physics /cache/clas12/rg-a/production/recon/fall2018/torus-1/pass2/main/train/nSidis
13-
bin/run-monitoring.sh -d rga_fa18_outbending_nSidis --check-cache --flatdir --focus-physics /cache/clas12/rg-a/production/recon/fall2018/torus+1/pass2/train/nSidis
12+
thyme histogram -d rga_fa18_inbending_nSidis --check-cache --flatdir --focus-physics /cache/clas12/rg-a/production/recon/fall2018/torus-1/pass2/main/train/nSidis
13+
thyme histogram -d rga_fa18_outbending_nSidis --check-cache --flatdir --focus-physics /cache/clas12/rg-a/production/recon/fall2018/torus+1/pass2/train/nSidis
1414
```
1515
then run monitoring
1616
```bash
17-
bin/run-monitoring.sh -d rga_fa18_inbending_nSidis --submit --flatdir --focus-physics /cache/clas12/rg-a/production/recon/fall2018/torus-1/pass2/main/train/nSidis
18-
bin/run-monitoring.sh -d rga_fa18_outbending_nSidis --submit --flatdir --focus-physics /cache/clas12/rg-a/production/recon/fall2018/torus+1/pass2/train/nSidis
17+
thyme histogram -d rga_fa18_inbending_nSidis --submit --flatdir --focus-physics /cache/clas12/rg-a/production/recon/fall2018/torus-1/pass2/main/train/nSidis
18+
thyme histogram -d rga_fa18_outbending_nSidis --submit --flatdir --focus-physics /cache/clas12/rg-a/production/recon/fall2018/torus+1/pass2/train/nSidis
1919
```
2020

2121
## Double check that we have all the runs
@@ -35,10 +35,10 @@ bin/run-physics-timelines.sh -d rga_fa18_outbending_nSidis
3535
Deploy either to your area or the common area (remove the `-D` option once you confirm this is the correct directory):
3636
```bash
3737
# your area, for testing
38-
bin/deploy-timelines.sh -d rga_fa18_inbending_nSidis -t $LOGNAME -D
39-
bin/deploy-timelines.sh -d rga_fa18_outbending_nSidis -t $LOGNAME -D
38+
thyme deploy -d rga_fa18_inbending_nSidis -t $LOGNAME -D
39+
thyme deploy -d rga_fa18_outbending_nSidis -t $LOGNAME -D
4040

4141
# common area
42-
bin/deploy-timelines.sh -d rga_fa18_inbending_nSidis -t rga/pass2/fa18/qa -D
43-
bin/deploy-timelines.sh -d rga_fa18_outbending_nSidis -t rga/pass2/fa18/qa -D
42+
thyme deploy -d rga_fa18_inbending_nSidis -t rga/pass2/fa18/qa -D
43+
thyme deploy -d rga_fa18_outbending_nSidis -t rga/pass2/fa18/qa -D
4444
```

qa-physics/notes/rga_sp19.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ start-workflow.sh rga-a-sp19*.json ## check that this is the correct JSON file
2626
2727
For the prescaled train:
2828
```bash
29-
bin/run-monitoring.sh -d rga_sp19_prescaled --submit --focus-physics PATH_TO_PRESCALED_TRAIN
29+
thyme histogram -d rga_sp19_prescaled --submit --focus-physics PATH_TO_PRESCALED_TRAIN
3030
```
3131

3232
For the SIDIS train, `nSidis`, first make sure all skim files are cached:
3333
```bash
34-
bin/run-monitoring.sh -d rga_sp19_nSidis --check-cache --flatdir --focus-physics /cache/clas12/rg-a/production/recon/spring2019/torus-1/pass2/dst/train/nSidis
34+
thyme histogram -d rga_sp19_nSidis --check-cache --flatdir --focus-physics /cache/clas12/rg-a/production/recon/spring2019/torus-1/pass2/dst/train/nSidis
3535
```
3636
If they are not:
3737
```bash
@@ -41,7 +41,7 @@ jcache get $(cat jlist.txt)
4141
```
4242
then run monitoring
4343
```bash
44-
bin/run-monitoring.sh -d rga_sp19_nSidis --submit --flatdir --focus-physics /cache/clas12/rg-a/production/recon/spring2019/torus-1/pass2/dst/train/nSidis
44+
thyme histogram -d rga_sp19_nSidis --submit --flatdir --focus-physics /cache/clas12/rg-a/production/recon/spring2019/torus-1/pass2/dst/train/nSidis
4545
```
4646

4747
## Make timelines
@@ -55,10 +55,10 @@ bin/run-physics-timelines.sh -d rga_sp19_nSidis
5555
Deploy either to your area or the common area (remove the `-D` option once you confirm this is the correct directory):
5656
```bash
5757
# your area, for testing
58-
bin/deploy-timelines.sh -d rga_sp19_prescaled -t $LOGNAME -D
59-
bin/deploy-timelines.sh -d rga_sp19_nSidis -t $LOGNAME -D
58+
thyme deploy -d rga_sp19_prescaled -t $LOGNAME -D
59+
thyme deploy -d rga_sp19_nSidis -t $LOGNAME -D
6060

6161
# common area
62-
bin/deploy-timelines.sh -d rga_sp19_prescaled -t rga/pass2/sp19/qa -D
63-
bin/deploy-timelines.sh -d rga_sp19_nSidis -t rga/pass2/sp19/qa -D
62+
thyme deploy -d rga_sp19_prescaled -t rga/pass2/sp19/qa -D
63+
thyme deploy -d rga_sp19_nSidis -t rga/pass2/sp19/qa -D
6464
```

0 commit comments

Comments
 (0)