Repository navigation
devmon: lean cron install (11 pinned packages, Python >= 3.10 check) - #135
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MSI cron no longer runs
install.sh: it builds its venv fromsrc/rtgs_lab_tools/device_monitoring/requirements-cron.txt(11 pinned packages, 39 with deps,vs 221 for
.[all]) pluspip install --no-deps -e ., on a pinned Python module, and refusesto start if no Python >= 3.10 is found (agate's default
python3is 3.6.8).rtgs_lab_toolsnames resolve lazily (PEP 562), so device monitoring nolonger imports matplotlib/visualization at load.
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