Skip to content

feat: Add debug switch for intermediate growth tests in CMPB - #46

Open
dyrpsf wants to merge 1 commit into
draeger-lab:devfrom
dyrpsf:feature/cmpb-debug-growth
Open

feat: Add debug switch for intermediate growth tests in CMPB#46
dyrpsf wants to merge 1 commit into
draeger-lab:devfrom
dyrpsf:feature/cmpb-debug-growth

Conversation

@dyrpsf

@dyrpsf dyrpsf commented Jul 17, 2026

Copy link
Copy Markdown

Description

This PR addresses an inline @TODO left by @GwennyGit in src/specimen/cmpb/workflow.py regarding the inclusion of debug switches to test growth at every step.

Previously, the CMPB workflow ran computationally expensive growth simulations at five intermediate stages unconditionally. This update introduces a debug_growth toggle to the run() entry point to optimize standard runtime, while preserving the ability to generate those intermediate reports when needed.

Tagging @cb-Hades for review as the primary maintainer!

Key Changes

  • Entry Point Update: Added debug_growth: bool = False to the run() function signature.
  • Performance Optimization: Wrapped the intermediate between_growth_test() calls (after draft, gapfill, duplicate removal, ModelPolisher, and EGCs) inside if debug_growth: checks.
  • Final Report Preserved: The final growth test at the end of the pipeline remains unconditional, ensuring standard runs still produce the final growth analysis.

Resolves inline TODO by wrapping intermediate growth tests in a debug toggle.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CMPB workflow entry point to support an optional debug mode for running intermediate growth tests, reducing default runtime while preserving final growth reporting.

Changes:

  • Added a debug_growth: bool = False parameter to src/specimen/cmpb/workflow.py:run().
  • Wrapped intermediate between_growth_test() calls behind if debug_growth: checks while keeping the final growth test unconditional.
  • Performed minor formatting/cleanup (imports, string quotes, line wrapping) consistent with the existing code style.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

################################################################################


# @TODO Add debug switches to test growth on every step (Maybe also on full medium?) -> Maybe as entry point?
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.

2 participants