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

Commit

Permalink
Switch to poetry & black (#51)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
hjacobs authored Dec 23, 2019
1 parent 8e39772 commit f24a627
Show file tree
Hide file tree
Showing 21 changed files with 1,369 additions and 841 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length=240
ignore=E722,W503,E265
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dist/
.tox/
docs/_build
htmlcov/
.mypy_cache
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
dist: xenial
dist: bionic
language: python
python:
- "3.6"
- "3.7"
install:
- pip install pipenv
- pipenv install --dev
- pip install poetry
script:
- make test docs package
after_success:
Expand Down
26 changes: 16 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,31 @@ default: package
clean:
rm -fr build dist *egg-info .tox/ .cache/ .pytest_cache/ docs/_build/

test:
pipenv run flake8
pipenv run coverage run --source=pykube -m py.test
pipenv run coverage html
pipenv run coverage report
.PHONY: install
install:
poetry install

test: install
poetry run flake8
poetry run black --check pykube
poetry run mypy --ignore-missing-imports pykube
poetry run coverage run --source=pykube -m py.test
poetry run coverage html
poetry run coverage report

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

docs:
pipenv run sphinx-build -M html docs docs/_build
poetry run sphinx-build -M html docs docs/_build

package: test
pipenv run python3 setup.py sdist bdist_wheel
pipenv run twine check dist/pykube*
poetry build

upload: package
pipenv run twine upload dist/pykube*
poetry publish

version:
sed -i "s/__version__ = .*/__version__ = '${VERSION}'/" pykube/__init__.py
poetry version "${VERSION}"
22 changes: 0 additions & 22 deletions Pipfile

This file was deleted.

Loading

0 comments on commit f24a627

Please sign in to comment.