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

Switch to poetry & black #51

Merged
merged 10 commits into from
Dec 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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