Skip to content

Commit

Permalink
Merge c2b6cf5 into 4c03450
Browse files Browse the repository at this point in the history
  • Loading branch information
jirikuncar committed Jan 5, 2018
2 parents 4c03450 + c2b6cf5 commit f1b06ba
Show file tree
Hide file tree
Showing 10 changed files with 156 additions and 22 deletions.
48 changes: 48 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
65 changes: 57 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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?
17 changes: 16 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -19,7 +22,7 @@ cache:

env:
- REQUIREMENTS=lowest
- REQUIREMENTS=release
- REQUIREMENTS=release DEPLOY=true

python:
- "2.7"
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 9 additions & 7 deletions RELEASE-NOTES.rst
Original file line number Diff line number Diff line change
@@ -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
-----
Expand All @@ -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
--------
Expand Down
4 changes: 3 additions & 1 deletion flask_gravatar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -50,7 +53,6 @@ def __set__(self, obj, val):


class Gravatar(object):

"""Simple object for gravatar link creation.
.. code-block:: python
Expand Down
6 changes: 5 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
#
# 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.


[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
7 changes: 5 additions & 2 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f1b06ba

Please sign in to comment.