add more police functions on groupings files and on statuses#123
add more police functions on groupings files and on statuses#123
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #123 +/- ##
==========================================
- Coverage 64.34% 58.46% -5.89%
==========================================
Files 8 9 +1
Lines 561 797 +236
==========================================
+ Hits 361 466 +105
- Misses 200 331 +131 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR extends legendmeta.police with additional CLI validators for calibration/physics groupings and status files, adding shared validation utilities and corresponding tests.
Changes:
- Added
validate-cal-groupings,validate-phy-groupings, andvalidate-statusesCLI entry points. - Implemented shared groupings validation logic (ordering, naming conventions, overridden-run checks) plus run-override window detection.
- Introduced
legendmeta.utils.expand_runs()to expand run ranges/lists, with new unit tests covering override and sorting behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/test_police.py |
Adds unit tests for overridden-run detection and groupings-file validation rules. |
src/legendmeta/utils.py |
Adds expand_runs() and run-spec regex helpers used by groupings validation. |
src/legendmeta/police.py |
Adds new validators (validate_statuses, groupings validators) and shared helper functions. |
pyproject.toml |
Registers new CLI scripts for the added validators. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/legend-exp/pylegendmeta/sessions/4c6b902a-c48d-4709-8c7f-c5c9cbf92629 Co-authored-by: ggmarshall <72088559+ggmarshall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/legend-exp/pylegendmeta/sessions/21e7ef15-5134-45f6-9941-c3f04813cbe0 Co-authored-by: ggmarshall <72088559+ggmarshall@users.noreply.github.com>
|
you also need to register them as pre-commit hooks in the config file. there's also a way in pre-commit to use a local repository for the hooks, you can use it to test the hooks before we release a new version |
|
Ok this all runs locally, it is going to raise some errors when run but these are things that should be fixed, in particular, enforcing the addition of reason fields to sipm and pmt statuses and enforcing the partitions file is sorted |
|
now you have to run |
No description provided.