From 571388bbf079fa8671b5b54bee2a5bff933c2daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksi=20H=C3=A4kli?= Date: Wed, 29 Jan 2020 23:20:47 +0200 Subject: [PATCH] Update documentation (#613) Convert CONTRIBUTING from MD to rST Fix rST syntax errors in README.rst Remove deprecated Django version from README.rst Add QA step for validating rST syntax --- .travis.yml | 2 ++ CONTRIBUTING.md | 5 ----- CONTRIBUTING.rst | 9 +++++++++ README.rst | 12 ++++++------ tox.ini | 8 +++++--- 5 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 CONTRIBUTING.md create mode 100644 CONTRIBUTING.rst diff --git a/.travis.yml b/.travis.yml index f93ef1a94..5eed1eeb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ python: - 3.7 - 3.8 env: + - TOXENV=qa + - DJANGO=1.11 PACKAGE=pil - DJANGO=1.11 PACKAGE=imagemagick - DJANGO=1.11 PACKAGE=graphicsmagick diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 83d90960f..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,5 +0,0 @@ -[![Jazzband](https://jazzband.co/static/img/jazzband.svg)](https://jazzband.co/) - -This is a [Jazzband](https://jazzband.co/) project. By contributing you agree -to abide by the [Contributor Code of Conduct](https://jazzband.co/about/conduct) -and follow the [guidelines](https://jazzband.co/about/guidelines). diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 000000000..26d9f3966 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,9 @@ +|Jazzband| + +This is a `Jazzband `__ project. By contributing +you agree to abide by the `Contributor Code of +Conduct `__ and follow the +`guidelines `__. + +.. |Jazzband| image:: https://jazzband.co/static/img/jazzband.svg + :target: https://jazzband.co/ diff --git a/README.rst b/README.rst index 68b8abb81..873c0f5d0 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ Thumbnails for Django. Features at a glance ==================== -- Support for Django 1.11, 2.0, 2.1, 2.2 and 3.0 following the `Django supported versions policy`_ +- Support for Django 1.11, 2.2 and 3.0 following the `Django supported versions policy`_ - Python 3 support - Storage support - Pluggable Engine support for `Pillow`_, `ImageMagick`_, `PIL`_, `Wand`_, `pgmagick`_, and `vipsthumbnail`_ @@ -73,7 +73,7 @@ Install in your project Then register 'sorl.thumbnail', in the 'INSTALLED_APPS' section of your project's settings. :: - INSTALLED_APPS = ( + INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.sites', @@ -83,7 +83,7 @@ your project's settings. :: 'django.contrib.contenttypes', 'sorl.thumbnail', - ) + ] Templates Usage @@ -131,7 +131,7 @@ You can use the 'get_thumbnail':: See more examples in the section `Low level API examples`_ in the Documentation Using in combination with other thumbnailers -------------------------------------------- +-------------------------------------------- Alternatively, you load the templatetags by {% load sorl_thumbnail %} instead of traditional {% load thumbnail %}. It's especially useful in @@ -146,8 +146,8 @@ same name (``thumbnail``) for the templatetag module:: Frequently asked questions ========================== -Is so slow in Amazon S3 ! -------------------------- +Is so slow in Amazon S3! +------------------------ Possible related to the implementation of your Amazon S3 Backend, see the `issue #351`_ due the storage backend reviews if there is an existing thumbnail when tries to diff --git a/tox.ini b/tox.ini index 84acc1b78..a4ed6f8ab 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [travis] python = - 3.6: py36, flake8 + 3.6: py36 3.7: py37 3.8: py38 @@ -20,7 +20,7 @@ PACKAGE = [tox] skipsdist = True envlist = - flake8 + qa py{36,37,38}-django{111,22,30}-{pil,imagemagick,graphicsmagick,redis,dynamodb,wand,pgmagick,dbm,vipsthumbnail} [testenv] @@ -51,11 +51,13 @@ setenv = commands = py.test -rw --cov-config ../setup.cfg --cov sorl -[testenv:flake8] +[testenv:qa] changedir = {toxinidir} skip_install = True deps = flake8 flake8-bugbear + rstvalidator commands = flake8 --show-source sorl/ + python -m rstvalidator README.rst CHANGES.rst CONTRIBUTING.rst