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

include opencv-python in instructions to generate SDP requirements #7474

Merged

Conversation

zacharyburnett
Copy link
Collaborator

@zacharyburnett zacharyburnett commented Mar 1, 2023

Resolves JP-3109

spacetelescope/stcal#126 and spacetelescope/stcal#136 made opencv-python an optional dependency (as built binaries are not available on all user platforms). This PR adds opencv-python to the instructions for creating requirements-sdp.txt, to ensure the environment has opencv-python installed.

Checklist for maintainers

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • Make sure the JIRA ticket is resolved properly

@zacharyburnett zacharyburnett self-assigned this Mar 1, 2023
@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented Mar 1, 2023

Options going forward:

  1. restore opencv-python to a hard dependency in setup.cfg - this would break some users' workflows, but perhaps they can move to a platform that has built binaries, or figure out how to build opencv-python on their own
  2. use a less heavy dependency
  3. use binary operations instead of ellipse / circle fitting:

    Perhaps going too far, a much simpler approach would be to not fit circles and ellipses at all (which can lead to fitting errors and masking half the image), but to use scipy.ndimage.binary_dilation instead. Just grow regions. And select regions of a minimum area to grow using scipy.ndimage.binary_erosion. This is vastly simpler and probably more robust. And handles shapes that are not exactly circles or ellipses.
    Opencv dependency in stcal being optional causes uncaught error in jump step #7409 (comment)

@hbushouse hbushouse added this to the Build 9.1 milestone Mar 1, 2023
@zacharyburnett zacharyburnett changed the title include opencv-python in instructions to generate SDP requirements include opencv-python in instructions to generate SDP requirements Mar 1, 2023
@codecov
Copy link

codecov bot commented Mar 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (4285c4e) 77.58% compared to head (c2ff3af) 77.58%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7474   +/-   ##
=======================================
  Coverage   77.58%   77.58%           
=======================================
  Files         449      449           
  Lines       36029    36029           
=======================================
  Hits        27952    27952           
  Misses       8077     8077           
Flag Coverage Δ *Carryforward flag
nightly 77.58% <ø> (ø) Carriedforward from 4285c4e
unit 49.57% <ø> (ø)

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

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zacharyburnett zacharyburnett marked this pull request as ready for review March 2, 2023 14:08
@zacharyburnett zacharyburnett merged commit 7f105eb into spacetelescope:master Mar 2, 2023
@zacharyburnett zacharyburnett deleted the opencv_sdp_requirements branch March 2, 2023 14:19
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.

2 participants