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

Migrate image converter to pyvips #2346

Merged
merged 5 commits into from Oct 4, 2018
Merged

Migrate image converter to pyvips #2346

merged 5 commits into from Oct 4, 2018

Conversation

mbeacom
Copy link
Contributor

@mbeacom mbeacom commented Oct 4, 2018

Description

The goal of this PR is to migrate from Wand/libmagickwand to pyvips/libvips.
Additionally, this conversion method works with complex SVG layers. cc @jasonrhaas

Enhancements:
  • Faster
  • More performant
  • Less resources to perform conversion
  • Less storage usage for dependencies
Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Affected core subsystem(s)

avatar, images

Testing

Locally

@mbeacom mbeacom added enhancement This is a feature to be enhanced or improved. backend This needs backend expertise. avatar labels Oct 4, 2018
@mbeacom mbeacom self-assigned this Oct 4, 2018
Copy link
Contributor

@owocki owocki left a comment

Choose a reason for hiding this comment

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

didnt test but code LGTM

@mbeacom mbeacom merged commit 345e445 into master Oct 4, 2018
@mbeacom mbeacom deleted the pyvips-svg-png branch October 4, 2018 19:17
mbeacom pushed a commit that referenced this pull request Oct 10, 2018
* Fix #1976 - Adjust gitcoin bot get_notifications to use pygh

* - Captured prevention of advanced payout form submission when recipient githu username is empty

Fixes: #2010

* better handling of delete requests for accounts

* Adjust makefile entry for collectstatic

* Adjust travis gh-pages deployment to only run following the lint-test stage

* Adds all activities

* Resolve #2234 - Remove error prone ja i18n and update all untranslated str for django and djangojs

* Fixes the tab module

* Profile activity_type

* Resolve autotranslate errors and compile messages

* Adds all activities with different category

* Adds tips in the activities

* Removes current categories

* html: updated text on banner contributor page

* feedback : added review

- added media queries
- adds translations + fixed spacing

* Fix #2246 - Switch org param to query icontains vs contains

* Fix #2246 - Switch org_bounties query to icontains vs contains to resolve bounty counts on org page

* css: removing multiple font-family declarations (#2192)

* css: removing multiple font-family declarations

* pydocmd: added styleguide

* Wipes out font-family from random css

* sync_geth across entire stdbounties id set 3x a week

* fix for #2248 (comment)

* Hack for:

In [4]: for tip in Tip.objects.filter(from_name='False'):
   ...:     print(tip.pk, tip.from_name)
   ...:
311 False
312 False
313 False
318 False
319 False
323 False
338 False
339 False
350 False
351 False
383 False
390 False
391 False
316 False
448 False
449 False
461 False
462 False
508 False

* fix for case sensitivitty

* Fix #2258 - Allow hidden users to view own profile from /profile/handle vs only /profile/

* Add current_profile check before accessing handle in profile_helper

* Add VSCode remote debugging handling and documentation

* Fix eslint on receive.js - travis

* Add emphasis to envvar addition before down/up of compose services for vscode debugger

* Adjust vscode launch.json snippet for default GC setup in docs

* Stopgap fix for premailer not honoring django static or templating vars for asset paths

* Adjust premailer to use base_url

* Keyword in title of Issue Explorer

* Update roundup email for 21SEP2018 (#2264)

* Update roundup email for 21SEP2018

* copy updates

* fix box position bug in select2

* Pin markdown package to resolve DRF markdown.version issue

* Fix #2232 - Adjust ENS hash txns to allow blank, switch to default empty str, and catch if empty (#2233)

* Adds fund branding organisation information with a bounty (#2039)

* Adds fund branding organisation information with a bounty

* makes stickler happy

* Related to Kevin's comment

* Makes changes in the model file

* Update migration file

* Modifies migrations to prevent conflict

* Increase Funding Limit Request Form (#2209)

* Increase Funding Limit Request Form

Fixes #2199

* Increase Funding Limit Request Form: lint

* Increase Funding Limit Request Form: lint

* Adjust dashboard migrations for conflicts

* not every contract has 18 token decimals

* updates documentation (#2270)

* gas price wei issue

* Adds Activity type and date

* Makes the issue title a required field in new funding

* Temporarily removes advanced payout as an option

* Update roundup email for 28SEP2018 (#2298)

* Adjust GH get_gh_notification handling

* Adjust notification count handling in get_notifications

* Adjust issue_details to use profile access token

* Fix #2299 - Update path to gitcoinbot readme...

* Adjust document refs for user to currentProfile and pass token to issue dets endpoint

* Fix #2305 - Resolve get_amount 404 on new bounty page (#2306)

* avatar: added space cadet clothing

Fixes : #1663

* WIP: Make It Clear Issue Has Been Crowdfunded V2

Fixes #2164

* svgo coin.svg

* crowdfunding: some ui updates.

Also revamped the additional_funding_summary bounty-property

* crowdfunding: small adjustments

* crowdfunding: fix-isort

* crowdfunding: final bits

* crowdfund: stylefix again

* crowdfund: lint

* crowdfunding: style fixes

* crowdfunding: responsive fix

* crowdfunding: decimal places 2 -> 3

* crowdfunding: fix accordion rotation

* crowdfunding: another round of improvements

* crowdfunding: ditto

* crowdfunding: hiring logo and layout

* crowdfunding: hiring logo

* bounty: hide start + submit work for funder (#2315)

Fixes: #2308

* Fix travis

* crowdfunding: normalizeAmount - decimals for tokens = 3 and dollar = 2

* Adjust loggers for gitcoin bot

* Adjust loggers for gitcoin bot

* Resolve no profile attr errors

* Add GH ratelimit healthcheck, job, cmd and additional Infura specific healthcheck (#2318)

* Add GH ratelimiting cmd/job/hc and infura pinned hc

* Remove moved healthcheck imports

* Adjust pydocmd config with new healthchecks path

* #2320

* make fix

* fix overflowing text on toolbox cards

* Fix #2329 - Adjust email template URL references and fix bad ref

* fix ios text (#2326)

* str object has no method get

* fixed parsing color from path containing domain name in avatar builder (#2321)

Fixes: #2150

* Catch on AttributeError and log sync_github errors to sentry

* lead engineer

* fix for https://sentry.gitcoin.co/gitcoin/gitcoin-prod-backend/issues/1153/?referrer=slack

* take users word for it if no gitcoin profile

* search github

* code review

* Adjust Travis config to handle GeoIP dbs (#2338)

* Add GeoIP deps to Travis env

* Derp - sudp apt-get commands

* Darn sudos

* Add search methods

* Hook up search method to user_search

* Adjust lookup to pass current token

* Add current_profile and adjust obj ref

* Timborden/location leaderboards (#2268)

* adds leaderboard by city/country/continent

* is_user_based

* code review

* test fix

* is_user_based

* is user based

* Update leaderboard tests and profile login geoIP lookup

* Resolve linting errors

* Resolve bug

* More linting fixes

* Code review changes

* Code review fixes

* Fix #2342 - Upgrade to Django 2.1.2

* mutates jobs a little bit

* Fix tooltip of start and stop work links

* Display tip received time only if it exists

* re-enables org profiles (#2343)

* Fix assemble_leaderboard

* Adds tooltip on top of user input field in Advanced payout and Basic payout

* Migrate image converter to pyvips (#2346)

* Migrate image converter to pyvips

* Remove old methods

* Adjust docstring for convert_img

* Add libvips to travis deps

* Remove unused wand import - derp

* cancel rate

* - added font class to body tag

Fixes: #2280

* refactored custom tooltip

* WIP: Feature/increase dashboard tests coverage (#858)

* dashboard: Tests cleanup.

* fixed timezone warnings
* added @staticmethod decorators where needed
* introduced consistent test naming scheme, all classes deriving from TestCase end with Test
* PEP8 line too long warnings fixed by splitting to multiline strings
* added __init__.py to let pytest find all tests when running `docker-compose exec web pytest app/dashboard/tests/*`

Refs: #607

* test_dashboard_models: Add test_exclude_bounty_by_status.

Verify that bounties can be excluded by status.

Refs: #607

* test_dashboard_models: Add test_relative_bounty_url_with_malformed_issue_number test.

The test verifies relative bounty url when malformed issue number is provided.

Refs: #607

* test_dashboard_models: Add test_get_natural_value_if_bad_token_address_provided test.

Natural value should be zero when bad token address is provided.

Issue: #607

* test_dashboard_models: Add bounty submit after expiration date tests.

Add tests:

* test_can_submit_legacy_bounty_after_expiration_date
* test_cannot_submit_standard_bounty_after_expiration_date
* test_can_submit_standard_bounty_after_expiration_date_if_deadline_extended

Refs: #607

* test_dashboard_models: Add test_title_or_desc test.

Test test_title_or_desc bounty property. Verify it returns bounty title if defined.

Refs: #607

* test_dashboard_models: title_or_desc shall return GitHub URL if no title.

Refs: #607

* test_dashboard_models: test github_issue_number.

Refs: #607

* test_dashboard_models: test github_org_name.

Refs: #607

* test_dashboard_models: test github_repo_name.

Refs: #607

* test_dashboard_models: test bounty status.

Refs: #607

* test_dashboard_embed: Add embed tests.

* test_wrap_text
* test_summarize_bounties
* test_stat
* test_embed

Issue: #607

* test_dashboard_embed: Add bounty to embed test.

Refs: #607

* test_dashboard_embed: Add avatar test.

Refs: #607

* test_dashboard_embed: Travis vs rate limiting.

GitHub API is restricted https://developer.github.com/v3/#rate-limiting
Test will also pass in that scenario. Other than that later we can mock the response.

Refs: #607

* test_notifications: Test craiglist post.

Refs: #607

* test_dashboard_utils: Add get_bounty and bounty contract tests.

* test_get_bounty
* test_get_bounty_contract

Refs: #607

* test_dashboard_utils: add get_bounty_id tests.

* test_get_bounty_id_from_db
* test_get_bounty_id_from_web3

Refs: #607

* Update test_dashboard_embed.py

* Line length

* Remove stat

* Update test_dashboard_models.py

* Remove avatar view test and fix indentation throughout new tests

* Resolve travis failures

* Remove some tests we shouldn't be performing

* Remove craigslist test and unused imports

* Bounty Requests: Move to django forms (#2096)

* Bounty Requests: Move to django forms

* Bounty Request: Fix form label binding

* Bounty Request: Fix last commit

* Disable leaderboards by location on live

* Update roundup email for 5OCT2018 (#2360)

* Update roundup email for 5OCT2018

* Review updates @owocki

* Adjust ES subscriber creation for odd doesnotexist bug

* payout: added autocomplete (#2296)

* added autocomplete

* fix user search

* fix lint

* prettified autocomplete

* stickler: fixes

* autocomplete : fixes

* enable advanced payout

* updated button styling

* Added title and meta tags (#2231)

* Added meta and canonical tags

* Added funding detail tags

* if -> elif and dropped unused assignments

Added translation blocks

* save recent searches in tabs above search bar -- like http://www.hipmunk.com/ does (#1447)

* save search recents

* linting

* removes save search button

* copy

* search history: css udpate

* fix: eslint errors

* do not save searches that are already ssaved

* deletes

* linting

* Fix eslint

* Remove title...

* remove title from about

* a new hairstyle, a tri-pony tail

* Update utils.py

fixed line that was 100+ chars

* Update utils.py

deleted whitespace

* - remove previous change
- add `g-font-muli` to `shared/nav.html`

* avatar: fixed pony tail

* Created new accessory cateogory Masks and created a Jack-o-Lantern Mask

* avatar: fix masks accessories

* lint fixes

* Added tooltip hover on tips page

* tip : autocomplete shows payout address (#2372)

* tip : autocomplete shows payout address

* remove repeating code

* results page should not destroy my CPU when it first loads... onnly load mesh data if/when needed

* adds mesh network gif

* number transactions

* pie chart

* some more fixes for results page

* bug: advanced payout

fixes: #2380

* lint fixes

* added feedback comments

* Adding live exemplars with proper formatting.

* ability to post leaderboard to slack

* updated leaderboard

* templates

* ethereum blockchain messaging removal

* fixes up the quarterly stats emails so they can be send

* npm audit

* npm audit

* npm update

* a few small fixes

*  a few small stat email fixes

* css

* still trying to fix the css

* one last time

* lorem ipsum somehow made it in

* landing: contributor page (#2405)

Fixes: https://github.com/gitcoinco/Marketing/issues/11

* top 3 thing

* fixes increase payout #2407

* hott new unfurl image for /results

* add a custom ERC20 token

* grants/index: refactor

* grants/new : refactor + update

- enable adding team-members in form
- remove duplicate file new_grant.js
- custom css + lint fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend This needs backend expertise. enhancement This is a feature to be enhanced or improved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants