Skip to content

devmon: lean cron install (11 pinned packages, Python >= 3.10 check) - #135

Merged
runck014 merged 2 commits into
feature/device-monitoring-updatesfrom
devmon/lean-install
Oct 16, 2026
Merged

runck014 merged 2 commits into
feature/device-monitoring-updatesfrom
devmon/lean-install

Conversation

@runck014

Copy link
Copy Markdown
Contributor

The MSI cron no longer runs install.sh: it builds its venv from
src/rtgs_lab_tools/device_monitoring/requirements-cron.txt (11 pinned packages, 39 with deps,
vs 221 for .[all]) plus pip install --no-deps -e ., on a pinned Python module, and refuses
to start if no Python >= 3.10 is found (agate's default python3 is 3.6.8).

  • 70bb47a: top-level rtgs_lab_tools names resolve lazily (PEP 562), so device monitoring no
    longer imports matplotlib/visualization at load.
  • 036070a: requirements-cron.txt, cron script venv build, 3 new cron tests, README, CI installs
    exactly requirements-cron.txt.

Tests: 38/38 device_monitoring in the lean venv; 187/187 in a full venv. Venv 167 MB vs 821 MB.

🤖 Generated with Claude Code

https://claude.ai/code/session_0149VSJ7dmCkXd4UcUjQbG9R

runck014 and others added 2 commits October 16, 2026 13:33
Importing any subpackage runs the package __init__ first, and it eagerly imported
visualization (matplotlib), device_configuration, sensing_data and the parsers. Every tool,
including the MSI device-monitoring cron, paid for all of them. The same public names now
resolve on first use; `from rtgs_lab_tools import X` is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0149VSJ7dmCkXd4UcUjQbG9R
The first MSI run spent 24 min in install.sh (`uv pip install -e ".[all]"`: streamlit,
pyarrow, netcdf4, mypy, ...) and stalled; on agate a bare `module load python` also left
/usr/bin/python3 = 3.6.8 on PATH.

- requirements-cron.txt: the 11 packages the publisher path imports (pins from uv.lock).
- The script loads DEVICEMON_PYTHON_MODULE (default python3/3.12.4_anaconda2024.06-1_libmamba)
  or takes DEVICEMON_PYTHON, picks python3/python >= 3.10 by absolute path, and stops with a
  message otherwise. It builds venv/ with `$PY -m venv`, then `pip install -r
  requirements-cron.txt` + `pip install --no-deps -e .`, once per release. It never runs
  install.sh or the base/extra dependencies. A venv on an old Python is refused.
- The cron runs `venv/bin/python -m rtgs_lab_tools.device_monitoring.cli` (a missing module
  is a traceback, not "No such command"); `rtgs device-monitoring` still works on full
  installs.
- CI installs exactly requirements-cron.txt, so a new import fails the PR, not the 04:27 run.
- Tests: an old interpreter is refused before any venv; the venv build runs only the two
  lean pip commands, is not group-writable, runs check-ingest then monitor through the
  module CLI, and a second run of the same release installs nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0149VSJ7dmCkXd4UcUjQbG9R
@runck014
runck014 merged commit 1939696 into feature/device-monitoring-updates Oct 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant