Skip to content
This repository was archived by the owner on Oct 3, 2020. It is now read-only.

Commit f24a627

Browse files
authored
Switch to poetry & black (#51)
* use poetry and black for formatting * fix Travis build * add flake8 dev dependency * update deps * also update pyproject version * remove old setup files * use new f-literals * more f-literals * status = stable * + Python 3.8
1 parent 8e39772 commit f24a627

21 files changed

+1369
-841
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length=240
3+
ignore=E722,W503,E265

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ dist/
1010
.tox/
1111
docs/_build
1212
htmlcov/
13+
.mypy_cache

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
dist: xenial
1+
dist: bionic
22
language: python
33
python:
4-
- "3.6"
4+
- "3.7"
55
install:
6-
- pip install pipenv
7-
- pipenv install --dev
6+
- pip install poetry
87
script:
98
- make test docs package
109
after_success:

Makefile

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,31 @@ default: package
77
clean:
88
rm -fr build dist *egg-info .tox/ .cache/ .pytest_cache/ docs/_build/
99

10-
test:
11-
pipenv run flake8
12-
pipenv run coverage run --source=pykube -m py.test
13-
pipenv run coverage html
14-
pipenv run coverage report
10+
.PHONY: install
11+
install:
12+
poetry install
13+
14+
test: install
15+
poetry run flake8
16+
poetry run black --check pykube
17+
poetry run mypy --ignore-missing-imports pykube
18+
poetry run coverage run --source=pykube -m py.test
19+
poetry run coverage html
20+
poetry run coverage report
1521

1622
apidocs:
1723
# update autodoc, only needs to be run when new modules are added
18-
pipenv run sphinx-apidoc pykube -o docs/api/ -T --force
24+
poetry run sphinx-apidoc pykube -o docs/api/ -T --force
1925

2026
docs:
21-
pipenv run sphinx-build -M html docs docs/_build
27+
poetry run sphinx-build -M html docs docs/_build
2228

2329
package: test
24-
pipenv run python3 setup.py sdist bdist_wheel
25-
pipenv run twine check dist/pykube*
30+
poetry build
2631

2732
upload: package
28-
pipenv run twine upload dist/pykube*
33+
poetry publish
2934

3035
version:
3136
sed -i "s/__version__ = .*/__version__ = '${VERSION}'/" pykube/__init__.py
37+
poetry version "${VERSION}"

Pipfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)