-
Notifications
You must be signed in to change notification settings - Fork 581
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
WIP: Add ImageCompressionBear #1302
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution! Reviewing pull requests take really a lot of time and we're all volunteers. Please make sure you go through the following check list and complete them all before pinging someone for a review.
As you learn things over your Pull Request please help others on the chat and on PRs to get their stuff right as well! |
de7f821
to
e8d5aea
Compare
e8d5aea
to
7f6bd36
Compare
bears/image/ImageCompressionBear.py
Outdated
CAN_DETECT = {'Compression', 'Useless metadata'} | ||
|
||
@classmethod | ||
def check_prerequisites(cls): |
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.
The reason for this is the fact DistributionRequirement
doesn't implement is_installed
. Related issue: https://gitlab.com/coala/package_manager/issues/11
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.
Fixed upstream
7f6bd36
to
e444f40
Compare
e444f40
to
110aa01
Compare
This PR requires https://gitlab.com/coala/package_manager/merge_requests/13 and |
in that case i am marking WIP, @yukiisbored 😅 |
bears/image/ImageCompressionBear.py
Outdated
from coala_utils.FileUtils import create_tempfile | ||
|
||
|
||
class ImageCompressionBear(LocalBear): |
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.
uhm... you should add, a short description of this bear, and a link to where more information can be fetch
bears/image/ImageCompressionBear.py
Outdated
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'The coala developers'} | ||
LICENSE = 'AGPL-3.0' | ||
CAN_DETECT = {'Compression', 'Useless metadata'} |
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.
push a commit to the coala rep that adds these
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
3 similar comments
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
This PR is on hold, due to unresolved issues on gitlab.com/coala/package_manager related to handling DistributionRequirement and ExecutableRequirement fallback. |
@yukiisbored Add |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
1 similar comment
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
5 similar comments
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
3 similar comments
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
coala/coala#3560 is merged. This bear can now proceed. |
d586635
to
cdb357b
Compare
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
2 similar comments
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
This bear cannot proceed efficiently without fixing the issues related to DistributionRequirement and AnyOneOfRequirement |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
1 similar comment
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
ImageCompressionBear is a bear which uses optimage, jpegoptim, jpegtran, pngcrush, optipng to see if the image can be compressed and how much bytes will be reduced if it's compressed. Closes coala#1259
cdb357b
to
a0c8d47
Compare
@@ -53,6 +53,10 @@ addons: | |||
- opam | |||
- php-codesniffer | |||
- verilator | |||
- jpegoptim |
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.
the templates will now automatically generate this for the precise
job.
Ideally, you also add it to either the hand coded xenial or trusty job that run in the first batch of jobs, in .moban.dt/travis-manual-matrix.yaml
ExecutableRequirement('optipng') | ||
]), | ||
AnyOneOfRequirements([ | ||
DistributionRequirement(apt_get='zopfli', |
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.
Zopflipng wouldn't get installed on Ubuntu 16.04 which travis runs. by apt-get zopfli
.
To install zopflipng:
git clone https://github.com/google/zopfli.git
cd zopfli
make zopflipng
install -Dm755 zopflipng /usr/local/bin/zopflipng
ImageCompressionBear is a bear which uses optimage, jpegoptim, jpegtran,
pngcrush, optipng to see if the image can be compressed and how much
bytes will be reduced if it's compressed.
Closes #1259