Skip to content

Update to 0.6.0#490

Merged
Gab-D-G merged 2 commits intomasterfrom
version_0.6.0
Mar 27, 2026
Merged

Update to 0.6.0#490
Gab-D-G merged 2 commits intomasterfrom
version_0.6.0

Conversation

@Gab-D-G
Copy link
Collaborator

@Gab-D-G Gab-D-G commented Mar 26, 2026

Summary by CodeRabbit

  • Chores

    • Bumped project version to 0.6.0 and updated release date in metadata.
  • Documentation

    • Updated documentation release identifier and docs dependency to match 0.6.0.
  • User-facing fixes

    • Clarified CLI help for timeseries interval format (now uses "0-80" style).
  • Improvements

    • Enhanced QC processing: increased memory allocation and explicit cleanup to improve QC report/video reliability and reduce runtime memory pressure.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 26, 2026

📝 Walkthrough

Walkthrough

Bump package release from 0.5.5 → 0.6.0 across metadata, docs, and dependency, update CLI help text formatting, and change HMC QC code: memory allocation increase, modified HMC_derivatives return signature, updated caller uses, and added explicit deletions for intermediates.

Changes

Cohort / File(s) Summary
Version Management
rabies/__version__.py
Updated VERSION tuple from (0, 5, 5)(0, 6, 0), changing exported __version__ string.
Citation & Documentation Metadata
CITATION.cff, docs/conf.py
Bumped software version 0.5.50.6.0 and date-released 2025-12-192026-03-26; updated Sphinx release.
Documentation Dependencies
docs/requirements.txt
Bumped rabies dependency version from 0.5.50.6.0.
CLI Help Text
rabies/parser.py
Adjusted --timeseries_interval help example formatting from 0,800-80 (help string only).
Preprocessing — HMC QC
rabies/preprocess_pkg/hmc.py
Increased hmc_qc_node memory allocation (multiplied by 20 when QC report applied); changed HMC_derivatives(...) to return (img_preHMC, img_postHMC, derivatives_dict) instead of embedding images in the dict; updated HMC_QC._run_interface to consume the new tuple, added status prints and explicit del statements to release intermediates.

Sequence Diagram(s)

(Skipped — changes do not meet the multi-component sequence diagram criteria.)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through lines of version and doc,
Swapped dates and numbers — a tidy small shock.
I nudged the HMC to free bits it keeps,
Memory grows, old intermediates fall asleep.
A tiny release dance — nibble, thump, and clock. 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Update to 0.6.0' is vague and lacks specificity about the actual changes made beyond the version number. Consider a more descriptive title that clarifies the scope of changes, such as 'Release version 0.6.0' or 'Bump version to 0.6.0 and update documentation'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch version_0.6.0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
rabies/preprocess_pkg/hmc.py (2)

61-63: Avoid baking the 20x QC memory bump into the workflow.

opts.scale_min_memory is already the scheduler-facing scaling input, so another unconditional *20 makes this node's footprint cluster-specific and hard to tune. Please move this multiplier into config/CLI instead of hard-coding it here.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rabies/preprocess_pkg/hmc.py` around lines 61 - 63, The hmc_qc_node currently
hard-codes a 20x memory multiplier (mem_gb=1.1*opts.scale_min_memory*20), which
should be moved to configuration/CLI; remove the unconditional *20 in the
hmc_qc_node creation so mem_gb uses 1.1*opts.scale_min_memory, add a new
config/CLI option (e.g. opts.hmc_qc_memory_multiplier or
opts.scale_memory_multiplier) and apply that multiplier when the user sets it
(mem_gb = 1.1 * opts.scale_min_memory * opts.hmc_qc_memory_multiplier), and
update the CLI/config parsing and documentation to expose and default this
multiplier rather than baking it into the HMC_QC/hmc_qc_node instantiation.

275-277: Close the Matplotlib figure after writing it.

plot_motion_QC() creates the figure through matplotlib.pyplot, so it stays registered until explicitly closed. In this already RAM-sensitive node, releasing it right after savefig() will help keep worker memory flatter.

Proposed fix
         print('Creating QC figure...')
         fig = plot_motion_QC(derivatives_dict, self.inputs.ref_file, plot_R2=False)
         fig.savefig(figure_path, bbox_inches='tight')
+        import matplotlib.pyplot as plt
+        plt.close(fig)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rabies/preprocess_pkg/hmc.py` around lines 275 - 277, The Matplotlib figure
created by plot_motion_QC remains registered after savefig causing memory to
accumulate; after fig.savefig(figure_path, bbox_inches='tight') call, close and
release the figure (e.g., call matplotlib.pyplot.close(fig) or fig.close()) to
free memory; ensure matplotlib.pyplot is imported in the module if not present
and add the close call immediately after the savefig line in the same block
where plot_motion_QC is used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@rabies/preprocess_pkg/hmc.py`:
- Around line 61-63: The hmc_qc_node currently hard-codes a 20x memory
multiplier (mem_gb=1.1*opts.scale_min_memory*20), which should be moved to
configuration/CLI; remove the unconditional *20 in the hmc_qc_node creation so
mem_gb uses 1.1*opts.scale_min_memory, add a new config/CLI option (e.g.
opts.hmc_qc_memory_multiplier or opts.scale_memory_multiplier) and apply that
multiplier when the user sets it (mem_gb = 1.1 * opts.scale_min_memory *
opts.hmc_qc_memory_multiplier), and update the CLI/config parsing and
documentation to expose and default this multiplier rather than baking it into
the HMC_QC/hmc_qc_node instantiation.
- Around line 275-277: The Matplotlib figure created by plot_motion_QC remains
registered after savefig causing memory to accumulate; after
fig.savefig(figure_path, bbox_inches='tight') call, close and release the figure
(e.g., call matplotlib.pyplot.close(fig) or fig.close()) to free memory; ensure
matplotlib.pyplot is imported in the module if not present and add the close
call immediately after the savefig line in the same block where plot_motion_QC
is used.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e309d8d3-0f8a-4925-bfbe-6fc05b1eb4d5

📥 Commits

Reviewing files that changed from the base of the PR and between 3adcf9e and 39ed5b8.

📒 Files selected for processing (2)
  • rabies/parser.py
  • rabies/preprocess_pkg/hmc.py
✅ Files skipped from review due to trivial changes (1)
  • rabies/parser.py

@Gab-D-G Gab-D-G merged commit 90cda37 into master Mar 27, 2026
3 checks passed
@Gab-D-G Gab-D-G deleted the version_0.6.0 branch March 27, 2026 09:57
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.

1 participant