From b3a608a9398147aa65818f35a99121d59f805180 Mon Sep 17 00:00:00 2001 From: Nora Date: Wed, 8 Jul 2026 22:36:38 -0600 Subject: [PATCH] refactor(sp24): deprecation shim for scripts/reissue_claims.py The old script is replaced by . This commit keeps the file in scripts/ as a thin shim that prints a DeprecationWarning at import time and delegates to cyclone.cli.main. - shows the canonical group output (since main() is the Click group). - shows the same help as . - The DeprecationWarning fires at import time so any cron job / test that imports the script surfaces the migration. Removed in a follow-up SP after the operator's muscle memory has switched to the CLI subcommand. --- scripts/reissue_claims.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 scripts/reissue_claims.py diff --git a/scripts/reissue_claims.py b/scripts/reissue_claims.py new file mode 100755 index 0000000..2ac9e50 --- /dev/null +++ b/scripts/reissue_claims.py @@ -0,0 +1,37 @@ +"""DEPRECATED shim — use ``cyclone reissue-claims`` instead. + +This script previously hosted the operator's one-shot workflow for +rebuilding the 2026-07-08 dzinesco July-8 batches into 358 IG-correct +single-claim X12 files. The workflow now lives in +:mod:`cyclone.reissue` and is exposed as the Click subcommand +``cyclone reissue-claims``. See +``docs/superpowers/specs/2026-07-08-cyclone-reissue-claims-design.md`` +for the SP24 rationale. + +Behavior preserved: ``python scripts/reissue_claims.py --help`` +shows the canonical ``cyclone --help`` group help (then ``reissue-claims +--help`` follows the same Click flow as ``cyclone reissue-claims --help``). +A ``DeprecationWarning`` is emitted at import time so the operator's +tests / cron jobs catch the migration. +""" +from __future__ import annotations + +import sys +import warnings + +warnings.warn( + "`scripts/reissue_claims.py` is deprecated; use " + "`cyclone reissue-claims` (the Click subcommand) for the canonical " + "offline reissue workflow. This shim is removed in a follow-up SP.", + DeprecationWarning, + stacklevel=2, +) + +from cyclone.cli import main # noqa: E402 (import after the warning) + + +if __name__ == "__main__": + # The Click group expects the subcommand as argv[1]; strip the + # script argv prefix so `python scripts/reissue_claims.py --help` + # behaves like `cyclone --help`. + sys.exit(main()) \ No newline at end of file