Skip to content

Commit

Permalink
General cleanup (#45)
Browse files Browse the repository at this point in the history
* adapted test structure

* core file adaptions

* further adaptions

* running isort

* fix tests

* split envs
  • Loading branch information
FinalAngel committed May 24, 2019
1 parent 56ea4d8 commit 2dbae9c
Show file tree
Hide file tree
Showing 52 changed files with 487 additions and 283 deletions.
19 changes: 16 additions & 3 deletions .coveragerc
@@ -1,5 +1,18 @@
[run]
source=classytags
branch=True
branch = True
source = classytags
omit =
migrations/*
tests/*

[report]
show_missing=True
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
ignore_errors = True
31 changes: 31 additions & 0 deletions .editorconfig
@@ -0,0 +1,31 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 80

[*.py]
max_line_length = 120
quote_type = single

[*.{scss,js,html}]
max_line_length = 120
indent_style = space
quote_type = double

[*.js]
max_line_length = 120
quote_type = single

[*.rst]
max_line_length = 80

[*.yml]
indent_size = 2
27 changes: 19 additions & 8 deletions .gitignore
@@ -1,9 +1,20 @@
*.pyc
dist
.*
*.py[cod]
*$py.class
*.egg-info
*.egg
*.xml
htmlcov
/*env*/
/build/
*.log
*.pot
.DS_Store
.coverage/
.eggs/
.idea/
.project/
.pydevproject/
.vscode/
.settings/
.tox/
__pycache__/
build/
dist/
env/

local.sqlite
58 changes: 39 additions & 19 deletions .travis.yml
@@ -1,23 +1,43 @@
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
env:
- DJANGO='django>=1.11,<2.0'
- DJANGO='django>=2.0,<2.1'
- DJANGO='django>=2.1,<2.2'

dist: xenial
sudo: false

matrix:
include:
- python: 3.5
env: TOX_ENV='flake8'
- python: 3.5
env: TOX_ENV='isort'
# Django 1.11
- python: 2.7
env: DJANGO='dj111'
- python: 3.4
env: DJANGO='dj111'
- python: 3.5
env: DJANGO='dj111'
- python: 3.6
env: DJANGO='dj111'
# Django 2.1
- python: 3.6
env: DJANGO='dj21'
# Django 2.2
- python: 3.6
env: DJANGO='dj22'
- python: 3.7
env: DJANGO='dj22'

install:
- pip install $DJANGO
- pip install coverage isort tox pep8
- "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PY_VER=py27; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PY_VER=py34; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PY_VER=py35; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then export PY_VER=py36; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.7' ]]; then export PY_VER=py37; fi"
- "if [[ ${DJANGO}z != 'z' ]]; then export TOX_ENV=$PY_VER; fi"

script:
- python runtests.py
matrix:
exclude:
- python: 2.7
env: DJANGO='django>=2.0,<2.1'
- python: 2.7
env: DJANGO='django>=2.1,<2.2'
- python: 3.4
env: DJANGO='django>=2.1,<2.2'
- tox -e $TOX_ENV

after_success:
- bash <(curl -s https://codecov.io/bash)
156 changes: 156 additions & 0 deletions CHANGELOG.rst
@@ -0,0 +1,156 @@
=========
Changelog
=========


1.0.0 (unreleased)
==================

* Extended test matrix
* Added isort and adapted imports
* Adapted code base to align with other supported addons
* Adapted ``README.rst`` instructions


0.9.0 (2019-05-16)
==================

* Added testing for Django 1.11, 2.0, and 2.1; and dropped testing for older
versions.
* Added support for Python 3.6


0.8.0 (2016-06-28)
==================

* Removed Python 2.6 support. Supported versions are now 2.7, 3.3, 3.4 and 3.5.
* Added support for Django 1.10.


0.7.2 (2016-03-01)
==================

* Fixed regression introduced in 0.7.1 breaking Django 1.9 and higher.


0.7.1 (2016-01-22)
==================

* Prepare support for Django 1.10. Please note that Django 1.10 is **not**
supported by this release, as Django 1.10 is not released yet.


0.7.0 (2015-12-06)
==================

* Added support for Django 1.9
* Added support for Python 3.5
* Added a nice ``__repr__`` to :class:`classytags.core.Options`
* Added ability to combine :class:`classytags.core.Options` instances using the
add operator.


0.6.2 (2015-06-11)
==================

* Fixed Django 1.8 support


0.6.1 (2015-01-30)
==================

* Packaging fixes


0.6.0 (2015-01-30)
==================

* Added support for Django 1.8
* Dropped support for Django 1.2


0.5.2 (2014-12-11)
==================

* Added :attr:`classytags.helpers.InclusionTag.push_context`.


0.5.1 (2014-04-07)
==================

* Fixed :attr:`classytags.helpers.InclusionTag.template` being required.


0.5.0 (2014-02-28)
==================

* Added Python 3 support
* Added :ref:`advanced-block-definition`.
* Added :doc:`arguments` documentation.


0.3.3 (2011-03-03)
==================

* Fixed issues with :class:`classytags.helpers.InclusionTag`.


0.3.2 (2011-03-02)
==================

* Fixed issue in :class:`classytags.arguments.MultiKeywordArgument` and
:class:`classytags.arguments.KeywordArgument` and their behavior when given
a default value.


0.3.1 (2011-03-02)
==================

* Fixed :class:`classytags.arguments.MultiKeywordArgument` and
:class:`classytags.arguments.KeywordArgument` not returning sane defaults.
* Added ``child_nodelist`` attribute on tag instances as well as setting the
child nodelists as attributes onto the instance during initialization for
compatiblity with applications that require these attributes to be set.


0.3.0 (2010-12-16)
==================

* Added :class:`classytags.arguments.KeywordArgument`
* Added :class:`classytags.arguments.MultiKeywordArgument`
* Added :class:`classytags.arguments.ChoiceArgument`
* Added ability to override the parser class in the initialization of the
:class:`classytags.core.Options` class, to make the usage of custom parsers
easier.
* Added :class:`classytags.values.DictValue`
* Added :class:`classytags.values.ChoiceValue`


0.2.2 (2010-09-12)
==================

* Fixed issue in :class:`classytags.helpers.AsTag` when trying to extract the
variable to store the value in, but no argument is given.
* Fixed :class:`classytags.helpers.InclusionTag` not validating the ``template``
attribute on initialization.


0.2.1 (2010-09-11)
==================

* Fixed version in documentation not matching release version.


0.2.0 (2010-09-11)
==================

* Added ability to have typed arguments.
* Added :class:`classytags.arguments.IntegerArgument`
* Added more graceful failing in non-debug mode by using warnings instead of
exceptions.


0.1.3 (2010-08-24)
==================

* Added :class:`classytags.helpers.InclusionTag`
File renamed without changes.
3 changes: 3 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,3 @@
include LICENSE.txt
include README.rst
recursive-exclude * *.py[co]

0 comments on commit 2dbae9c

Please sign in to comment.