-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from aikikode/feature/drop_27_support
BREAK: remove 2.7 support; remove docker; use travis python
- Loading branch information
Showing
15 changed files
with
144 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,50 @@ | ||
language: python | ||
sudo: required | ||
services: | ||
- docker | ||
script: | ||
- make docker/build | ||
before_install: | ||
- pip install codecov | ||
python: | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
install: | ||
- pip install codecov tox-travis | ||
script: tox | ||
after_success: | ||
- codecov | ||
deploy: | ||
provider: pypi | ||
user: kpn-digital | ||
skip_cleanup: true | ||
password: | ||
secure: U4xdw255nzxtgjDb1IDROodBYp19RtTfsSkn3SX87s04/FF3/6jx46NQWLdnorZyCNkpTueKCWpUo364IeXtzg5XxyDNmOZUOkZYbzsszb7ZrCfC+4/mQiY1xl9ZDjDdnjgS2TPw1Zik2SVbwD3duwkXah9Juh8MkpcqYwFNSVjjUXVDiY7qN6VLT/uTqVDK6oTLKDZqMhMMSQ3tlVkdxGuR3CrXUOxreEiBod2WxCjprgZpzNBK9S0SNRNI/K8WtRUye7FMAGpkqR2+aQrFQre3qaALoYDSod+0Xknrsa0Bfz2RaCf0Mu6CBhKADMAc+1015r1w6MZ44T0YI223JMI81XTPcilpwnxDAQ+/+xM6vPIeMWtPEd0973WTPNdTMIZSgS1O45h7wwfUImf/t9nvCgbBliEFkPDOm5HsOc1YWu6LiagH5FbUwU5HCYlaXshwu2fPLwrlR3TvYa7ptPbiPiJ4BCHMWkHklXjzWcPR4vf86asaLe5jwq7A/nD9Kex514p/tzlBKotpddu6PSS7FxO5tfOVW5fxayS8RzmXdnsYFpb96Mlgk6qfGfhJ8EzOEqwrdjRgfuFKjceSWN5Lae5cS8F3n0cA88warvkiYlU9egnzAVCNYPppjMu93PXl361bqTC0yOwkcQfvKdc7TjtNA9D2UovEapuDxb8= | ||
on: | ||
tags: true | ||
all_branches: true | ||
- codecov | ||
|
||
stages: | ||
- name: lint checks | ||
- name: test | ||
- name: check build | ||
- name: deploy | ||
|
||
jobs: | ||
include: | ||
- stage: lint checks | ||
language: generic | ||
services: docker | ||
install: true | ||
after_success: true | ||
script: | ||
- docker run -v $(pwd):/app -w /app -i -t python:3.7 bash -c "make lint" | ||
before_install: | ||
- docker pull python:3.7 | ||
- stage: check build | ||
language: generic | ||
services: docker | ||
install: true | ||
after_success: true | ||
script: | ||
- docker run -v $(pwd):/app -w /app -i -t python:3.7 bash -c "make build" | ||
before_install: | ||
- docker pull python:3.7 | ||
- stage: deploy | ||
script: skip | ||
install: true | ||
after_success: true | ||
deploy: | ||
provider: pypi | ||
user: kpn-digital | ||
skip_cleanup: true | ||
password: | ||
secure: U4xdw255nzxtgjDb1IDROodBYp19RtTfsSkn3SX87s04/FF3 /6jx46NQWLdnorZyCNkpTueKCWpUo364IeXtzg5XxyDNmOZUOkZYbzsszb7ZrCfC+4 /mQiY1xl9ZDjDdnjgS2TPw1Zik2SVbwD3duwkXah9Juh8MkpcqYwFNSVjjUXVDiY7qN6VLT /uTqVDK6oTLKDZqMhMMSQ3tlVkdxGuR3CrXUOxreEiBod2WxCjprgZpzNBK9S0SNRNI/K8WtRUye7FMAGpkqR2+aQrFQre3qaALoYDSod+0Xknrsa0Bfz2RaCf0Mu6CBhKADMAc+1015r1w6MZ44T0YI223JMI81XTPcilpwnxDAQ+/+xM6vPIeMWtPEd0973WTPNdTMIZSgS1O45h7wwfUImf/t9nvCgbBliEFkPDOm5HsOc1YWu6LiagH5FbUwU5HCYlaXshwu2fPLwrlR3TvYa7ptPbiPiJ4BCHMWkHklXjzWcPR4vf86asaLe5jwq7A/nD9Kex514p/tzlBKotpddu6PSS7FxO5tfOVW5fxayS8RzmXdnsYFpb96Mlgk6qfGfhJ8EzOEqwrdjRgfuFKjceSWN5Lae5cS8F3n0cA88warvkiYlU9egnzAVCNYPppjMu93PXl361bqTC0yOwkcQfvKdc7TjtNA9D2UovEapuDxb8= | ||
on: | ||
tags: true | ||
all_branches: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,70 @@ | ||
# This Makefile requires the following commands to be available: | ||
# * python3.6 | ||
# * docker | ||
# * docker-compose | ||
# * python3.7 | ||
|
||
DEPS:=requirements.txt | ||
DOCKER_COMPOSE:=$(shell which docker-compose) | ||
|
||
PIP:="venv/bin/pip" | ||
CMD_FROM_VENV:=". venv/bin/activate; which" | ||
TOX=$(shell "$(CMD_FROM_VENV)" "tox") | ||
PYTHON=$(shell "$(CMD_FROM_VENV)" "python") | ||
TWINE=$(shell "$(CMD_FROM_VENV)" "twine") | ||
TOX_PY_LIST="$(shell $(TOX) -l | grep ^py | xargs | sed -e 's/ /,/g')" | ||
|
||
.PHONY: clean pyclean test lint isort docker setup.py build publish | ||
|
||
tox: | ||
$(TOX) | ||
SRC:=fqn_decorators tests setup.py | ||
|
||
.PHONY: pyclean | ||
pyclean: | ||
@find . -name *.pyc -delete | ||
@rm -rf *.egg-info build | ||
@rm -rf coverage.xml .coverage | ||
-find . -name "*.pyc" -delete | ||
-rm -rf *.egg-info build | ||
-rm -rf coverage*.xml .coverage | ||
|
||
.PHONY: clean | ||
clean: pyclean | ||
@rm -rf venv | ||
@rm -rf .tox | ||
-rm -rf venv | ||
-rm -rf .tox | ||
|
||
venv: PYTHON?=python3.7 | ||
venv: | ||
@python3.6 -m venv venv | ||
@$(PIP) install -U "pip>=7.0" -q | ||
@$(PIP) install -U setuptools -q | ||
@$(PIP) install --use-feature=2020-resolver -r $(DEPS) | ||
$(PYTHON) -m venv venv | ||
venv/bin/pip install -U "pip>=7.0" -q | ||
venv/bin/pip install -U setuptools -q | ||
venv/bin/pip install -r requirements.txt | ||
|
||
## Code style | ||
.PHONY: lint | ||
lint: lint/black lint/flake8 lint/isort lint/mypy | ||
|
||
test: venv pyclean | ||
$(TOX) -e $(TOX_PY_LIST) | ||
.PHONY: lint/black | ||
lint/black: venv | ||
venv/bin/black --diff --check $(SRC) | ||
|
||
test/%: venv pyclean | ||
$(TOX) -e $(TOX_PY_LIST) -- $* | ||
.PHONY: lint/flake8 | ||
lint/flake8: venv | ||
venv/bin/flake8 $(SRC) | ||
|
||
lint: venv | ||
@$(TOX) -e isort-check | ||
@$(TOX) -e flake8 | ||
.PHONY: lint/isort | ||
lint/isort: venv | ||
venv/bin/isort --diff --check $(SRC) | ||
|
||
isort: venv | ||
@$(TOX) -e isort-fix | ||
.PHONY: lint/mypy | ||
lint/mypy: venv | ||
venv/bin/mypy $(SRC) | ||
|
||
docker: | ||
$(DOCKER_COMPOSE) run --rm --service-ports app bash | ||
.PHONY: format | ||
format: format/isort format/black | ||
|
||
docker/%: | ||
$(DOCKER_COMPOSE) run --rm --service-ports app make $* | ||
.PHONY: format/isort | ||
format/isort: venv | ||
venv/bin/isort $(SRC) | ||
|
||
.PHONY: format/black | ||
format/black: venv | ||
venv/bin/black $(SRC) | ||
|
||
## Tests | ||
.PHONY: unittests | ||
unittests: TOX_ENV?=ALL | ||
unittests: TOX_EXTRA_PARAMS?="" | ||
unittests: venv | ||
venv/bin/tox -e $(TOX_ENV) $(TOX_EXTRA_PARAMS) | ||
|
||
.PHONY: test | ||
test: pyclean venv unittests | ||
|
||
## Distribution | ||
build: venv tox | ||
.PHONY: build | ||
build: venv | ||
-rm -rf dist build | ||
$(PYTHON) setup.py sdist bdist_wheel | ||
$(TWINE) check dist/* | ||
|
||
publish: build | ||
$(TWINE) upload dist/* | ||
venv/bin/python setup.py sdist bdist_wheel | ||
venv/bin/twine check dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
# -*- coding: utf-8 -*- | ||
from .decorators import * | ||
from .decorators import * # noqa: F403, F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
# -*- coding: utf-8 -*- | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.