Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle recursion in imageseries get_region() #787

Merged
merged 1 commit into from
Mar 27, 2025
Merged

Conversation

psavery
Copy link
Collaborator

@psavery psavery commented Mar 27, 2025

Sometimes (as is the case for OmegaImageSeries), self._adapter is itself an imageseries, rather than an imageseries adapter.

To handle this recursion, use a forwarding function on the ImageSeries base class to forward the call to its adapter (which, if the adapter is itself an imageseries, will then forward the call to its own adapter).

This fixes running this example.

Sometimes (as is the case for `OmegaImageSeries`),
`self._adapter` is itself an imageseries, rather than an imageseries
adapter.

To handle this recursion, use a forwarding function on the
`ImageSeries` base class to forward the call to its adapter (which,
if the adapter is itself an imageseries, will then forward the call
to its own adapter).

This fixes running [this example](https://github.com/HEXRD/examples/blob/master/NIST_ruby/multiruby_dexelas/include/mruby_config_composite_roi.yml).

Signed-off-by: Patrick Avery <[email protected]>
@psavery psavery requested a review from ChristosT March 27, 2025 17:19
Copy link

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.36%. Comparing base (eb22a0b) to head (e1e6011).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #787   +/-   ##
=======================================
  Coverage   48.35%   48.36%           
=======================================
  Files         143      143           
  Lines       22860    22863    +3     
=======================================
+ Hits        11054    11057    +3     
  Misses      11806    11806           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@ChristosT ChristosT left a comment

Choose a reason for hiding this comment

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

Looks great! By the way how come we didn't catch that in the CI ? Is this example skipped from the tests ?

@psavery
Copy link
Collaborator Author

psavery commented Mar 27, 2025

Yeah, not every example is ran in the tests. Maybe we should add that one.

@psavery psavery merged commit 9ecd34a into master Mar 27, 2025
7 checks passed
@psavery psavery deleted the reorganize-get-region branch March 27, 2025 17:52
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