Draft: Add pre-commit-hook#598
Conversation
|
as a follow up to our discussion yesterday at the Decfiles repo, here a codex-based draft version of the pre-commit-hook. Before marking this as ready, I will test this for sure a bit more in depth. But at least it already goes along the lines, I would like it to be eventually. Details we can probably discuss once we align on a conceptual vision of the tool. |
|
Hello. I am overwhelmed these days. It is a good problem to have ... ;-) I will try and get back to you this week. I am also adding @henryiii to the review for all his expertise. Thank you very much! |
|
Here's a quick AI review from Opus 4.8, you can feed this back into codex (rubber duck style) if you wish. Thanks for letting me know what model you are using, so I know which model to review with. :) From my fairly quick look at the moment, this looks a lot like flake8, which is a good thing. Idea seems good too. (Needs a rebase, too, of course) 🤖 AI text below 🤖 I've completed a thorough review of PR #598. Here's my assessment. Review: PR #598 — Add
|
|
Yes, that is fine. I am on holidays for one and a half week, so not sure when I have the time to act on it. But once I am back, I will do it as one of the first things. |
|
And thanks for the review by the way. It all sounds reasonable. |
|
Super! My all means do enjoy your hols! No rush. Thank you. |
Summary
Add a first-party
decaylanguage-validatecommand and pre-commit hook for validating EvtGen.decfiles withDecFileParser.The validator reports stable diagnostic codes so downstream experiments can choose their own policy, for example ignoring LHCb-style unmatched
CDecaysource warnings with--ignore=DLW004.Changes
decaylanguage.dec.validatewith a CLI entry point exposed asdecaylanguage-validate..pre-commit-hooks.yamlso external repositories can useid: decaylanguage-validate..decfiles, excluding intentional negative fixtures.DLP001parse errorsDLW001duplicateDecayblocksDLW002missingCopyDecaysourceDLW003duplicateDecay/CDecayDLW004missingCDecaysourceDLW005self-conjugateCDecayDLW999unclassified parser warnings--max-diagnostics.Testing
Also tested on the local LHCb DecFiles checkout:
This leaves
DLP001,DLW001, andDLW003diagnostics after ignoring the expected LHCb-styleDLW004findings.