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

delete unreachable code #1322

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Jul 22, 2024

As noted c49de36#r144502886

#1241 included unreachable code.

This is being flagged by sonarqube and preventing regression tests.

This PR deletes the unreachable code. I can also confirm that I intended to delete the code for #1241 but missed it in the swatch of changes.

Regression tests running:
https://github.com/spacetelescope/RegressionTests/actions/runs/10043812086
passed quality gate, tests running.

Fixes: #1321

Checklist

  • added entry in CHANGES.rst under the corresponding subsection
  • updated relevant tests
  • updated relevant documentation
  • updated relevant milestone(s)
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below. How to run regression tests on a PR

@zacharyburnett
Copy link
Collaborator

whoops sorry, jumped the gun and made a duplicate PR 😅

Copy link
Collaborator

@schlafly schlafly left a comment

Choose a reason for hiding this comment

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

Feel free to merge when you're ready; clearly orphaned code.

Out of curiosity, the orphaned code looks to play the buffering game; is that a feature that we still have elsewhere? Thanks!

@braingram braingram marked this pull request as ready for review July 22, 2024 15:51
@braingram braingram requested a review from a team as a code owner July 22, 2024 15:51
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.12%. Comparing base (c49de36) to head (5916052).
Report is 187 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1322      +/-   ##
==========================================
- Coverage   79.12%   79.12%   -0.01%     
==========================================
  Files         117      117              
  Lines        7824     7823       -1     
==========================================
- Hits         6191     6190       -1     
  Misses       1633     1633              
Flag Coverage Δ *Carryforward flag
nightly 63.39% <ø> (ø) Carriedforward from c49de36

*This pull request uses carry forward flags. Click here to find out more.

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

@braingram
Copy link
Collaborator Author

Feel free to merge when you're ready; clearly orphaned code.

Out of curiosity, the orphaned code looks to play the buffering game; is that a feature that we still have elsewhere? Thanks!

Thanks! The orphaned code is all pertaining to the get_sections API of ModelContainer. This didn't quite work as intended (it didn't prevent loading all models into memory and in the worst case would read each model fresh from disk for every ~1 MB of input data).

The ModelLibrary does not have get_sections and instead the code now computes the median of the already in-memory models. Outlier detection will continue to be a bottleneck for large associations until the median algorithm can be reworked. I'm happy to provide more details if they're helpful.

@braingram
Copy link
Collaborator Author

Regression tests show only the expected minor differences from #1241

@braingram braingram merged commit a8d1007 into spacetelescope:main Jul 22, 2024
34 of 37 checks passed
@braingram braingram deleted the delete_unreachable branch July 22, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sonarqube issue Delete this unreachable code or refactor the code to make it reachable.
3 participants