-
Notifications
You must be signed in to change notification settings - Fork 1
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
Save masks hook #35
Save masks hook #35
Conversation
27a1b39
to
7e7e8eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @gdynusa for the migration.
emloop/hooks/save_masks.py
Outdated
import collections | ||
import logging | ||
|
||
import cv2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please only try
this import and if it fails, produce an exception with a reasonable message informing the user that this is an optional and requires OpenCV. Make sure that emloop works even when opencv is not installed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FloopCZ so the package & dependency installation in CircleCI config should stay there? And if the import produces exception than tests will fail so should I skip them in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, basically
- catch
ImportError
as @FloopCZ suggested - in one test-container: install opencv in CircleCI and run full tests (all must succeed)
- in second test-container: don't install opencv and run all tests without those requiring opencv (all must succeed)
Also the package is |
7e7e8eb
to
08d0c13
Compare
92186ef
to
37ad2f9
Compare
37ad2f9
to
ce3ddc5
Compare
.circleci/config.yml
Outdated
run: | ||
name: Install opencv dependencies on Arch Linux. | ||
command: | | ||
pacman -Syu --noconfirm opencv opencv-samples hdf5 gtk3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need opencv-samples
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might try without it and we'll see, this configuration was what I found on stackoverflow discussion
.circleci/config.yml
Outdated
name: Install opencv dependencies on Ubuntu. | ||
command: | | ||
export DEBIAN_FRONTEND=noninteractive | ||
apt-get install -y --force-yes opencv-data libopencv-dev python3-opencv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need opencv-data
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied this line from blocks config, as above, I'll try without it and we'll see
.circleci/config.yml
Outdated
@@ -126,6 +175,9 @@ workflows: | |||
- test_ubuntu_latest | |||
- test_ubuntu_rolling | |||
- test_archlinux | |||
- test_ubuntu_latest_opencv | |||
- test_ubuntu_rolling_opencv | |||
- test_archlinux_opencv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about instead of installing the system all over, we would just test it without opencv, than install opencv to the same system and then test it again? (i.e., just adding two steps to the old test_ubuntu_latest
etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
51cb100
to
15331b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @gdynusa !
No description provided.