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
Updates for Travis: new python #974
Conversation
.travis.yml
Outdated
directories: | ||
- $HOME/.cache/pip | ||
- /tmp/ffmpeg/bin | ||
sudo: false |
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.
My take is you don't need the sudo and dist lines because these are not Travis defaults and it would be a bummer to lock in trusty when Travis updates distro but this is minor stuff.
@@ -1,62 +1,54 @@ | |||
language: python |
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.
Really cool stuff!! Just some minor comments...
.travis.yml
Outdated
- gfortran | ||
- libopenblas-dev | ||
- liblapack-dev | ||
- python-pyexiv2 | ||
- yasm | ||
install: | ||
- pip install -U --upgrade pip |
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.
Could this be --user
instead of -U
? Explicit is better than... I forgot to do this on an earlier PR.
3a10fe6
to
53d501a
Compare
should be all good now |
Hi @kkopachev, Who is the copyright holder of tests/fixtures/filters/redeye.png, could you please add this info and the license? |
@marcelometal It's public domain. Not sure where to add that info. |
@kkopachev, maybe here tests/fixtures/filters/README.mkd ? |
@marcelometal done! Thanks. |
.travis.yml
Outdated
directories: | ||
- $HOME/.cache/pip | ||
sudo: false | ||
- /tmp/ffmpeg/bin |
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.
🎉
Hey, @kkopachev. Can you please:
Thank you very much! |
@scorphus do you prefer a way of pulling ffmpeg off of zesty repo - requires sudo on travis, might be slow to start the test. Or preserve ffmpeg compile stage and use travis cache? |
Hey @kkopachev. Glad you're still with us! 🤗 @marcelometal's PR – #975 – that installs ffmpeg from zesty was already merged, so I guess we're good on that. |
7fe4a7d
to
79dc61e
Compare
updated |
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.
That's all I could review for now. @marcelometal, can you please chime in and give us your thoughts?
"flake8", | ||
"yanc", | ||
"remotecv", | ||
"pyssim", | ||
"pyssim>=0.4.0", |
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'm wondering why we're setting a lower threshold for pyssim
here. There's nothing different in tests nor in docs on this commit. I looked briefly but could not see any relation between pyssim >= 0.4 and latest Python versions. Excuse me if I missed something.
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.
so, this is only a list of test dependencies.
previously, scipy was manually included, but never used directly anywhere in the code. Only usage was through pyssim.
Pyssim, in it's turn, does not seem to install its dependencies automatically, up to latest release (0.4). jterrace/pyssim#24
Now that pyssim can automatically install it's own dependencies, I decided to remove explicit require of scipy
, as it was not directly used and let pip's pyssim do the magic.
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.
Oh, my bad, didn't notice that diff regarded changes made to test_require
.
"cairosvg>=1.0.0,<2.0.0,!=1.0.21", | ||
"preggy>=1.3.0", | ||
"opencv-python", |
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.
Here we're making this a mandatory dependency, which is not the case for Thumbor, I believe. Only if the user decides to use such engine and configure Thumbor to do so and in such cases he/she should install the desired engine. Perhaps docs regarding this should be improved.
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.
This is a list of test dependencies. opencv could be used in PIL engine to convert 16bit TIFFs to png.
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.
ah, it's also used in redeye filter and detectors. And in order to test that it's all required.
@@ -1,23 +1,23 @@ | |||
language: python | |||
python: | |||
- 2.7_with_system_site_packages |
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.
so, with_system_site_packages
thing forces travis to use whatever python is shipped with distribution. IIRC it's 2.7.6 at the moment. Then there were some problems installing opencv... It was easier to go with virtualenv and install packages from pip instead (reason to upgrade from cv/cv2 to cv3)
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.
This is a nice improvement.
79dc61e
to
6de04cb
Compare
Any updates here? |
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.
There is some good stuff. What is to be done before it is considered done?
.travis.yml
Outdated
before_install: | ||
- echo "deb http://archive.ubuntu.com/ubuntu zesty main universe" | sudo tee --append /etc/apt/sources.list | ||
- sudo apt-get update | ||
- sudo apt-get install ffmpeg -y -f | ||
install: | ||
- pip install -U --upgrade pip | ||
- pip install --upgrade pip | ||
- pip install -I https://github.com/escaped/pyexiv2/archive/master.zip |
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.
Hi @kkopachev, master
branch may not be completely stable at a given moment and could break Thumbor build. What do you think about installing this dependency via .deb package?
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.
not sure I can use deb to make it automatically available in virtual env. I can reference commit hash instead.
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.
pyexiv2 is dead anyway, not likely there will be any releases.
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.
Currently, pyexiv2 is installed via .deb package (Travis) and the tests are running.
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.
current travis setup uses python with system provided packages, that's why it's working.
However, not working if we don't use system python and use virtualenv: https://travis-ci.org/thumbor/thumbor/jobs/280505386#L1689
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.
Also, if you guys care that much about something breaking the build, there are other issues as well https://github.com/thumbor/thumbor/pull/975/files#r141397089
65a65d5
to
1960f92
Compare
any more comments? |
Hi @kkopachev, Good work! Thank you for contributing to Thumbor! |
Merged in 2f15296 🎉 You are a rockstar, @kkopachev! 🚀 Thank you for your contributions to Thumbor! |
FYI @cclauss