-
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
[WIP] Moving to Py3 #100
Closed
[WIP] Moving to Py3 #100
Changes from 2 commits
Commits
Show all changes
574 commits
Select commit
Hold shift + click to select a range
7499cc7
make it more readable
asldevi 20422fc
more clean up
asldevi 12d8e9c
shorter path if size isn't there
asldevi 650a678
add newlines
asldevi f298954
move from RQ to celery
asldevi f2e1f39
show loading gif if the bgtask isn't yet done
asldevi 2467b6f
clean up setting up redis connection
asldevi 7569c7b
script to run celery
asldevi 2029f27
make response with loading img instead of redirection to it
asldevi c72058b
fix fitting into box
asldevi 4f0030b
file endpoints instead of thumbnails everywhere
asldevi 3dfda68
remove redundant and unused view
asldevi 9afad82
make gallery public
asldevi 997c74d
fix syntax in template
asldevi 76bf16e
expire redis keys of running job registry in an hour
asldevi b7d369e
endpoint to remove old files from local cache
asldevi 98af3f6
add loader image
asldevi 69a34e1
put in celery in requirements
asldevi 894bea6
fix back the broken pop_up_gallery
asldevi a523b8e
fix docs for usage of runcelery
asldevi 3a9dc11
use Imgee field from baseframe
asldevi 6b20553
simplify task registry
asldevi 75a0ace
add function name also to task registry
asldevi 0b95413
profile, img-size are now data attrs in ImgeeField
asldevi 8077857
fixes to make tests pass; thx unittests
asldevi 3ab146c
fix the fitting size again
asldevi e1afb32
imgee/storage.py
asldevi 71e9dd5
put in funcname in taskid itself
asldevi 770db71
move registry init to __init__.py
asldevi a11ff3a
add doctest to get resized size
asldevi 1aeab97
make delete async
asldevi 74a6735
script to run celery in production
asldevi 1e7ed8a
no shortcuts for delete async
asldevi 8b70222
have width and height cols instead of size in thumbnail
asldevi 63fff62
no async if CELERY_ALWAYS_EAGER is set
asldevi 2bc5f0a
add on_failure hook to BaseTask
asldevi 3c0a115
remove thumbnails explicitly in delete
asldevi 594a4e8
fix bug
asldevi 03768d0
check for width or height - no need of both
asldevi 6f590a5
actual sizes of thumbnails in db and in the names on s3, not requeste…
asldevi 861c83e
fix use of secure_filename
asldevi 2fb3060
save a db query
asldevi 25265f7
public api for /file endpoint
asldevi 276e024
add upload endpoint to api
asldevi 2578684
make api a blueprint
asldevi 568878f
fix logout bug
asldevi a6d77dd
include imgee url of the file in the api responses
asldevi 0a43346
fix label bug
asldevi c36bd7e
put size in the imgee url, if available
asldevi 998ebba
add label option in pop-up-gallery
asldevi f3fa016
let imgee.js make the url for popup
asldevi 4719a1c
no dom creation in callee of .imgee
asldevi fb376df
move all logic into imgee.js
asldevi ab3781a
fix tests
asldevi 380c6c5
put in version for api
asldevi af1a136
put in 404 check in api
asldevi 4ddc45b
use filesizeformat
asldevi c842935
fix for breaking tests
asldevi 9e35abb
make an errorhandler for api
asldevi 4c6e17c
put in lastuser resource handler for auth
asldevi 3016304
use filesizeformat again
asldevi f1694e3
Updated mail sender settings.
jace 4f1ef4b
shorter path if size isn't there
asldevi c1bba67
add newlines
asldevi 2195017
move from RQ to celery
asldevi 8bad7d6
show loading gif if the bgtask isn't yet done
asldevi 1b4cb08
clean up setting up redis connection
asldevi 69520ae
script to run celery
asldevi 231a608
make response with loading img instead of redirection to it
asldevi a6f5d0a
fix fitting into box
asldevi 2812031
file endpoints instead of thumbnails everywhere
asldevi 11cd43e
remove redundant and unused view
asldevi 8b20245
make gallery public
asldevi 9f55c90
fix syntax in template
asldevi 5fffd4c
expire redis keys of running job registry in an hour
asldevi 4841e83
endpoint to remove old files from local cache
asldevi 33aa4e9
add loader image
asldevi cecac77
put in celery in requirements
asldevi 7f7d1ed
fix back the broken pop_up_gallery
asldevi 6b22026
fix docs for usage of runcelery
asldevi 04b66f4
use Imgee field from baseframe
asldevi 1081bbc
simplify task registry
asldevi 4fec410
add function name also to task registry
asldevi 191034d
profile, img-size are now data attrs in ImgeeField
asldevi a867078
fixes to make tests pass; thx unittests
asldevi 22d5fef
fix the fitting size again
asldevi 9b110d5
imgee/storage.py
asldevi 3bbe6cb
put in funcname in taskid itself
asldevi 6d877a7
move registry init to __init__.py
asldevi 763dc8e
add doctest to get resized size
asldevi 3b01543
make delete async
asldevi b97a915
script to run celery in production
asldevi 656a674
no shortcuts for delete async
asldevi eb49e25
have width and height cols instead of size in thumbnail
asldevi 15a3857
no async if CELERY_ALWAYS_EAGER is set
asldevi 8d02208
add on_failure hook to BaseTask
asldevi aa20dc3
remove thumbnails explicitly in delete
asldevi 9bf8e5a
fix bug
asldevi aa9afa2
check for width or height - no need of both
asldevi f431c6f
actual sizes of thumbnails in db and in the names on s3, not requeste…
asldevi 37af078
fix use of secure_filename
asldevi 5ab1474
save a db query
asldevi 7dabe9a
public api for /file endpoint
asldevi bedc276
add upload endpoint to api
asldevi 61bd9a8
make api a blueprint
asldevi 3e8f267
fix logout bug
asldevi cca357f
include imgee url of the file in the api responses
asldevi 5bd5464
fix label bug
asldevi 028b177
put size in the imgee url, if available
asldevi 0828978
add label option in pop-up-gallery
asldevi 6f49a7b
let imgee.js make the url for popup
asldevi 8c703b7
no dom creation in callee of .imgee
asldevi 0921f19
move all logic into imgee.js
asldevi fb37709
fix tests
asldevi 40fe796
put in version for api
asldevi df2eff2
put in 404 check in api
asldevi a3f66e8
use filesizeformat
asldevi 9e1a5b0
fix for breaking tests
asldevi c45b405
make an errorhandler for api
asldevi 55e7394
put in lastuser resource handler for auth
asldevi 3e81ece
use filesizeformat again
asldevi 578b8e0
'size' column is no longer in the table.
jace 2124207
Allow multiple environments for Celery.
jace 536ee82
enable celery error emails
asldevi 691c80a
remove rq*
asldevi b18d852
fix broken thumbnail generation
asldevi b94e17c
fix 'browse your gallery' link
asldevi 3738807
add title while uploading via api
asldevi a5d7b6a
Merge branch 'master' into develop
asldevi c42054d
manage.py now uses coaster.manage
miteshashar d6e4ea6
remove taskid even on failure from registry
asldevi 25260fb
fix on_failure
asldevi 6fd3c59
Merge pull request #42 from hasgeek/develop
jace 91ed1f6
Profile page thumbnails alignment
miteshashar 1b936b4
Image View Page - Thumbnail distortion
miteshashar 01c3703
Correction: limit value was hardcoded.
miteshashar fa75232
Use mimetype instead of filename to validate file type for uploads.
miteshashar 9fb290f
Bug fixed in determination of file type. File handler needs to point …
miteshashar 626ed5e
Moved header-based checking of mimetype into the existing utility fun…
miteshashar 75e91d7
StoredFile.orig_extn column
miteshashar fc8bea5
Storing the original extension of the image, when it is uploaded.
miteshashar 3c22e11
Added mimetypes for .bmp files.
miteshashar 9ca570e
Added mimetypes for corel draw files.
miteshashar 2c15ad2
Made file mimetype and extension guessing more robust.
miteshashar f3ce299
Used the ALLOWED_MIMETYPES mapping dictionary to generate EXTNS to us…
miteshashar e9088ba
Corrected error in previous commit
miteshashar 1610c0f
Corrected error in previous commit
miteshashar ce20518
Made extensions in the ALLOWED_MIMETYPES mapping dictionary unicode, …
miteshashar 5335a00
StoredFile needs to be provided with unicode values for title and mim…
miteshashar c8baef5
Store width and height for svg
miteshashar 920f7b8
Merge branch 'profile-page-thumbnails' into vector
miteshashar 2246ea3
Merge branch 'imgviewpg-sidebar-thumbs' into vector
miteshashar 21b4b83
Incorporated the CSS changes made in branches profile-page-thumbnails…
miteshashar cd6809f
Fixed:
miteshashar d49a2c7
Use PNG's for SVG embeds.
miteshashar 0f50f21
Using subprocess.call instead of os.system
miteshashar a169718
If generation of an image preview fails, it should redirect to a gene…
miteshashar d9af656
Handle floating point dimensions in SVG's
miteshashar b230c4a
Corrected error message in /<profile>/new.json replaced earlier for d…
miteshashar ac2295d
/<profile>/new.json should respond with 403 when it cannot accept a f…
miteshashar 2f92d0d
Removed shinedotted.png. It is blocked with a 403 code when used dire…
miteshashar d0b731e
Upgraded dropzone.js to 3.8.2. Bootstrap alert based notification for…
miteshashar d2c246c
AJAX-based update of Title, and on-page addition of image to the list…
miteshashar d44d6d7
Queue up generation of all regular image sizes, as soon as an image i…
miteshashar 4544112
Made /embed/file/<image> blocking with a timeout of 15 seconds, after…
miteshashar 1118809
On Image view page, the thumbnails in the sidebar were being vertical…
miteshashar 3572c26
Moved dropzone on profile page to the sidebar.
miteshashar de72eb6
Corrected bugs in UI & AJAX for updating title of just uploaded image…
miteshashar 766014c
Handling vertical align of thumbnails on profile page on the client s…
miteshashar 1ce3683
Support for lastuser notifications.
jace 5f5439a
Lastuser init should be in __init__; rename other imports.
jace 6da8884
Mapping information for application/postscript corrected.
miteshashar 4976a4a
gzipped .svgz files will be accepted by imgee
miteshashar cb7b43b
Use ImageMagick's convert command to resize images & identify command…
miteshashar e313b51
Removed command for rsvg-convert, as ImageMagick is capable of proces…
miteshashar 664920a
convert should use -thumbnail for smaller output files, and should al…
miteshashar d394c00
Thumbnail extensions for various files. Corrected tiff to .tiff in ex…
miteshashar 4359a9e
rsvg-convert is better off for SVG's. Switched back to it.
miteshashar 4941bb2
Support for .svgz files.
miteshashar a4d1714
On profile page, use spinner.gif for dynamically placed thumbnails, t…
miteshashar 94c1480
In-place editing for dynamically inserted image on the profile page.
miteshashar 259643d
After adding images dynamically on profile page, while in list view, …
miteshashar bee33f0
rsvg-convert has in-built support for svgz. gunzip is not required.
miteshashar b8d4fc7
For tiff, thumb_extn = .png
miteshashar 81c3f5e
convert and identify commands need to be called with -quiet to suppre…
miteshashar a15f981
No previews for PSD & CDR files.
miteshashar cd6ba1a
Added Flask-Alembic, xml4h & python-magic to requirements.txt
miteshashar 96e95f7
Dropzone width should be 100% of it's container and not fixed-width.
miteshashar be5ddd5
Thumbnails in bottom row on profile page will not get cut-off anymore…
miteshashar 3c9e8c9
Now that thumbnail formats may be different from original files' form…
miteshashar 9b897cc
Shell script to install required libraries.
miteshashar db3a76b
Pillow is no longer required.
miteshashar 3b80a3f
Flask-Admin seems to be a stale requirement. Removed.
miteshashar fa9bb18
Add -dUseCIEColor to all calls to ghostscript(as ImageMagick's delega…
miteshashar 0b9d70d
Added librsvg2-dev to be installed for linux
miteshashar cd178d4
Update _version.py
jace f4cfe0d
ProfileMixin comes first.
jace 799ac17
Fixes from comments.
jace b06a545
Fixes for SVG support.
jace d8b7b92
Travis env.
jace b9eddd7
Remove unused imports.
jace 4dab8e0
Merge pull request #52 from hasgeek/vector
jace c78fdd5
Update .travis.yml
jace 6154dd2
using updated flask import syntax
f36fa1d
Make init_for call implicit. Fixes #63 (#64)
2860cf8
add support for Flask-Migrate. Fixes #66 (#67)
3481cc2
assigning error handler the right way
f1dce80
removed init_for reference
505f008
Merge pull request #68 from hasgeek/fix-error-handler
jace fd8efa0
coaster.utils is now distinct
jace 153ea3e
Imgee V2 (#59)
d7206c5
Update delete.html (#75)
karthikb351 2a00b9d
Switch to .html.jinja2 templates (Fixes #76) (#77)
b0dc221
not showing manage labels, delete button and edit title to anon user
56db726
replaced flask.ext with flask_
fdf3e97
Fix order_by queries.
jace 200cebc
Create .pyup.yml
jace f16307a
Pin coverage to latest version 4.5.3 (#92)
pyup-bot 6b837ca
Pin nose to latest version 1.3.7 (#91)
pyup-bot 7237940
Pin pillow to latest version 6.0.0 (#90)
pyup-bot 7e9e5e8
Pin flask-migrate to latest version 2.5.2 (#89)
pyup-bot 0a667c1
Pin defusedxml to latest version 0.6.0 (#88)
pyup-bot d3d84e8
Pin python-magic to latest version 0.4.15 (#87)
pyup-bot 31d524a
Pin xml4h to latest version 0.2.0 (#86)
pyup-bot 4d12f1a
Pin redis to latest version 3.2.1 (#85)
pyup-bot 50778ea
Pin boto to latest version 2.49.0 (#84)
pyup-bot aaa0838
Pin psycopg2 to latest version 2.8.3 (#83)
pyup-bot 3ae2a33
Pin flask-sqlalchemy to latest version 2.4.0 (#82)
pyup-bot d1ccfbb
Pin sqlalchemy-utils to latest version 0.34.0 (#81)
pyup-bot 5e40f5e
Pin sqlalchemy to latest version 1.3.5 (#80)
pyup-bot 8e3cb29
Pin flask to latest version 1.0.3 (#79)
pyup-bot 2486678
Scheduled monthly dependency update for August (#93)
pyup-bot c57b3d6
Caching the s3 check (#94)
8ae1dfc
Blackened all code (#95)
d11c65f
Scheduled monthly dependency update for October (#97)
pyup-bot 325e893
Bump pillow from 6.1.0 to 6.2.0 (#98)
dependabot[bot] 65e811e
Scheduled monthly dependency update for November (#99)
pyup-bot f69679f
2to3 changes
c3f49b7
2to3 changes
7db47ce
replaced boto with boto3
7fbfb1a
replaced boto with boto3
18d7474
fixed the tests
19ff95c
fixed the tests
2c4cbf3
removed unnecessary list and str
c3f4ca8
removed unnecessary list and str
25e5982
only need python 3 in travis
b14f97b
only need python 3 in travis
aa4d40a
removed testing.py
048c41d
removed testing.py
094dbca
Merge branch 'py3' of github.com:hasgeek/imgee into py3
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[run] | ||
source = imgee | ||
|
||
[report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain about missing debug-only code | ||
def __repr__ | ||
if self\.debug | ||
|
||
# Don't complain about importerror handlers | ||
except ImportError | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Don't complain if non-runnable code isn't run: | ||
if 0: | ||
if False: | ||
if __name__ == .__main__.: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/bin/sh | ||
set -e | ||
export PYTHONIOENCODING="UTF-8" | ||
export FLASK_ENV="TESTING" | ||
coverage run `which nosetests` "$@" | ||
coverage run -m pytest "$@" | ||
coverage report -m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
should this be public?
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.
They've been revoked. committed by mistake.