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

ENH: Comment out unused variable #125

Merged

Conversation

jhlegarreta
Copy link
Contributor

Comment out unused variable: getting the largest possible region of the superclass (ImageToImageFilter) is most likely being exercised in ITK proper.

Keep the commented code in case it is found to be useful when revisiting it in the future.

Fixes:

test/itkMorphologicalContourInterpolationTest.cxx:37:34:
 warning: unused variable 'reg' [-Wunused-variable]
   37 |   typename ImageType::RegionType reg = test->GetLargestPossibleRegion();
      |                                  ^~~

raised for example in:
https://open.cdash.org/viewBuildError.php?type=1&buildid=10154304

@jhlegarreta
Copy link
Contributor Author

@jhlegarreta
Copy link
Contributor Author

I am happy to remove the entire block if we believe is better.

@blowekamp
Copy link

I am happy to remove the entire block if we believe is better.

Yes, I think this would be the better approach. We don't want to keep code history in commented out code.

Remove unused variable and commented code block: getting the largest
possible region of the superclass (`ImageToImageFilter`) is most likely
being exercised in ITK proper.

Fixes:
```
test/itkMorphologicalContourInterpolationTest.cxx:37:34:
 warning: unused variable 'reg' [-Wunused-variable]
   37 |   typename ImageType::RegionType reg = test->GetLargestPossibleRegion();
      |                                  ^~~
```

raised for example in:
https://open.cdash.org/viewBuildError.php?type=1&buildid=10154304
@jhlegarreta jhlegarreta force-pushed the FixUnusedVariableCompilerWarning branch from 4ab1351 to cfc760f Compare January 23, 2025 16:25
@jhlegarreta
Copy link
Contributor Author

Yes, I think this would be the better approach. We don't want to keep code history in commented out code.

Done. Force pushed.

@dzenanz
Copy link
Member

dzenanz commented Jan 23, 2025

@jhlegarreta
Copy link
Contributor Author

Thanks @dzenanz. Added commit c094347.

@jhlegarreta
Copy link
Contributor Author

A new RLEImage release is needed, as this fix in KitwareMedical/ITKRLEImage#67 needs to be included so that the build can succeed:
https://open.cdash.org/viewBuildError.php?buildid=10163759

@dzenanz Any chance to do that? Not sure if that involves bumping the version in pyproject.toml as well: I remember some discussion about that, but cannot find it now :-/.

@dzenanz
Copy link
Member

dzenanz commented Jan 23, 2025

A PR which changes the version number getting merged, and then creating a tag in GitHub web interface.

@dzenanz
Copy link
Member

dzenanz commented Jan 23, 2025

I think the only place where version is specified is here:
https://github.com/KitwareMedical/ITKRLEImage/blob/main/pyproject.toml#L7

@jhlegarreta
Copy link
Contributor Author

👍 Sounds good.

@jhlegarreta
Copy link
Contributor Author

@dzenanz The new version will need to be uploaded to PyPI as well. Thanks.

@dzenanz
Copy link
Member

dzenanz commented Jan 24, 2025

I made a tag:
https://github.com/KitwareMedical/ITKRLEImage/releases/tag/v1.0.2

When CI finishes, it should automatically publish a new version on PyPI.

@jhlegarreta
Copy link
Contributor Author

Unless the version in pyproject.toml changes, the package information will then have the wrong version information, right?

@dzenanz
Copy link
Member

dzenanz commented Jan 24, 2025

Yes, I bumped that version, see KitwareMedical/ITKRLEImage@44c747a.

@jhlegarreta jhlegarreta force-pushed the FixUnusedVariableCompilerWarning branch from c094347 to 5cfc32c Compare January 24, 2025 15:38
Add `RLEImage` as an ITK module dependency to the GHA `built, test,
package` workflow file.
@jhlegarreta jhlegarreta force-pushed the FixUnusedVariableCompilerWarning branch from 5cfc32c to d6c3398 Compare January 24, 2025 16:20
@jhlegarreta
Copy link
Contributor Author

jhlegarreta commented Jan 24, 2025

CI is green; no warnings in the dahsboard: https://open.cdash.org/index.php?project=Insight

Ready to be merged. Thanks for the hard work @dzenanz !

@dzenanz dzenanz merged commit 40774af into KitwareMedical:main Jan 24, 2025
28 checks passed
@dzenanz dzenanz mentioned this pull request Jan 24, 2025
@jhlegarreta jhlegarreta deleted the FixUnusedVariableCompilerWarning branch January 24, 2025 17:09
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.

3 participants