igwn-connect 0.8.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.
Files changed (29) hide show
  1. igwn_connect-0.8.0/.claude/settings.local.json +10 -0
  2. igwn_connect-0.8.0/.dockerignore +10 -0
  3. igwn_connect-0.8.0/.gitignore +13 -0
  4. igwn_connect-0.8.0/.gitlab-ci.yml +68 -0
  5. igwn_connect-0.8.0/CHANGELOG.md +230 -0
  6. igwn_connect-0.8.0/Dockerfile +36 -0
  7. igwn_connect-0.8.0/LICENSE +704 -0
  8. igwn_connect-0.8.0/Makefile +30 -0
  9. igwn_connect-0.8.0/PKG-INFO +307 -0
  10. igwn_connect-0.8.0/README.md +235 -0
  11. igwn_connect-0.8.0/docs/frame-replay-source.md +167 -0
  12. igwn_connect-0.8.0/pyproject.toml +204 -0
  13. igwn_connect-0.8.0/src/igwn_connect/__init__.py +11 -0
  14. igwn_connect-0.8.0/src/igwn_connect/__main__.py +626 -0
  15. igwn_connect-0.8.0/src/igwn_connect/_version.py +24 -0
  16. igwn_connect-0.8.0/src/igwn_connect/cli.py +830 -0
  17. igwn_connect-0.8.0/src/igwn_connect/frame_replay_source.py +612 -0
  18. igwn_connect-0.8.0/src/igwn_connect/lldd_sink.py +233 -0
  19. igwn_connect-0.8.0/src/igwn_connect/lldd_source.py +205 -0
  20. igwn_connect-0.8.0/src/igwn_connect/monitoring.py +241 -0
  21. igwn_connect-0.8.0/src/igwn_connect/tests/__init__.py +0 -0
  22. igwn_connect-0.8.0/src/igwn_connect/tests/conftest.py +13 -0
  23. igwn_connect-0.8.0/src/igwn_connect/tests/test_cli.py +69 -0
  24. igwn_connect-0.8.0/src/igwn_connect/tests/test_frame_replay_source.py +365 -0
  25. igwn_connect-0.8.0/src/igwn_connect/tests/test_lldd_sink.py +259 -0
  26. igwn_connect-0.8.0/src/igwn_connect/tests/test_lldd_source.py +315 -0
  27. igwn_connect-0.8.0/src/igwn_connect/tests/test_main.py +1801 -0
  28. igwn_connect-0.8.0/src/igwn_connect/tests/test_monitoring.py +312 -0
  29. igwn_connect-0.8.0/uv.lock +2674 -0
@@ -0,0 +1,10 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Read(//Users/olivia/workspace/projects/ligo/arrakis-publisher-configurations/**)",
5
+ "Read(//Users/olivia/workspace/projects/ligo/arrakis-publisher-configurations/CIT/**)",
6
+ "Read(//Users/olivia/workspace/projects/ligo/sega/**)",
7
+ "Read(//Users/olivia/workspace/projects/ligo/**)"
8
+ ]
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ __pycache__
2
+ *.egg-info
3
+ *.pyc
4
+ .coverage*
5
+ .mypy_cache
6
+ .ruff_cache
7
+ build/
8
+ dist/
9
+ site/
10
+ *.patch
@@ -0,0 +1,13 @@
1
+ # build artifacts
2
+ *.egg-info
3
+ build/
4
+ dist/
5
+ site/
6
+ __pycache__
7
+ **/_version.py
8
+
9
+ # test artifacts
10
+ .coverage*
11
+
12
+ # patches
13
+ *.patch
@@ -0,0 +1,68 @@
1
+
2
+ include:
3
+ # -- python -----------------
4
+ - component: git.ligo.org/computing/gitlab/components/python/sdist@1
5
+ - component: git.ligo.org/computing/gitlab/components/python/wheel@1
6
+ - component: git.ligo.org/computing/gitlab/components/python/code-quality@1
7
+ inputs:
8
+ analyzer: "ruff"
9
+ requirements: "-r requirements-lint.txt"
10
+ - component: git.ligo.org/computing/gitlab/components/python/dependency-scanning@1
11
+ - component: git.ligo.org/computing/gitlab/components/python/type-checking@1
12
+ - component: git.ligo.org/computing/gitlab/components/python/test@1
13
+ inputs:
14
+ install_extra: test
15
+ python_versions:
16
+ - "3.11"
17
+ - "3.12"
18
+ - "3.13"
19
+ - "3.14"
20
+ # -- docker -----------------
21
+ - component: git.ligo.org/computing/gitlab/components/docker/build@1
22
+ inputs:
23
+ image_tag: $CI_COMMIT_SHA
24
+ - component: git.ligo.org/computing/gitlab/components/docker/push@1
25
+ inputs:
26
+ pull_image_tag: $CI_COMMIT_SHA
27
+ push_image_tag: $CI_COMMIT_REF_NAME
28
+ push_when: "all"
29
+ tag_latest: false
30
+ rules:
31
+ - if: $CI_COMMIT_BRANCH
32
+ - if: $CI_COMMIT_TAG !~ /^(\d+\.)?(\d+\.)?(\*|\d+)$/
33
+ - component: git.ligo.org/computing/gitlab/components/docker/push@1
34
+ inputs:
35
+ pull_image_tag: $CI_COMMIT_SHA
36
+ push_image_tag: $CI_COMMIT_TAG
37
+ push_when: "tags"
38
+ tag_latest: true
39
+ rules:
40
+ # tag latest only on new versions
41
+ - if: $CI_COMMIT_TAG =~ /^(\d+\.)?(\d+\.)?(\*|\d+)$/
42
+
43
+ # -- customisations
44
+
45
+ docker_push_gitlab:
46
+ rules:
47
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
48
+ when: never
49
+ - when: always
50
+
51
+ ruff:
52
+ needs:
53
+ - requirements
54
+
55
+ # -- requirements
56
+ requirements:
57
+ stage: build
58
+ image: python:3.13
59
+ script:
60
+ - python -m pip install pipx
61
+ - pipx ensurepath
62
+ - source ~/.bashrc
63
+ - pipx install hatch
64
+ - hatch dep show requirements --feature docs > requirements-docs.txt
65
+ - hatch dep show requirements --feature lint > requirements-lint.txt
66
+ artifacts:
67
+ paths:
68
+ - requirements-*.txt
@@ -0,0 +1,230 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased]
4
+
5
+ ## [0.8.0] - 2026-09-09
6
+
7
+ ### Added
8
+
9
+ - `--source replay`: replay a set of frame files as live data, into any
10
+ sink. The data is retimestamped to the present, paced in real time,
11
+ and looped, matching how the Arrakis frames backend serves replays, so
12
+ a replay can be published straight from frame files. `--target-latency` adds
13
+ an emulated transport delay to mimic live data more closely
14
+ - `--monitor-max-latency N`: a publishing-latency health check for `--monitor`,
15
+ failing `/health` and `/readyz` when the data a sink publishes or writes
16
+ trails real time by more than N seconds
17
+ - Sinks ride out transient write failures instead of taking the
18
+ pipeline down: `--max-write-failures` for the frames sink (a full
19
+ disk, say) and `--max-publish-failures` for the Arrakis sink (a sick
20
+ partition) drop the failed file or block and carry on, aborting only
21
+ after that many consecutive failures; 0 never aborts, default 10
22
+ - `--no-fast-forward` for the Arrakis source: opt out of the client's
23
+ skip-ahead when a live stream falls behind its latency budget
24
+
25
+ ### Changed
26
+
27
+ - Renamed to **igwn-connect**: the distribution, the `igwn_connect`
28
+ package, and the `igwn-connect` command. The repository moves to
29
+ <https://git.ligo.org/ngdd/igwn-connect> and the container image to
30
+ `containers.ligo.org/ngdd/igwn-connect`
31
+ - Require `sgn-arrakis >= 0.10` and `sgn-gwframe >= 0.9`, which provide
32
+ the publish and write failure handling and the skip-ahead opt-out
33
+ - `--summary-interval` sets the cadence of the periodic activity summary
34
+ for every source and sink that logs one (the Arrakis, frames, replay,
35
+ and LLDD elements); previously it reached the frames sink only
36
+
37
+ ## [0.7.3] - 2026-09-03
38
+
39
+ ### Fixed
40
+
41
+ - `--sink lldd` failed at startup with any source other than `--source
42
+ lldd` (`AttributeError: 'Namespace' object has no attribute
43
+ 'status_updates'`): the LLDD status update options are now defined
44
+ for the LLDD sink with every source
45
+ - `--source arrakis --sink arrakis` failed before parsing because both
46
+ defined `--replay-id`; the one option now names both the replay
47
+ streamed from and the namespace published under
48
+ - `--source lldd --ssl` crashed on the missing SSL certificate options,
49
+ now provided as `--ssl-cafile`, `--ssl-certfile`, `--ssl-keyfile`,
50
+ and `--ssl-password`
51
+ - `--source lldd --status-updates` without `--status-topic` crashed in
52
+ igwn-lldd-common; the connector now requires the topic up front
53
+ - `--source lldd --sink lldd`, which cannot work because the two share
54
+ their Kafka options, is rejected with a clear message instead of an
55
+ argparse traceback, and `--source lldd --help` no longer fails on the
56
+ same conflict
57
+
58
+ ## [0.7.2] - 2026-08-28
59
+
60
+ ### Added
61
+
62
+ - `--monitor` feeds the pipeline's run-loop lifecycle to sgnmon, so the
63
+ monitoring server's `/readyz` and `/healthz` probes follow the
64
+ pipeline; systemd's `NOTIFY_SOCKET` reporter is kept alongside it
65
+
66
+ ### Changed
67
+
68
+ - Require `sgn >= 0.12.2` and `sgnmon >= 0.2.1`
69
+
70
+ ## [0.7.1] - 2026-08-26
71
+
72
+ ### Fixed
73
+
74
+ - Every `sgn` log record was printed twice: once unformatted by the
75
+ bare handler `Pipeline.run()` attaches to the `sgn` logger when it
76
+ has none, and once by the connector's root handler. The connector
77
+ now leaves a `NullHandler` on the `sgn` logger so records print once,
78
+ formatted, via the root handler
79
+
80
+ ## [0.7.0] - 2026-08-18
81
+
82
+ ### Added
83
+
84
+ - CLI: `--summary-interval` and `--latency-warn` options for the frames
85
+ sink, passed through to `GWFrameSink`'s periodic activity summary and
86
+ falling-behind warning
87
+ - `LLDDSink`: periodic INFO activity summary (`summary_interval`,
88
+ default 900 s) reporting frames queued, the newest frame's lag behind
89
+ real time, and the publish backlog, doubling as a liveness heartbeat;
90
+ and a `backlog_warn` threshold (default 10 frames) that warns once
91
+ when Kafka publishing falls behind and logs recovery once caught up
92
+
93
+ ### Changed
94
+
95
+ - Logging reworked so INFO is quiet in steady state: per-frame lines
96
+ from `LLDDSource` and `LLDDSink` move to DEBUG after the first frame,
97
+ and frames without any requested channel warn once when the condition
98
+ begins and log recovery instead of warning on every frame
99
+ - Default log levels set `sgn` to INFO (previously WARNING), so element
100
+ startup summaries, state transitions, and periodic activity
101
+ heartbeats are visible in a default run
102
+ - Require `sgn-gwframe >= 0.8`, which provides the `summary_interval`
103
+ and `latency_warn` options the frames sink passes through (and, via
104
+ its own pins, the retention fixes that reap a previous run's leftover
105
+ frame files after a restart), and declare `gpstime` as a direct
106
+ dependency for the publish-lag reporting
107
+
108
+ ## [0.6.0] - 2026-08-13
109
+
110
+ ### Added
111
+
112
+ - CLI: add `--monitor` and `--monitor-port` flags that serve live
113
+ monitoring of the running pipeline via sgnmon: an HTML dashboard,
114
+ Prometheus `/metrics`, and `/health`. Each link is observed once at
115
+ the receiving element, plus post-alignment consumption and per-channel
116
+ source production, and the data-freshness check is scaled to the
117
+ output cadence (`--frame-duration` or `--delta-t`)
118
+
119
+ ### Changed
120
+
121
+ - Require `sgn-gwframe >= 0.7`, so written frame files follow the
122
+ [LIGO-T010150](https://dcc.ligo.org/LIGO-T010150/public) naming
123
+ convention (e.g. `H-SGN-1470690361-1.gwf` rather than
124
+ `H1-SGN-1470690361-1.gwf`)
125
+ - Bump minimum dependency versions to the versions tested against:
126
+ arrakis >= 0.17, igwn-lldd-common >= 0.4.1, sgn >= 0.12,
127
+ sgn-ts >= 0.14
128
+
129
+ ## [0.5.0] - 2026-07-29
130
+
131
+ ### Added
132
+
133
+ - Python 3.14 support: added to the CI test matrix, and the container
134
+ image now runs Python 3.14
135
+ - CLI: add source reconnect options (`--no-reconnect`,
136
+ `--reconnect-backoff`, `--reconnect-backoff-max`, `--max-reconnects`,
137
+ `--reconnect-gap-lag`) for the Arrakis and Frames sources, mapping to
138
+ the resilient streaming introduced in sgn-arrakis 0.8 and
139
+ sgn-gwframe 0.6
140
+ - CLI: add `--queue-timeout` to the Frames source, the wait for the
141
+ next frame file before treating the stream as interrupted
142
+ - CLI: add `--skip-all-gap` to the Frames sink to skip writing files
143
+ whose entire span is gap on every channel
144
+
145
+ ### Changed
146
+
147
+ - Bump minimum dependency versions: arrakis >= 0.14.1, sgn-ts >= 0.13,
148
+ sgn-arrakis >= 0.8, sgn-gwframe >= 0.6
149
+ - CLI: the Frames source `--discont-wait-time` default follows the new
150
+ upstream default of 30 seconds (was 60)
151
+ - Adapt LLDD elements to sgn-ts 0.13 (`Offset.offset_ref_start`
152
+ removed; offsets now count from t=0)
153
+
154
+ ## [0.4.1] - 2026-07-17
155
+
156
+ ### Changed
157
+
158
+ - Require `sgn-gwframe >= 0.5.1` so written frame files respect the
159
+ process umask instead of being created with mode 0600
160
+
161
+ ## [0.4.0] - 2026-06-02
162
+
163
+ ### Added
164
+
165
+ - CLI: add `--replay-id`, `--replay-start`, and `--replay-end` options
166
+ to the Arrakis source for streaming from replay windows
167
+ - CLI: add `--replay-id` option to the Arrakis sink for publishing
168
+ derived channels under a named replay namespace
169
+ - Arrakis sink: filter channels by `replay_id` when discovering
170
+ channels from the publisher
171
+
172
+ ## [0.3.0] - 2026-04-20
173
+
174
+ ### Changed
175
+
176
+ - Adapt to sgn-arrakis 0.5 API (`channels` kwarg replaces
177
+ `source_pad_names`/`sink_pad_names`; stride now configured internally
178
+ by ArrakisSink)
179
+ - Bump minimum dependency versions: sgn >= 0.8, sgn-ts >= 0.8,
180
+ sgn-arrakis >= 0.5, sgn-gwframe >= 0.4
181
+
182
+ ## [0.2.2] - 2026-04-02
183
+
184
+ ### Changed
185
+
186
+ - Bump minimum versions of arrakis and sgn-arrakis
187
+
188
+ ## [0.2.1] - 2026-03-26
189
+
190
+ ### Added
191
+
192
+ - `SGNLOGLEVEL` environment variable to control sgn-specific logger level
193
+ - Derive ArrakisSink block duration from channel stride metadata
194
+
195
+ ### Changed
196
+
197
+ - LLDDSource reads only requested channels instead of all channels in frame
198
+
199
+ ## [0.2.0] - 2026-03-24
200
+
201
+ ### Added
202
+
203
+ - Fake source for generating synthetic test signals
204
+ - Frames source and sink (GWF file watch and write)
205
+ - LLDD sink for publishing frames to Kafka
206
+
207
+ ### Changed
208
+
209
+ - Rewrite CLI pipeline building on top of SGN framework
210
+ - Drop Python 3.10 support
211
+
212
+ ## [0.1.0] - 2025-11-06
213
+
214
+ - Initial release.
215
+
216
+ [unreleased]: https://git.ligo.org/ngdd/igwn-connect/-/compare/0.8.0...main
217
+ [0.8.0]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.8.0
218
+ [0.7.3]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.7.3
219
+ [0.7.2]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.7.2
220
+ [0.7.1]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.7.1
221
+ [0.7.0]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.7.0
222
+ [0.6.0]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.6.0
223
+ [0.5.0]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.5.0
224
+ [0.4.1]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.4.1
225
+ [0.4.0]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.4.0
226
+ [0.3.0]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.3.0
227
+ [0.2.2]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.2.2
228
+ [0.2.1]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.2.1
229
+ [0.2.0]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.2.0
230
+ [0.1.0]: https://git.ligo.org/ngdd/igwn-connect/-/tags/0.1.0
@@ -0,0 +1,36 @@
1
+ # build stage: export locked dependencies and build the wheel
2
+ FROM ghcr.io/astral-sh/uv:0.11-python3.14-trixie AS build
3
+
4
+ WORKDIR /app
5
+ COPY . .
6
+
7
+ RUN uv export --no-editable --no-emit-project --locked --no-hashes \
8
+ --format requirements.txt -o requirements.txt
9
+ RUN uv build --wheel
10
+
11
+ # install stage: install dependencies and project into virtualenv
12
+ FROM python:3.14-trixie AS install
13
+
14
+ WORKDIR /app
15
+ COPY --from=build /app/requirements.txt /app
16
+ COPY --from=build /app/dist/*.whl /app
17
+
18
+ RUN python -m venv /opt/venv
19
+ ENV PATH="/opt/venv/bin:$PATH"
20
+
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+ RUN pip install --no-cache-dir --no-deps *.whl
23
+
24
+ # final stage: minimal runtime image
25
+ FROM python:3.14-slim-trixie
26
+
27
+ COPY --from=install /opt/venv /opt/venv
28
+
29
+ RUN groupadd --gid 1000 connector && \
30
+ useradd --uid 1000 --gid 1000 -m connector
31
+
32
+ USER connector
33
+
34
+ ENV PATH="/opt/venv/bin:$PATH"
35
+
36
+ ENTRYPOINT ["igwn-connect"]