Repository: zzzsochi/Flask-Gravatar (language: python)

Issue:
Tests is falling!
https://travis-ci.org/zzzsochi/Flask-Gravatar/builds/319574864


Discussion / hints:

Fix patch:
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..9b9ebe5
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+#
+# This file is part of Flask-Gravatar
+# Copyright (C) 2018 Swiss Data Science Center (SDSC)
+# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
+# Eidgenössische Technische Hochschule Zürich (ETHZ).
+#
+# Flask-Gravatar is free software; you can redistribute it and/or modify
+# it under the terms of the Revised BSD License; see LICENSE file for
+# more details.
+
+root = true
+
+[*]
+indent_style = space
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+charset = utf-8
+
+# Python files
+[*.py]
+indent_size = 4
+# isort plugin configuration
+known_first_party = flask_gravatar
+multi_line_output = 2
+default_section = THIRDPARTY
+skip = .eggs docs
+
+# RST files (used by sphinx)
+[*.rst]
+indent_size = 3
+
+# CSS, HTML, JS, JSON, YML
+[*.{css,html,js,json,yml}]
+indent_size = 2
+
+# Matches the exact files either package.json or .travis.yml
+[{package.json,.travis.yml}]
+indent_size = 2
+
+# Dockerfile
+[Dockerfile]
+indent_size = 4
+
+# Makefile
+[Makefile]
+indent_size = 4
diff --git a/.gitignore b/.gitignore
index 35ea96e..f2229c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,13 +1,62 @@
-*.pyc
-*.pyo
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
 
-.cache
-.coverage
-.eggs
-.tox
+# Idea software family
+.idea/
 
-Flask_Gravatar.egg-info/
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
 build/
+develop-eggs/
 dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+#  Usually these files are written by a python script from a template
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*,cover
+
+# Translations
+*.mo
+
+# Django stuff:
+*.log
+
+# Sphinx documentation
 docs/_build/
-docs/html/
+
+# PyBuilder
+target/
+
+# Vim swapfiles
+.*.sw?
diff --git a/.travis.yml b/.travis.yml
index 0377b03..31a0426 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,9 @@
 #
 # This file is part of Flask-Gravatar
 # Copyright (C) 2015, 2017 CERN.
+# Copyright (C) 2018 Swiss Data Science Center (SDSC)
+# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
+# Eidgenössische Technische Hochschule Zürich (ETHZ).
 #
 # Flask-Gravatar is free software; you can redistribute it and/or modify
 # it under the terms of the Revised BSD License; see LICENSE file for
@@ -19,7 +22,7 @@ cache:
 
 env:
   - REQUIREMENTS=lowest
-  - REQUIREMENTS=release
+  - REQUIREMENTS=release DEPLOY=true
 
 python:
   - "2.7"
@@ -48,3 +51,15 @@ script:
 
 after_success:
   - coveralls
+
+deploy:
+  provider: pypi
+  user: jirikuncar
+  password:
+    secure: RraR7dpFd+tLVdXSnjduDypCCSoqJ1Uj/zYUU2P8d9wW0EXOaNJ92OzBNDCzQmOxmkmWx793+GZWvjM28dXm+tsom7dWlYDApuWBRc9DBedM6n+/O0wtSRBU50F8Rwvi5IDThHaaY4c/9UTxZC1L7EOjQlvDxohAOmAxkmf0HWo=
+  distributions: "sdist bdist_wheel"
+  on:
+    tags: true
+    python: "3.6"
+    repo: zzzsochi/Flask-Gravatar
+    condition: $DEPLOY = true
diff --git a/AUTHORS b/AUTHORS
index 0715ffb..0a56199 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -5,7 +5,7 @@ Authors
 * Andrew Grigorev <andrew@ei-grad.ru>
 * Donald Stufft <donald@stufft.io>
 * Honza Javorek <honza@javorek.net>
-* Jiri Kuncar <jiri.kuncar@cern.ch>
+* Jiri Kuncar <jiri.kuncar@gmail.com>
 * Julien Kauffmann <julien.kauffmann@freelan.org>
 * Klinkin <klinkin@gmail.com>
 * Li Chuangbo <im@chuangbo.li>
diff --git a/CHANGES.rst b/CHANGES.rst
index 25010c4..0cc2fce 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,14 @@
 Changes
 =======
 
+Version 0.5.0 (released 2018-01-05)
+
+- Try to read configuration values from application config if a context
+  is available otherwise return an instance config or extension default.
+  (pull #23)
+- Package refresh - testing Python 3.6, fixed links, and much more.
+  (pull #22)
+
 Version 0.4.2 (released 2015-03-23)
 
 - Set use_ssl default value according to request protocol. (pull #14)
diff --git a/MANIFEST.in b/MANIFEST.in
index 271543e..8de5526 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -2,12 +2,15 @@
 #
 # This file is part of Flask-Gravatar
 # Copyright (C) 2015, 2017 CERN.
+# Copyright (C) 2018 Swiss Data Science Center (SDSC)
+# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
+# Eidgenössische Technische Hochschule Zürich (ETHZ).
 #
 # Flask-Gravatar is free software; you can redistribute it and/or modify
 # it under the terms of the Revised BSD License; see LICENSE file for
 # more details.
 
-include LICENSE AUTHORS *.rst
+include LICENSE AUTHORS .editorconfig *.rst
 include .coveragerc run-tests.sh pytest.ini tox.ini
 include docs/*.rst docs/*.py docs/Makefile
 
diff --git a/RELEASE-NOTES.rst b/RELEASE-NOTES.rst
index c625d04..15b3f9e 100644
--- a/RELEASE-NOTES.rst
+++ b/RELEASE-NOTES.rst
@@ -1,8 +1,8 @@
 ===================================
- Flask-Gravatar v0.4.2 is released
+ Flask-Gravatar v0.5.0 is released
 ===================================
 
-Flask-Gravatar v0.4.2 was released on March 23, 2015.
+Flask-Gravatar v0.5.0 was released on January 5, 2018.
 
 About
 -----
@@ -12,19 +12,21 @@ Small extension for Flask to make usage of Gravatar service easy.
 What's new
 ----------
 
-- Set use_ssl default value according to request protocol. (pull #14)
-- Improved documentation typo fixes. (pull #13 #18)
-- Migration from flaskext.gravatar to flask_gravatar. (pull #11 #12)
+- Try to read configuration values from application config if a context
+  is available otherwise return an instance config or extension default.
+  (pull #23)
+- Package refresh - testing Python 3.6, fixed links, and much more.
+  (pull #22)
 
 Installation
 ------------
 
-   $ pip install Flask-Gravatar
+   $ pip install Flask-Gravatar==0.5.0
 
 Documentation
 -------------
 
-   http://flask-gravatar.readthedocs.io/en/v0.4.2
+   http://flask-gravatar.readthedocs.io/en/v0.5.0
 
 Homepage
 --------
diff --git a/flask_gravatar/__init__.py b/flask_gravatar/__init__.py
index 0994708..d5990e2 100644
--- a/flask_gravatar/__init__.py
+++ b/flask_gravatar/__init__.py
@@ -6,6 +6,9 @@
 # Copyright (C) 2014 Tom Powell.
 # Copyright (C) 2015 CERN.
 # Copyright (C) 2017 Jiri Kuncar.
+# Copyright (C) 2018 Swiss Data Science Center (SDSC)
+# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
+# Eidgenössische Technische Hochschule Zürich (ETHZ).
 #
 # Flask-Gravatar is free software; you can redistribute it and/or modify
 # it under the terms of the Revised BSD License; see LICENSE file for
@@ -50,7 +53,6 @@ def __set__(self, obj, val):
 
 
 class Gravatar(object):
-
     """Simple object for gravatar link creation.
 
     .. code-block:: python


Test patch:
diff --git a/pytest.ini b/pytest.ini
index 4d59454..21c5a55 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -2,6 +2,9 @@
 #
 # This file is part of Flask-Gravatar
 # Copyright (C) 2015, 2017 CERN.
+# Copyright (C) 2018 Swiss Data Science Center (SDSC)
+# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
+# Eidgenössische Technische Hochschule Zürich (ETHZ).
 #
 # Flask-Gravatar is free software; you can redistribute it and/or modify
 # it under the terms of the Revised BSD License; see LICENSE file for
@@ -9,6 +12,7 @@
 
 
 [pytest]
+addopts = --pep8 --doctest-glob="*.rst" --doctest-modules --cov=flask_gravatar --cov-report=term-missing
 pep8ignore = docs/conf.py ALL \
              docs/_themes/flask_theme_support.py ALL
-addopts = --pep8 --doctest-glob="*.rst" --doctest-modules --cov=flask_gravatar --cov-report=term-missing docs tests flask_gravatar
+testpaths = docs tests flask_gravatar
diff --git a/run-tests.sh b/run-tests.sh
index 75264ea..66c1e02 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -2,13 +2,16 @@
 #
 # This file is part of Flask-Gravatar
 # Copyright (C) 2015 CERN.
+# Copyright (C) 2018 Swiss Data Science Center (SDSC)
+# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
+# Eidgenössische Technische Hochschule Zürich (ETHZ).
 #
 # Flask-Gravatar is free software; you can redistribute it and/or modify
 # it under the terms of the Revised BSD License; see LICENSE file for
 # more details.
 
-pydocstyle invenio_base tests && \
-isort -rc -c -df && \
+pydocstyle flask_gravatar tests && \
+isort -rc -c -df flask_gravatar && \
 check-manifest --ignore ".travis-*" && \
 sphinx-build -qnNW docs docs/_build/html && \
 python setup.py test