Skip to content

Commit

Permalink
Update cookiecutter branch
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Mar 31, 2017
1 parent 36514fb commit 1539d56
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 44 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
indent_size = 2
charset = utf-8

[*.py]
indent_size = 4

[*.{bat,cmd,ps1}]
end_of_line = crlf
1 change: 1 addition & 0 deletions .landscape.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ pep8:
pep257:
disable:
- D203
- D105
1 change: 1 addition & 0 deletions .pyup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ requirements:
- requirements/ci.txt
- requirements/test.txt
- docs/requirements.txt
assignees: Pawamoy
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
sudo: true
sudo: false
language: python
branches:
only: [master]
cache:
directories: [$HOME/.cache/pip]
matrix:
include:
- {python: '3.5', env: TOX_ENV=check}
- {python: '3.5', env: TOX_ENV=docs}
- {python: '3.5', env: TOX_ENV=linkcheck}
- {python: '3.5', env: TOX_ENV=checksetup}
- {python: '3.5', env: TOX_ENV=checksafety}
- {python: '3.5', env: TOX_ENV=checkstyle}
- {python: '3.5', env: TOX_ENV=checkspell}
- {python: '3.5', env: TOX_ENV=checklink}
- {python: '2.7', env: 'TOX_ENV=py27-django18,codacy'}
- {python: '2.7', env: 'TOX_ENV=py27-django19,codacy'}
- {python: '2.7', env: 'TOX_ENV=py27-django110,codacy'}
Expand All @@ -29,7 +32,7 @@ matrix:
- {python: pypy, env: 'TOX_ENV=pypy-django110,codacy'}
fast_finish: true
allow_failures:
- {python: '3.5', env: TOX_ENV=linkcheck}
- {python: '3.5', env: TOX_ENV=checklink}
- {python: 3.7-dev}
addons:
apt:
Expand Down
21 changes: 12 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Django ZXCVBN Password
|travis|
|codacy-grade|
|codacy-coverage|
|codacygrade|
|codacycoverage|
|version|
|wheel|
|pyup|
Expand All @@ -19,21 +19,18 @@ Django ZXCVBN Password
:target: https://travis-ci.org/Pawamoy/django-zxcvbn-password/
:alt: Travis-CI Build Status

.. |codacy-grade| image:: https://api.codacy.com/project/badge/Grade/REPLACE_WITH_PROJECT_ID
.. |codacygrade| image:: https://api.codacy.com/project/badge/Grade/REPLACE_WITH_PROJECT_ID
:target: https://www.codacy.com/app/Pawamoy/django-zxcvbn-password/dashboard
:alt: Codacy Code Quality Status
.. |codacy-coverage| image:: https://api.codacy.com/project/badge/Coverage/338f6c7d06664cae86d66eb289a5e424

.. |codacycoverage| image:: https://api.codacy.com/project/badge/Coverage/REPLACE_WITH_PROJECT_ID
:target: https://www.codacy.com/app/Pawamoy/django-zxcvbn-password/dashboard
:alt: Codacy Code Coverage

.. |pyup| image:: https://pyup.io/repos/github/Pawamoy/django-zxcvbn-password/shield.svg
:target: https://pyup.io/repos/github/Pawamoy/django-zxcvbn-password/
:alt: Updates

.. |gitter| image:: https://badges.gitter.im/Pawamoy/django-zxcvbn-password.svg
:target: https://gitter.im/Pawamoy/django-zxcvbn-password
:alt: Join the chat at https://gitter.im/Pawamoy/django-zxcvbn-password

.. |version| image:: https://img.shields.io/pypi/v/django-zxcvbn-password.svg?style=flat
:target: https://pypi.python.org/pypi/django-zxcvbn-password/
:alt: PyPI Package latest release
Expand All @@ -42,6 +39,11 @@ Django ZXCVBN Password
:target: https://pypi.python.org/pypi/django-zxcvbn-password/
:alt: PyPI Wheel

.. |gitter| image:: https://badges.gitter.im/Pawamoy/django-zxcvbn-password.svg
:target: https://gitter.im/Pawamoy/django-zxcvbn-password
:alt: Join the chat at https://gitter.im/Pawamoy/django-zxcvbn-password



.. end-badges
Expand All @@ -64,8 +66,9 @@ Installation
Documentation
=============

http://django-zxcvbn-password.readthedocs.io/en/latest/
`On ReadTheDocs`_

.. _`On ReadTheDocs`: http://django-zxcvbn-password.readthedocs.io/

Development
===========
Expand Down
15 changes: 15 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@

import os

import sys
import django
from django.conf import settings

sys.path.insert(0, os.path.join(os.path.abspath('..'), 'src'))
settings.configure(
INSTALLED_APPS=[
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sites',
],
SITE_ID=1
)
django.setup()


extensions = [
'sphinx.ext.autodoc',
Expand Down
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sphinx>=1.3
sphinx
sphinx-rtd-theme
Django
-e .
8 changes: 5 additions & 3 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ django-zxcvbn-password
django-zxcvbn-password
zxcvbn_password
Pawamoy
Django
ZXCVBN
Password
django
zxcvbn
password
Timothee
Mazzucotelli
Django
django
3 changes: 2 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
rm -rf build
rm -rf dist
rm -rf src/*.egg-info
if tox -e check; then
if tox -e checksetup,checksafety,checkstyle,checkspell; then
rm -rf dist/docs
python setup.py clean --all sdist bdist_wheel
success=true
for d in dist/*; do
Expand Down
1 change: 1 addition & 0 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
USE_TZ=True,
DATABASES={
'default': {
'NAME': 'default',
'ENGINE': 'django.db.backends.sqlite3',
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/zxcvbn_password/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-

r"""Django ZXCVBN Password package."""
u"""Django ZXCVBN Password package."""

__version__ = '1.1.0'
79 changes: 59 additions & 20 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
clean,check,docs,linkcheck,
clean,check,docs,
py27-django18,
py27-django19,
py27-django110,
Expand All @@ -21,6 +21,7 @@ envlist =
pypy-django110,
report
skip_missing_interpreters = true
whitelist_externals = tox

[testenv]
setenv =
Expand All @@ -35,48 +36,86 @@ deps =
passenv = *
usedevelop = false

[testenv:detox]
deps = detox
[testenv:test]
skip_install = true
commands = tox -e py27-django18,py27-django19,py27-django110,py34-django18,py34-django19,py34-django110,py35-django18,py35-django19,py35-django110,py36-django18,py36-django19,py36-django110,py37-dev-django18,py37-dev-django19,py37-dev-django110,pypy-django18,pypy-django19,pypy-django110,
tox -e report

[testenv:detoxtest]
skip_install = true
deps = detox
commands =
detox -e clean,check,docs,linkcheck,py27-django18,py27-django19,py27-django110,py34-django18,py34-django19,py34-django110,py35-django18,py35-django19,py35-django110,py36-django18,py36-django19,py36-django110,py37-dev-django18,py37-dev-django19,py37-dev-django110,pypy-django18,pypy-django19,pypy-django110,
detox -e py27-django18,py27-django19,py27-django110,py34-django18,py34-django19,py34-django110,py35-django18,py35-django19,py35-django110,py36-django18,py36-django19,py36-django110,py37-dev-django18,py37-dev-django19,py37-dev-django110,pypy-django18,pypy-django19,pypy-django110,
tox -e report

[testenv:docs]
setenv = SPELLCHECK=1
[testenv:detox]
skip_install = true
deps =
-r{toxinidir}/docs/requirements.txt
sphinxcontrib-spelling
pyenchant
deps = detox
commands =
sphinx-build -b spelling docs dist/docs -w /dev/null
sphinx-build {posargs:-E} -b html docs dist/docs
detox -e clean,checksetup,checksafety,checkstyle,checkspell,checklink,docs,py27-django18,py27-django19,py27-django110,py34-django18,py34-django19,py34-django110,py35-django18,py35-django19,py35-django110,py36-django18,py36-django19,py36-django110,py37-dev-django18,py37-dev-django19,py37-dev-django110,pypy-django18,pypy-django19,pypy-django110,
tox -e report

[testenv:linkcheck]
[testenv:docs]
skip_install = true
deps = -r{toxinidir}/docs/requirements.txt
commands = sphinx-build -b linkcheck docs dist/docs -w /dev/null
commands = sphinx-build {posargs:-E} -b html docs dist/docs

[testenv:check]
skip_install = true
commands = tox -e checksetup,checksafety,checkstyle,checkspell,checklink

[testenv:detoxcheck]
skip_install = true
deps = detox
commands = detox -e checksetup,checksafety,checkstyle,checkspell,checklink

[testenv:checksetup]
skip_install = true
deps =
docutils
check-manifest
readme-renderer
pygments
isort
prospector
bandit
safety
skip_install = true
commands =
python setup.py check --strict --metadata --restructuredtext
check-manifest {toxinidir}
isort --check-only --diff --recursive src tests setup.py

[testenv:checksafety]
skip_install = true
deps =
bandit
safety
commands =
safety check -r {toxinidir}/requirements/base.txt
bandit -r {toxinidir}/src/

[testenv:checkstyle]
skip_install = true
deps =
isort
prospector
commands =
isort --check-only --diff --recursive src tests setup.py
prospector {toxinidir}

[testenv:checkspell]
skip_install = true
setenv = SPELLCHECK=1
deps =
-r{toxinidir}/docs/requirements.txt
sphinxcontrib-spelling
pyenchant
commands =
- sphinx-build {posargs:-E} -Q -b html docs dist/docs
sphinx-build -b spelling -w /dev/null docs dist/docs

[testenv:checklink]
skip_install = true
deps = -r{toxinidir}/docs/requirements.txt
commands =
- sphinx-build {posargs:-E} -Q -b html docs dist/docs
sphinx-build -b linkcheck -w /dev/null docs dist/docs

[testenv:report]
deps = coverage
skip_install = true
Expand Down
8 changes: 4 additions & 4 deletions update.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
{ # Force shell to read entire script before executing it, thanks to compound command
if [ $# -lt 2 ]; then
echo "usage: ./update.sh PROJECT_PATH TEMPLATE_PATH [COMMIT_MESSAGE]" >&2
echo "usage: ./update.sh PROJECT_PATH COOKIECUTTER_PATH [COMMIT_MESSAGE]" >&2
exit 1
fi

Expand All @@ -12,9 +12,9 @@
abs_project="$(cd "${project}"; pwd)"
abs_cookiecutter="$(cd "${cookiecutter}"; pwd)"

echo "Absolute path to project: ${abs_project}"
echo "Absolute path to project: ${abs_project}"
echo "Absolute path to cookiecutter: ${abs_cookiecutter}"
echo "Commit message: ${message}"
echo "Commit message: ${message}"
echo

# Git checkout cookiecutter branch
Expand All @@ -36,7 +36,7 @@
echo "> git status -sb"
git status -sb | tail -n+2
echo
echo "> git add, commit and push"
echo "> git add and commit"
git add . -A
if git commit -m "${message}"; then
echo
Expand Down

0 comments on commit 1539d56

Please sign in to comment.