Skip to content

Commit

Permalink
Merge pull request #3 from Ayub-Khan/release-updates
Browse files Browse the repository at this point in the history
-release updates
  • Loading branch information
Ayub-Khan authored Mar 17, 2020
2 parents e4c1e0b + 4ce22b6 commit 1311760
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 25 deletions.
44 changes: 27 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,44 @@ sudo: false
language: python

python:
- 3.5
- 3.6
- 3.7
- 3.8
- 3.5
- 3.6
- 3.7
- 3.8

env:
- TOX_ENV=django3
- TOX_ENV=django22
- TOX_ENV=django21
- TOX_ENV=django20
- TOX_ENV=django111
- TOX_ENV=django3
- TOX_ENV=django22
- TOX_ENV=django21
- TOX_ENV=django20
- TOX_ENV=django111

matrix:
include:
- python: 3.6
env: TOX_ENV=quality
- python: 3.6
env: TOX_ENV=quality
exclude:
- python: 3.5
env: TOX_ENV=django3
- python: 3.5
env: TOX_ENV=django3

before_install:
- pip install -U pip wheel codecov
- pip install -U pip wheel codecov

install:
- pip install -r requirements/compatibility.txt
- pip install -r requirements/compatibility.txt

script:
- tox -e $TOX_ENV
- tox -e $TOX_ENV

after_success:
- codecov
- codecov

deploy:
provider: pypi
distributions: sdist bdist_wheel
on:
tags: true
condition: $TOXENV = django22
user: __token__
password:
secure: tGdkCFLWD5ozKUrR+DalntG0d9jr4ak7nXSO947WuWuc1R2OX7mdlEORKdkmbV35Z32QNnzgwZy4CeNZXw8QBzZC3BOFpHtESel+CxskbeFkF93er4ENT72RyTW4mfQc6JtVMoIsRjjX7WpWNo4QooGhpKtqX4riF8rOZgpkbQT7CDB39DDCf/78E8YS4yPLxePYx57T92k4ysFgrQwZqIlb1tA+4s6pCwyK9qq1SKnBws9q23ADi0RKSi0p7ICYNHYJZoUcj2WIiU1c2Smx3AJywNDGMnb7MUaAnJHTouVQIXpxeOGL7ECESKDtaM/p7yQ0iYGAEBlAesB5lmmHh1kSp0JzyPX+ChNXBd+9HFEbupYaQXlI8MzVGDiHo4EbR0Mu7mEOnuKXTeyLd/4oMSecSAuWU65tNAx+immIQsulT4xmZTpRYVXOkl38X6Cr4/OGgR5cSn23AExrtB9dGKTGm4zqj9S0U3qeZy7Qq5ZXke9FTI7P7Px3Y9HyX/ke6Pmo7KIac2mzME9tCx0cDNSj+BTL/frAO/nyCnd2k/peZXbo5Tod4hiZt01xc1B5++XU8yDQjtXwdDWWmHXkS8uTwu8S3SDGa42Snor9s+UDG86aHPq1H7PJPTThMyVTd46uv3+oeg+5kphFGi2kKwB3fKuCSK4tX4lEwA8fu6o=
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ help: ## display this help message
@echo "Please use \`make <target>' where <target> is one of"
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | sort | awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'

clean: clean-pyc clean-test ## Remove all build, test, coverage and Python artifacts
clean: clean-pyc clean-test clean-docs-build ## Remove all build, test, coverage and Python artifacts

clean-pyc: ## Remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
Expand All @@ -29,9 +29,19 @@ clean-test: ## Remove test and coverage artifacts
rm -fr .pytest_cache
rm -fr *.egg-info/

clean-docs-build: ## Remove docs and build artifacts
rm -fr build/
rm -fr dist/

docs-requirements: ## Install docs requirements
pip3 install -qr requirements/docs.txt

requirements: ## Install development requirements
pip3 install -r requirements/dev.txt

build: docs-requirements ## Build the project
python setup.py bdist_wheel

venv: ## Create a virtual env and install test and production requirements
python3 -m venv $(VENV)
source $(VENV)/bin/activate
Expand All @@ -43,6 +53,7 @@ upgrade: ## Upgrade requirement pins.
pip-compile requirements/base.in --rebuild --upgrade -o requirements/base.txt
pip-compile requirements/test.in --rebuild --upgrade -o requirements/test.txt
pip-compile requirements/quality.in --rebuild --upgrade -o requirements/quality.txt
pip-compile requirements/docs.in --rebuild --upgrade -o requirements/docs.txt
pip-compile requirements/compatibility.in --rebuild --upgrade -o requirements/compatibility.txt
pip-compile requirements/dev.in --rebuild --upgrade -o requirements/dev.txt
pip-compile requirements/pip-tools.in --rebuild --upgrade -o requirements/pip-tools.txt
Expand All @@ -64,3 +75,6 @@ test-quality: ## Uses pep8 to check the quality of Code

test-python: ## Run python tests
python -Wd -m pytest

test-docs: build ## Run docs tests
twine check dist/*
2 changes: 1 addition & 1 deletion django_view_permissions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
Grants the ability to allow or block django view access based on user group.
"""
VERSION = '0.0.1-dev'
VERSION = '0.0.dev0'
1 change: 1 addition & 0 deletions requirements/dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
-r test.txt
-r quality.txt
-r compatibility.txt
-r docs.txt
22 changes: 20 additions & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
appdirs==1.4.3 # via -r requirements/compatibility.txt, virtualenv
astroid==2.3.3 # via -r requirements/quality.txt, pylint
attrs==19.3.0 # via -r requirements/test.txt, pytest
coverage==5.0.3 # via -r requirements/test.txt, pytest-cov
bleach==3.1.1 # via -r requirements/docs.txt, readme-renderer
certifi==2019.11.28 # via -r requirements/docs.txt, requests
chardet==3.0.4 # via -r requirements/docs.txt, requests
coverage==5.0.4 # via -r requirements/test.txt, pytest-cov
distlib==0.3.0 # via -r requirements/compatibility.txt, virtualenv
django==2.2.11 # via -r requirements/base.txt, -r requirements/test.txt
docutils==0.16 # via -r requirements/docs.txt, readme-renderer
filelock==3.0.12 # via -r requirements/compatibility.txt, tox, virtualenv
idna==2.9 # via -r requirements/docs.txt, requests
importlib-metadata==1.5.0 # via -r requirements/compatibility.txt, -r requirements/test.txt, importlib-resources, pluggy, pytest, tox, virtualenv
importlib-resources==1.3.1 # via -r requirements/compatibility.txt, virtualenv
isort==4.3.21 # via -r requirements/quality.txt, pylint
Expand All @@ -19,22 +24,35 @@ mccabe==0.6.1 # via -r requirements/quality.txt, pylint
more-itertools==8.2.0 # via -r requirements/test.txt, pytest
packaging==20.3 # via -r requirements/compatibility.txt, -r requirements/test.txt, pytest, tox
pathlib2==2.3.5 # via -r requirements/test.txt, pytest
pkginfo==1.5.0.1 # via -r requirements/docs.txt, twine
pluggy==0.13.1 # via -r requirements/compatibility.txt, -r requirements/test.txt, pytest, tox
py==1.8.1 # via -r requirements/compatibility.txt, -r requirements/test.txt, pytest, tox
pycodestyle==2.5.0 # via -r requirements/quality.txt
pygments==2.6.1 # via -r requirements/docs.txt, readme-renderer
pylint==2.4.4 # via -r requirements/quality.txt
pyparsing==2.4.6 # via -r requirements/compatibility.txt, -r requirements/test.txt, packaging
pytest-cov==2.8.1 # via -r requirements/test.txt
pytest-django==3.8.0 # via -r requirements/test.txt
pytest==5.4.1 # via -r requirements/test.txt, pytest-cov, pytest-django
pytz==2019.3 # via -r requirements/base.txt, -r requirements/test.txt, django
six==1.14.0 # via -r requirements/compatibility.txt, -r requirements/quality.txt, -r requirements/test.txt, astroid, packaging, pathlib2, tox, virtualenv
readme-renderer==25.0 # via -r requirements/docs.txt, twine
requests-toolbelt==0.9.1 # via -r requirements/docs.txt, twine
requests==2.23.0 # via -r requirements/docs.txt, requests-toolbelt, twine
six==1.14.0 # via -r requirements/compatibility.txt, -r requirements/docs.txt, -r requirements/quality.txt, -r requirements/test.txt, astroid, bleach, packaging, pathlib2, readme-renderer, tox, virtualenv
sqlparse==0.3.1 # via -r requirements/base.txt, -r requirements/test.txt, django
toml==0.10.0 # via -r requirements/compatibility.txt, tox
tox-battery==0.5.2 # via -r requirements/compatibility.txt
tox==3.14.5 # via -r requirements/compatibility.txt, tox-battery
tqdm==4.43.0 # via -r requirements/docs.txt, twine
twine==1.15.0 # via -r requirements/docs.txt
typed-ast==1.4.1 # via -r requirements/quality.txt, astroid
urllib3==1.25.8 # via -r requirements/docs.txt, requests
virtualenv==20.0.10 # via -r requirements/compatibility.txt, tox
wcwidth==0.1.8 # via -r requirements/test.txt, pytest
webencodings==0.5.1 # via -r requirements/docs.txt, bleach
wheel==0.34.2 # via -r requirements/docs.txt
wrapt==1.11.2 # via -r requirements/quality.txt, astroid
zipp==1.2.0 # via -r requirements/compatibility.txt, -r requirements/test.txt, importlib-metadata, importlib-resources

# The following packages are considered to be unsafe in a requirements file:
# setuptools
8 changes: 8 additions & 0 deletions requirements/docs.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# # # # # # # # # # #
#
# Docs Requirements.
#
# # # # # # # # # # #

twine
wheel
25 changes: 25 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# make upgrade
#
bleach==3.1.1 # via readme-renderer
certifi==2019.11.28 # via requests
chardet==3.0.4 # via requests
docutils==0.16 # via readme-renderer
idna==2.9 # via requests
pkginfo==1.5.0.1 # via twine
pygments==2.6.1 # via readme-renderer
readme-renderer==25.0 # via twine
requests-toolbelt==0.9.1 # via twine
requests==2.23.0 # via requests-toolbelt, twine
six==1.14.0 # via bleach, readme-renderer
tqdm==4.43.0 # via twine
twine==1.15.0 # via -r requirements/docs.in
urllib3==1.25.8 # via requests
webencodings==0.5.1 # via bleach
wheel==0.34.2 # via -r requirements/docs.in

# The following packages are considered to be unsafe in a requirements file:
# setuptools
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# make upgrade
#
attrs==19.3.0 # via pytest
coverage==5.0.3 # via pytest-cov
coverage==5.0.4 # via pytest-cov
importlib-metadata==1.5.0 # via pluggy, pytest
more-itertools==8.2.0 # via pytest
packaging==20.3 # via pytest
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[wheel]
universal = 1

[pycodestyle]
exclude=.git,.venv,.tox, .env
max-line-length=90
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,30 @@ def is_requirement(line):
setup(
name='django-view-permissions',
version=VERSION,
author='Ayub-khan',
author='ayub-khan',
author_email='[email protected]',
url='https://github.com/Ayub-Khan/django-view-permissions',
description='Utility to handle django view access',
long_description=README + '\n\n' + CHANGELOG,
long_description_content_type='text/x-rst',
packages=find_packages(exclude=['tests']),
license='Apache Software License 2.0',
keywords='Django view permissions user',
install_requires=load_requirements('requirements/base.in'),
tests_requires=load_requirements('requirements/test.in'),
zip_safe=False,
python_requires='>=3.5',
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0'
'Framework :: Django :: 3.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
"Operating System :: OS Independent",
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
Expand Down

0 comments on commit 1311760

Please sign in to comment.