From 64af3bee231b34477ab2940d884c706193b72c2e Mon Sep 17 00:00:00 2001 From: Johannes Hoppe Date: Fri, 12 Feb 2016 16:38:57 +0100 Subject: [PATCH 1/2] Adds tox --- .editorconfig | 4 +++- .gitignore | 1 + setup.cfg | 5 +++-- tox.ini | 22 ++++++++++++++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 tox.ini diff --git a/.editorconfig b/.editorconfig index b543e23..8298c9f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -16,7 +16,9 @@ atomic = true multi_line_output = 5 line_length = 79 combine_as_imports = true -skip = wsgi.py,docs +skip = wsgi.py,docs,.tox,env +known_first_party = stdimage,tests +known_third_party = django [*.{rst,ini}] diff --git a/.gitignore b/.gitignore index 4cbb520..4857af7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ django_stdimage.egg-info build/ dist/ .idea/ +.tox/ .cache/ diff --git a/setup.cfg b/setup.cfg index aab5034..c90df03 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,7 +8,7 @@ max-line-length = 79 max-complexity = 10 statistics = true show-source = true -exclude = */migrations/*,docs/*,env/*,venv/* +exclude = */migrations/*,docs/*,env/*,venv/*,.tox/* [pep257] ignore = D100,D101,D102,D103,D104,D105,D203 @@ -21,6 +21,7 @@ omit = */migrations/* */tests/* */test_*.py + .tox [coverage:report] ignore_errors = True @@ -31,6 +32,6 @@ atomic = true multi_line_output = 5 line_length = 79 combine_as_imports = true -skip = wsgi.py,docs,tests/test_models.py +skip = wsgi.py,docs,tests/test_models.py,.tox,env known_first_party = stdimage,tests known_third_party = django diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..52a78b3 --- /dev/null +++ b/tox.ini @@ -0,0 +1,22 @@ +[tox] +envlist = py{27,34,35}-django{18,19,master},qa +[testenv] +deps= + -rrequirements-dev.txt + django18: Django>=1.8,<1.9 + django19: Django>=1.9,<1.10 + djangomaster: -egit+https://github.com/django/django.git@master#egg=Django +commands= + py.test \ + --basetemp={envtmpdir} \ + --ignore=.tox \ + {posargs} + +[testenv:qa] +changedir={toxinidir} +deps= + -rrequirements-dev.txt +commands= + isort --check-only --recursive --diff {posargs} + flake8 --jobs=2 {posargs} + pep257 --verbose --explain --source --count {posargs} From 4fd10d108fc9fa6ecc8f1bdf8b40ca17c44009bc Mon Sep 17 00:00:00 2001 From: Johannes Hoppe Date: Wed, 17 Feb 2016 00:03:15 +0100 Subject: [PATCH 2/2] Adds Django-CC --- CONTRIBUTING.md | 23 +++++++++++++++++++++++ README.rst | 20 ++++++-------------- setup.py | 1 + 3 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..9f216d8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,23 @@ +# Contributing Guide [![badge](https://img.shields.io/badge/Django-CC-ee66dd.svg)][django-cc] +This project follows the **[Django Contributing Commons][django-cc]**. + +## Getting started +Getting started is simple, just do: +```bash +pip install dcc +dcc django-stdimage +hub checkout -b patch-1 +``` + +To test locally simply run: +```bash +tox +``` + +After that just write your code. Once you are done, just follow this easy flow: +```bash +hub commit +hub pull-request -b codingjoe +``` + +[django-cc]: https://github.com/codingjoe/django-cc/blob/master/CONTRIBUTING.md diff --git a/README.rst b/README.rst index 5242ed2..f6aa6c9 100644 --- a/README.rst +++ b/README.rst @@ -23,6 +23,10 @@ :alt: Join the chat at https://gitter.im/codingjoe/django-stdimage :target: https://gitter.im/codingjoe/django-stdimage?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge +.. image:: https://img.shields.io/badge/Django-CC-ee66dd.svg + :alt: Django-CC + :target: https://github.com/codingjoe/django-cc + Django Standarized Image Field ============================== @@ -236,17 +240,5 @@ Multi processing for that matter all multiprocessing is disabled in PyPy. -Contributing -============ - -Getting started is easy. After setting up your env, just install: - -.. code:: - - pip install -r requirements-dev.txt; pre-commit install - -To make contributing even easier, make sure your editor's or IDE's [EditorConfig] support is enabled. - -Testing -------- -To run the tests simply run ``python setup.py test`` +`Contributing `_ +================================= diff --git a/setup.py b/setup.py index bf33052..5ca47f2 100755 --- a/setup.py +++ b/setup.py @@ -8,6 +8,7 @@ description='Django Standarized Image Field', author='codingjoe', url='https://github.com/codingjoe/django-stdimage', + download_url='https://github.com/codingjoe/django-stdimage', author_email='info@johanneshoppe.com', license='MIT', classifiers=[