asimov-ptadata 0.1.0__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.
- asimov_ptadata-0.1.0/.github/workflows/htcondor-e2e-gwb.yml +462 -0
- asimov_ptadata-0.1.0/.github/workflows/htcondor-e2e-noise.yml +345 -0
- asimov_ptadata-0.1.0/.github/workflows/htcondor-e2e.yml +232 -0
- asimov_ptadata-0.1.0/.github/workflows/publish.yml +89 -0
- asimov_ptadata-0.1.0/.github/workflows/tests.yml +37 -0
- asimov_ptadata-0.1.0/.gitignore +104 -0
- asimov_ptadata-0.1.0/LICENSE +21 -0
- asimov_ptadata-0.1.0/PKG-INFO +318 -0
- asimov_ptadata-0.1.0/README.md +257 -0
- asimov_ptadata-0.1.0/asimov_ptadata/__init__.py +66 -0
- asimov_ptadata-0.1.0/asimov_ptadata/cli.py +269 -0
- asimov_ptadata-0.1.0/asimov_ptadata/fetch.py +301 -0
- asimov_ptadata-0.1.0/asimov_ptadata/gwb.py +352 -0
- asimov_ptadata-0.1.0/asimov_ptadata/gwb_fit.py +502 -0
- asimov_ptadata-0.1.0/asimov_ptadata/gwb_settings_template.yml +19 -0
- asimov_ptadata-0.1.0/asimov_ptadata/noise.py +353 -0
- asimov_ptadata-0.1.0/asimov_ptadata/noise_fit.py +984 -0
- asimov_ptadata-0.1.0/asimov_ptadata/noise_settings_template.yml +18 -0
- asimov_ptadata-0.1.0/asimov_ptadata/pipeline.py +207 -0
- asimov_ptadata-0.1.0/asimov_ptadata/reduce.py +208 -0
- asimov_ptadata-0.1.0/asimov_ptadata/scheduling.py +65 -0
- asimov_ptadata-0.1.0/asimov_ptadata/settings_template.yml +27 -0
- asimov_ptadata-0.1.0/asimov_ptadata/sources.py +50 -0
- asimov_ptadata-0.1.0/asimov_ptadata.egg-info/PKG-INFO +318 -0
- asimov_ptadata-0.1.0/asimov_ptadata.egg-info/SOURCES.txt +46 -0
- asimov_ptadata-0.1.0/asimov_ptadata.egg-info/dependency_links.txt +1 -0
- asimov_ptadata-0.1.0/asimov_ptadata.egg-info/entry_points.txt +7 -0
- asimov_ptadata-0.1.0/asimov_ptadata.egg-info/requires.txt +24 -0
- asimov_ptadata-0.1.0/asimov_ptadata.egg-info/scm_file_list.json +42 -0
- asimov_ptadata-0.1.0/asimov_ptadata.egg-info/scm_version.json +8 -0
- asimov_ptadata-0.1.0/asimov_ptadata.egg-info/top_level.txt +1 -0
- asimov_ptadata-0.1.0/pyproject.toml +99 -0
- asimov_ptadata-0.1.0/scripts/gwb_fit_smoketest.py +149 -0
- asimov_ptadata-0.1.0/scripts/noise_fit_smoketest.py +123 -0
- asimov_ptadata-0.1.0/setup.cfg +4 -0
- asimov_ptadata-0.1.0/tests/__init__.py +0 -0
- asimov_ptadata-0.1.0/tests/e2e_blueprints/event.yaml +9 -0
- asimov_ptadata-0.1.0/tests/test_cli.py +105 -0
- asimov_ptadata-0.1.0/tests/test_fetch.py +260 -0
- asimov_ptadata-0.1.0/tests/test_gwb.py +481 -0
- asimov_ptadata-0.1.0/tests/test_gwb_fit_pta.py +158 -0
- asimov_ptadata-0.1.0/tests/test_gwb_summary.py +35 -0
- asimov_ptadata-0.1.0/tests/test_noise.py +457 -0
- asimov_ptadata-0.1.0/tests/test_noise_fit_pta.py +270 -0
- asimov_ptadata-0.1.0/tests/test_noise_sampling.py +293 -0
- asimov_ptadata-0.1.0/tests/test_pipeline.py +350 -0
- asimov_ptadata-0.1.0/tests/test_reduce.py +60 -0
- asimov_ptadata-0.1.0/tests/test_scheduling.py +30 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
name: HTCondor End-to-End Test (gwb-search)
|
|
2
|
+
|
|
3
|
+
# Extends htcondor-e2e-noise.yml's pattern (reduce -> QC/review -> a real
|
|
4
|
+
# ptadata-noise noise fit -> review) one stage further: two independent
|
|
5
|
+
# pulsars are each reduced and noise-fit exactly as in
|
|
6
|
+
# htcondor-e2e-noise.yml, then a single joint ptadata-gwb ProjectAnalysis
|
|
7
|
+
# (a real, fixed-noise, Hellings-Downs-correlated common-process search
|
|
8
|
+
# across both pulsars at once - see asimov_ptadata/gwb.py/gwb_fit.py) is
|
|
9
|
+
# gated on *both* noise-fit productions' review status and run to
|
|
10
|
+
# completion on real HTCondor.
|
|
11
|
+
#
|
|
12
|
+
# NOTE: this workflow is reasoned from source (asimov_ptadata/gwb.py,
|
|
13
|
+
# asimov's own analysis.py/ledger.py/manage.py) plus the two gotchas noted
|
|
14
|
+
# below, but has not been run against a live GitHub Actions runner as part
|
|
15
|
+
# of this PR - see the PR description. Expect it may need a round of live-CI
|
|
16
|
+
# debugging.
|
|
17
|
+
#
|
|
18
|
+
# Caution for anyone touching this file - two gotchas already paid for in
|
|
19
|
+
# htcondor-e2e.yml/htcondor-e2e-noise.yml's own debugging history, and
|
|
20
|
+
# proactively applied here rather than rediscovered:
|
|
21
|
+
# (a) run-asimov-command pipes its `script:` into an *unquoted*
|
|
22
|
+
# `su - submituser <<SUBMITUSER ... SUBMITUSER` heredoc. Any
|
|
23
|
+
# `$(...)`/`$VAR` meant to be evaluated *after* `conda activate
|
|
24
|
+
# asimov` (inside the activated env) must be escaped as
|
|
25
|
+
# `\$(...)`/`\$VAR`, or it silently evaluates in the wrong (outer,
|
|
26
|
+
# root, pre-activation) shell instead. Plain CI-provided values like
|
|
27
|
+
# $GITHUB_WORKSPACE are fine unescaped (same value either way).
|
|
28
|
+
# (b) enterprise-pulsar pulls in scikit-sparse, which needs the real
|
|
29
|
+
# suitesparse-devel yum package (from EPEL) installed *before* the
|
|
30
|
+
# pip install step - a conda-forge scikit-sparse pre-install was
|
|
31
|
+
# tried on htcondor-e2e-noise.yml and did not avoid pip's own source
|
|
32
|
+
# build of it, which is what actually needs the headers.
|
|
33
|
+
on: [push, pull_request]
|
|
34
|
+
|
|
35
|
+
permissions:
|
|
36
|
+
contents: read
|
|
37
|
+
|
|
38
|
+
jobs:
|
|
39
|
+
htcondor-e2e-gwb:
|
|
40
|
+
name: "ptadata-gwb via asimov on HTCondor"
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
container:
|
|
43
|
+
# Pinned together: the htcondor Python bindings asimov submits through
|
|
44
|
+
# must match the schedd in this image, or submission fails with
|
|
45
|
+
# AUTHENTICATE:1003. Bump both at once.
|
|
46
|
+
image: htcondor/mini:25.13.2-el9
|
|
47
|
+
options: --privileged
|
|
48
|
+
defaults:
|
|
49
|
+
run:
|
|
50
|
+
shell: bash -el {0}
|
|
51
|
+
steps:
|
|
52
|
+
|
|
53
|
+
- uses: actions/checkout@v5
|
|
54
|
+
with:
|
|
55
|
+
fetch-depth: 0
|
|
56
|
+
|
|
57
|
+
- uses: etive-io/asimov/.github/actions/setup-htcondor@main
|
|
58
|
+
|
|
59
|
+
- name: Install base tools
|
|
60
|
+
run: |
|
|
61
|
+
yum install -y sudo git
|
|
62
|
+
|
|
63
|
+
- name: Install SuiteSparse development headers
|
|
64
|
+
# See gotcha (b) above - scikit-sparse (an enterprise-pulsar
|
|
65
|
+
# dependency) fatal-errors on cholmod.h without these; the real dev
|
|
66
|
+
# package (EPEL on this RHEL-family image) is the direct fix, not a
|
|
67
|
+
# conda-forge scikit-sparse pre-install.
|
|
68
|
+
run: |
|
|
69
|
+
yum install -y epel-release
|
|
70
|
+
yum install -y suitesparse-devel
|
|
71
|
+
|
|
72
|
+
- name: Create submit user
|
|
73
|
+
uses: etive-io/asimov/.github/actions/create-submit-user@main
|
|
74
|
+
|
|
75
|
+
- name: Ensure submituser can access workspace
|
|
76
|
+
run: |
|
|
77
|
+
chmod -R a+rwX "$GITHUB_WORKSPACE"
|
|
78
|
+
|
|
79
|
+
- name: Setup Asimov Environment
|
|
80
|
+
uses: etive-io/asimov/.github/actions/setup-asimov-env@main
|
|
81
|
+
with:
|
|
82
|
+
python-version: "3.10"
|
|
83
|
+
conda-packages: ""
|
|
84
|
+
# asimov itself, plus the "noise" extra's real dependencies -
|
|
85
|
+
# ptadata-gwb needs the same enterprise-pulsar/ptmcmcsampler stack
|
|
86
|
+
# ptadata-noise does, no extra packages beyond that (see
|
|
87
|
+
# pyproject.toml: gp_signals/utils are already part of
|
|
88
|
+
# enterprise-pulsar).
|
|
89
|
+
extra-packages: "asimov~=0.7.1 htcondor==25.13.2 enterprise-pulsar ptmcmcsampler"
|
|
90
|
+
|
|
91
|
+
- name: Set up git
|
|
92
|
+
run: |
|
|
93
|
+
su - submituser <<SUBMITUSER
|
|
94
|
+
set -euo pipefail
|
|
95
|
+
git config --global init.defaultBranch master
|
|
96
|
+
git config --global user.email "you@example.com"
|
|
97
|
+
git config --global user.name "Your Name"
|
|
98
|
+
SUBMITUSER
|
|
99
|
+
|
|
100
|
+
- name: Stage fixture pulsar data
|
|
101
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
102
|
+
with:
|
|
103
|
+
# Two genuinely distinct real pulsars, both bundled with PINT's
|
|
104
|
+
# own example data - not one pulsar's TOAs reused under two
|
|
105
|
+
# aliases - so the Hellings-Downs common-process construction is
|
|
106
|
+
# structurally real (two distinct sky positions/TOA sets jointly
|
|
107
|
+
# constraining one shared GWB parameter pair). See
|
|
108
|
+
# scripts/gwb_fit_smoketest.py's docstring for the same choice
|
|
109
|
+
# made the same way.
|
|
110
|
+
script: |
|
|
111
|
+
python3 << 'PYEOF'
|
|
112
|
+
import pathlib
|
|
113
|
+
import shutil
|
|
114
|
+
|
|
115
|
+
import pint.config
|
|
116
|
+
|
|
117
|
+
fixtures = {
|
|
118
|
+
"1748-2021E": "NGC6440E",
|
|
119
|
+
"J1028-5819": "J1028-5819-example",
|
|
120
|
+
}
|
|
121
|
+
for name, stem in fixtures.items():
|
|
122
|
+
psr_dir = pathlib.Path(f"tests/fixtures/release/{name}")
|
|
123
|
+
psr_dir.mkdir(parents=True, exist_ok=True)
|
|
124
|
+
par_dest = psr_dir / f"{name}.par"
|
|
125
|
+
shutil.copy(pint.config.examplefile(f"{stem}.par"), par_dest)
|
|
126
|
+
shutil.copy(pint.config.examplefile(f"{stem}.tim"), psr_dir / f"{name}.tim")
|
|
127
|
+
|
|
128
|
+
# NGC6440E.par declares EPHEM explicitly; J1028-5819-example.par
|
|
129
|
+
# doesn't. Without it, PINT's TOA loading emits a "No ephemeris
|
|
130
|
+
# provided ... Using DE421" warning - and
|
|
131
|
+
# asimov_ptadata.reduce.reduce_pulsar treats *any* loading
|
|
132
|
+
# warning as reason to mark QC status "needs-review" rather
|
|
133
|
+
# than "pass", which leaves the reduce production's review
|
|
134
|
+
# unset instead of auto-APPROVED. That breaks the review-gated
|
|
135
|
+
# dependency chain this workflow exists to exercise, for a
|
|
136
|
+
# reason that has nothing to do with the data's actual
|
|
137
|
+
# quality - confirmed directly by reproducing reduce_pulsar()
|
|
138
|
+
# against this exact fixture locally. Declaring the ephemeris
|
|
139
|
+
# explicitly (matching NGC6440E.par's own style) avoids the
|
|
140
|
+
# warning at the source instead of loosening the QC check.
|
|
141
|
+
if "EPHEM" not in par_dest.read_text():
|
|
142
|
+
with open(par_dest, "a") as f:
|
|
143
|
+
f.write("EPHEM DE421\n")
|
|
144
|
+
|
|
145
|
+
print(f"Staged fixture pulsar data in {psr_dir.resolve()}")
|
|
146
|
+
PYEOF
|
|
147
|
+
|
|
148
|
+
- name: Write analysis blueprints
|
|
149
|
+
run: |
|
|
150
|
+
mkdir -p tests/e2e_blueprints
|
|
151
|
+
for PSR in 1748-2021E J1028-5819; do
|
|
152
|
+
cat > "tests/e2e_blueprints/event-$PSR.yaml" <<EOF
|
|
153
|
+
kind: event
|
|
154
|
+
name: $PSR
|
|
155
|
+
EOF
|
|
156
|
+
cat > "tests/e2e_blueprints/reduce-$PSR.yaml" <<EOF
|
|
157
|
+
kind: analysis
|
|
158
|
+
name: reduce
|
|
159
|
+
pipeline: ptadata
|
|
160
|
+
status: ready
|
|
161
|
+
data:
|
|
162
|
+
release root: $GITHUB_WORKSPACE/tests/fixtures/release
|
|
163
|
+
reduction:
|
|
164
|
+
sigma threshold: 5.0
|
|
165
|
+
refit: true
|
|
166
|
+
EOF
|
|
167
|
+
cat > "tests/e2e_blueprints/noise-$PSR.yaml" <<EOF
|
|
168
|
+
kind: projectanalysis
|
|
169
|
+
name: noise-fit-$PSR
|
|
170
|
+
pipeline: ptadata-noise
|
|
171
|
+
subjects:
|
|
172
|
+
- $PSR
|
|
173
|
+
analyses:
|
|
174
|
+
- - "pipeline: ptadata"
|
|
175
|
+
- "review: approved"
|
|
176
|
+
status: ready
|
|
177
|
+
sampler:
|
|
178
|
+
niter: 800
|
|
179
|
+
# Far too short to converge: this tests the plumbing, so let the
|
|
180
|
+
# convergence gate pass (it's unit-tested separately).
|
|
181
|
+
min ess: 0
|
|
182
|
+
max split shift: 1000
|
|
183
|
+
burn: 200
|
|
184
|
+
red noise components: 5
|
|
185
|
+
EOF
|
|
186
|
+
done
|
|
187
|
+
# One joint ptadata-gwb project analysis across both subjects. The
|
|
188
|
+
# analyses: field here is documentation of intent only - it is
|
|
189
|
+
# NOT what actually gates this analysis (see asimov_ptadata/gwb.py's
|
|
190
|
+
# module docstring for why depending on another ProjectAnalysis,
|
|
191
|
+
# like ptadata-noise, can't use the standard analyses: smart
|
|
192
|
+
# dependency mechanism); the real gate is
|
|
193
|
+
# GWBPipeline._resolve_subject_data(), exercised below by simply
|
|
194
|
+
# trying to build/submit before and after the noise-fit stages are
|
|
195
|
+
# approved.
|
|
196
|
+
cat > tests/e2e_blueprints/gwb-search.yaml <<'EOF'
|
|
197
|
+
kind: projectanalysis
|
|
198
|
+
name: gwb-search
|
|
199
|
+
pipeline: ptadata-gwb
|
|
200
|
+
subjects:
|
|
201
|
+
- 1748-2021E
|
|
202
|
+
- J1028-5819
|
|
203
|
+
analyses:
|
|
204
|
+
- - "pipeline: ptadata-noise"
|
|
205
|
+
- "review: approved"
|
|
206
|
+
status: ready
|
|
207
|
+
sampler:
|
|
208
|
+
niter: 800
|
|
209
|
+
# Far too short to converge: this tests the plumbing, so let the
|
|
210
|
+
# convergence gate pass (it's unit-tested separately).
|
|
211
|
+
min ess: 0
|
|
212
|
+
max split shift: 1000
|
|
213
|
+
burn: 200
|
|
214
|
+
red noise components: 5
|
|
215
|
+
gwb components: 5
|
|
216
|
+
EOF
|
|
217
|
+
chmod a+rwX tests/e2e_blueprints/*.yaml
|
|
218
|
+
for f in tests/e2e_blueprints/*.yaml; do echo "== $f =="; cat "$f"; done
|
|
219
|
+
|
|
220
|
+
- name: Create asimov project
|
|
221
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
222
|
+
with:
|
|
223
|
+
script: asimov init "Test Project"
|
|
224
|
+
|
|
225
|
+
- name: Configure asimov user
|
|
226
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
227
|
+
with:
|
|
228
|
+
script: asimov configuration update condor/user submituser
|
|
229
|
+
|
|
230
|
+
- name: Configure HTCondor settings
|
|
231
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
232
|
+
with:
|
|
233
|
+
script: |
|
|
234
|
+
asimov configuration update condor/cache_time 30
|
|
235
|
+
asimov configuration update condor/cron_minute '*/1'
|
|
236
|
+
|
|
237
|
+
- name: Point pipelines/environment at the asimov conda env
|
|
238
|
+
# See gotcha (a) above for why the `\$`s below are deliberate.
|
|
239
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
240
|
+
with:
|
|
241
|
+
script: |
|
|
242
|
+
ENV_PREFIX=\$(python3 -c 'import sys; print(sys.prefix)')
|
|
243
|
+
echo "Resolved asimov conda env prefix: \$ENV_PREFIX"
|
|
244
|
+
test -x "\$ENV_PREFIX/bin/ptadata" || { echo "::error::\$ENV_PREFIX/bin/ptadata not found or not executable"; exit 1; }
|
|
245
|
+
asimov configuration update pipelines/environment "\$ENV_PREFIX"
|
|
246
|
+
|
|
247
|
+
- name: Add test events
|
|
248
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
249
|
+
with:
|
|
250
|
+
script: |
|
|
251
|
+
asimov apply -f "$GITHUB_WORKSPACE/tests/e2e_blueprints/event-1748-2021E.yaml"
|
|
252
|
+
asimov apply -f "$GITHUB_WORKSPACE/tests/e2e_blueprints/event-J1028-5819.yaml"
|
|
253
|
+
|
|
254
|
+
- name: Add ptadata reduce analyses
|
|
255
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
256
|
+
with:
|
|
257
|
+
script: |
|
|
258
|
+
asimov apply -f "$GITHUB_WORKSPACE/tests/e2e_blueprints/reduce-1748-2021E.yaml" -e 1748-2021E
|
|
259
|
+
asimov apply -f "$GITHUB_WORKSPACE/tests/e2e_blueprints/reduce-J1028-5819.yaml" -e J1028-5819
|
|
260
|
+
|
|
261
|
+
- name: Build and submit ptadata reduce jobs
|
|
262
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
263
|
+
with:
|
|
264
|
+
script: asimov manage build submit
|
|
265
|
+
|
|
266
|
+
- name: Wait for reduce completion (1748-2021E)
|
|
267
|
+
uses: etive-io/asimov/.github/actions/wait-for-files@main
|
|
268
|
+
with:
|
|
269
|
+
patterns: "qc_report.yml"
|
|
270
|
+
directory: "working/1748-2021E/reduce/reduced"
|
|
271
|
+
timeout: "300"
|
|
272
|
+
interval: "10"
|
|
273
|
+
working-directory: .
|
|
274
|
+
|
|
275
|
+
- name: Wait for reduce completion (J1028-5819)
|
|
276
|
+
uses: etive-io/asimov/.github/actions/wait-for-files@main
|
|
277
|
+
with:
|
|
278
|
+
patterns: "qc_report.yml"
|
|
279
|
+
directory: "working/J1028-5819/reduce/reduced"
|
|
280
|
+
timeout: "300"
|
|
281
|
+
interval: "10"
|
|
282
|
+
working-directory: .
|
|
283
|
+
|
|
284
|
+
- name: Run asimov monitor (detects reduce completion, auto-approves review)
|
|
285
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
286
|
+
with:
|
|
287
|
+
script: asimov monitor
|
|
288
|
+
|
|
289
|
+
- name: Verify both reduce productions were auto-approved
|
|
290
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
291
|
+
with:
|
|
292
|
+
script: |
|
|
293
|
+
python3 << 'PYEOF'
|
|
294
|
+
import sys
|
|
295
|
+
from asimov.ledger import YAMLLedger
|
|
296
|
+
|
|
297
|
+
ledger = YAMLLedger(".asimov/ledger.yml")
|
|
298
|
+
failures = []
|
|
299
|
+
for name in ["1748-2021E", "J1028-5819"]:
|
|
300
|
+
event = ledger.get_event(name)[0]
|
|
301
|
+
reduce = [p for p in event.productions if p.name == "reduce"][0]
|
|
302
|
+
print(f"{name} reduce status: {reduce.status}, review: {reduce.review.status}")
|
|
303
|
+
if reduce.review.status != "APPROVED":
|
|
304
|
+
failures.append(name)
|
|
305
|
+
if failures:
|
|
306
|
+
print(f"FAIL: reduce production(s) not auto-approved: {failures}")
|
|
307
|
+
sys.exit(1)
|
|
308
|
+
print("OK: both reduce productions auto-approved via QC pass")
|
|
309
|
+
PYEOF
|
|
310
|
+
|
|
311
|
+
- name: Add ptadata-noise project analyses
|
|
312
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
313
|
+
with:
|
|
314
|
+
script: |
|
|
315
|
+
asimov apply -f "$GITHUB_WORKSPACE/tests/e2e_blueprints/noise-1748-2021E.yaml"
|
|
316
|
+
asimov apply -f "$GITHUB_WORKSPACE/tests/e2e_blueprints/noise-J1028-5819.yaml"
|
|
317
|
+
|
|
318
|
+
- name: Build and submit noise-fit jobs
|
|
319
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
320
|
+
with:
|
|
321
|
+
script: asimov manage build submit
|
|
322
|
+
|
|
323
|
+
- name: Wait for noise-fit completion (1748-2021E)
|
|
324
|
+
uses: etive-io/asimov/.github/actions/wait-for-files@main
|
|
325
|
+
with:
|
|
326
|
+
patterns: "noise_report.yml"
|
|
327
|
+
directory: "working/project-analyses/1748-2021E/noise-fit-1748-2021E/noise/1748-2021E"
|
|
328
|
+
timeout: "300"
|
|
329
|
+
interval: "10"
|
|
330
|
+
working-directory: .
|
|
331
|
+
|
|
332
|
+
- name: Wait for noise-fit completion (J1028-5819)
|
|
333
|
+
uses: etive-io/asimov/.github/actions/wait-for-files@main
|
|
334
|
+
with:
|
|
335
|
+
patterns: "noise_report.yml"
|
|
336
|
+
directory: "working/project-analyses/J1028-5819/noise-fit-J1028-5819/noise/J1028-5819"
|
|
337
|
+
timeout: "300"
|
|
338
|
+
interval: "10"
|
|
339
|
+
working-directory: .
|
|
340
|
+
|
|
341
|
+
- name: Run asimov monitor (detects noise-fit completion, auto-approves review)
|
|
342
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
343
|
+
with:
|
|
344
|
+
script: asimov monitor
|
|
345
|
+
|
|
346
|
+
- name: Verify both noise-fit productions were auto-approved
|
|
347
|
+
# Confirms the real two-hop review-gating machinery this PR adds
|
|
348
|
+
# (GWBPipeline._resolve_subject_data() walking
|
|
349
|
+
# ledger.project_analyses for review-approved ptadata-noise
|
|
350
|
+
# productions - see asimov_ptadata/gwb.py's module docstring) has
|
|
351
|
+
# something real to find before the gwb-search stage is submitted.
|
|
352
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
353
|
+
with:
|
|
354
|
+
script: |
|
|
355
|
+
python3 << 'PYEOF'
|
|
356
|
+
import sys
|
|
357
|
+
from asimov.ledger import YAMLLedger
|
|
358
|
+
|
|
359
|
+
ledger = YAMLLedger(".asimov/ledger.yml")
|
|
360
|
+
failures = []
|
|
361
|
+
for name in ["1748-2021E", "J1028-5819"]:
|
|
362
|
+
matches = [
|
|
363
|
+
a for a in ledger.project_analyses
|
|
364
|
+
if a.pipeline.name == "ptadata-noise" and name in a._subjects
|
|
365
|
+
]
|
|
366
|
+
if not matches:
|
|
367
|
+
print(f"FAIL: no ptadata-noise project analysis found for {name}")
|
|
368
|
+
failures.append(name)
|
|
369
|
+
continue
|
|
370
|
+
analysis = matches[0]
|
|
371
|
+
print(f"{name} noise-fit status: {analysis.status}, review: {analysis.review.status}")
|
|
372
|
+
if analysis.review.status != "APPROVED":
|
|
373
|
+
failures.append(name)
|
|
374
|
+
if failures:
|
|
375
|
+
print(f"FAIL: noise-fit production(s) not auto-approved: {failures}")
|
|
376
|
+
sys.exit(1)
|
|
377
|
+
print("OK: both noise-fit productions auto-approved via a completed noise report")
|
|
378
|
+
PYEOF
|
|
379
|
+
|
|
380
|
+
- name: Add ptadata-gwb project analysis
|
|
381
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
382
|
+
with:
|
|
383
|
+
script: asimov apply -f "$GITHUB_WORKSPACE/tests/e2e_blueprints/gwb-search.yaml"
|
|
384
|
+
|
|
385
|
+
- name: Build and submit gwb-search job
|
|
386
|
+
# GWBPipeline.build_dag() resolves both review-approved noise-fit
|
|
387
|
+
# productions' par/tim + fixed-noise assets and writes ONE joint
|
|
388
|
+
# settings file the submitted `ptadata gwb-run` job reads.
|
|
389
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
390
|
+
with:
|
|
391
|
+
script: asimov manage build submit
|
|
392
|
+
|
|
393
|
+
- name: Wait for gwb-search completion
|
|
394
|
+
uses: etive-io/asimov/.github/actions/wait-for-files@main
|
|
395
|
+
with:
|
|
396
|
+
patterns: "gwb_report.yml"
|
|
397
|
+
directory: "working/project-analyses/1748-2021E_J1028-5819/gwb-search/gwb"
|
|
398
|
+
timeout: "300"
|
|
399
|
+
interval: "10"
|
|
400
|
+
working-directory: .
|
|
401
|
+
|
|
402
|
+
- name: Run asimov monitor (detects gwb-search completion)
|
|
403
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
404
|
+
with:
|
|
405
|
+
script: asimov monitor
|
|
406
|
+
|
|
407
|
+
- name: Write verification script
|
|
408
|
+
run: |
|
|
409
|
+
cat > /tmp/verify_gwb.py <<'EOF'
|
|
410
|
+
import sys
|
|
411
|
+
from asimov.monitor_api import get_analysis_status
|
|
412
|
+
|
|
413
|
+
# No downstream stage promotes any of these to "complete", so all
|
|
414
|
+
# three terminate at "uploaded" - matching htcondor-e2e-noise.yml's
|
|
415
|
+
# own acceptance criteria.
|
|
416
|
+
ACCEPTED = {"complete", "uploaded"}
|
|
417
|
+
|
|
418
|
+
statuses = get_analysis_status()
|
|
419
|
+
print("Final analysis statuses:")
|
|
420
|
+
failures = []
|
|
421
|
+
for name, status in statuses.items():
|
|
422
|
+
print(f" {name}: {status}")
|
|
423
|
+
if str(status).lower() not in ACCEPTED:
|
|
424
|
+
failures.append(f"{name}: {status}")
|
|
425
|
+
if failures:
|
|
426
|
+
print(f"\nFAIL: {len(failures)} analyses not complete/uploaded:")
|
|
427
|
+
for f in failures:
|
|
428
|
+
print(f" - {f}")
|
|
429
|
+
sys.exit(1)
|
|
430
|
+
print(f"\nAll {len(statuses)} analyses reached a successful terminal state!")
|
|
431
|
+
EOF
|
|
432
|
+
chmod 644 /tmp/verify_gwb.py
|
|
433
|
+
|
|
434
|
+
- name: Verify gwb-search analysis completed
|
|
435
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
436
|
+
with:
|
|
437
|
+
script: python3 /tmp/verify_gwb.py
|
|
438
|
+
|
|
439
|
+
- name: Report the gwb-search result
|
|
440
|
+
uses: etive-io/asimov/.github/actions/run-asimov-command@main
|
|
441
|
+
with:
|
|
442
|
+
script: |
|
|
443
|
+
python3 << 'PYEOF'
|
|
444
|
+
import yaml
|
|
445
|
+
|
|
446
|
+
with open("working/project-analyses/1748-2021E_J1028-5819/gwb-search/gwb/gwb_report.yml") as f:
|
|
447
|
+
report = yaml.safe_load(f)
|
|
448
|
+
print("GWB-search report:")
|
|
449
|
+
print(yaml.safe_dump(report, sort_keys=False))
|
|
450
|
+
PYEOF
|
|
451
|
+
|
|
452
|
+
- name: Archive artifacts on failure
|
|
453
|
+
if: failure()
|
|
454
|
+
uses: actions/upload-artifact@v4
|
|
455
|
+
with:
|
|
456
|
+
name: htcondor-e2e-gwb-debug
|
|
457
|
+
path: |
|
|
458
|
+
.asimov/
|
|
459
|
+
working/
|
|
460
|
+
checkouts/
|
|
461
|
+
tests/fixtures/
|
|
462
|
+
retention-days: 5
|