Skip to content

Commit

Permalink
Merge b547d14 into 68626b1
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Dec 9, 2018
2 parents 68626b1 + b547d14 commit bd4a424
Show file tree
Hide file tree
Showing 21 changed files with 736 additions and 810 deletions.
3 changes: 2 additions & 1 deletion .appveyor.yml
Expand Up @@ -21,7 +21,8 @@ install:
- set PATH=C:\Python%PYTHON_MAJOR%%PYTHON_MINOR%;%PATH%
- set PATH=C:\Python%PYTHON_MAJOR%%PYTHON_MINOR%\Scripts;%PATH%
# Install system dependencies
- pip install pipenv
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
- set PATH=%USERPROFILE%\.poetry\bin
- make doctor
# Install project dependencies
- make install
Expand Down
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

1 change: 1 addition & 0 deletions .python-version
@@ -0,0 +1 @@
3.7.0
5 changes: 3 additions & 2 deletions .travis.yml
Expand Up @@ -12,14 +12,15 @@ matrix:
cache:
pip: true
directories:
- .venv
- ${VIRTUAL_ENV}

env:
global:
- RANDOM_SEED=0

before_install:
- pip install pipenv
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
- source $HOME/.poetry/env
- make doctor

install:
Expand Down
6 changes: 3 additions & 3 deletions .verchew.ini
Expand Up @@ -8,10 +8,10 @@ version = GNU Make
cli = python
versions = Python 3.4. | Python 3.5. | Python 3.6

[pipenv]
[Poetry]

cli = pipenv
versions = 10. | 11.
cli = poetry
version = 0.12.

[Graphviz]

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -8,7 +8,7 @@
* Windows: http://mingw.org/download/installer
* Mac: http://developer.apple.com/xcode
* Linux: http://www.gnu.org/software/make
* pipenv: http://docs.pipenv.org
* Poetry: https://poetry.eustace.io
* Graphviz: http://www.graphviz.org/Download.php

To confirm these system dependencies are configured correctly:
Expand Down
4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

51 changes: 25 additions & 26 deletions Makefile
Expand Up @@ -9,13 +9,11 @@ CONFIG := $(wildcard *.py)
MODULES := $(wildcard $(PACKAGE)/*.py)

# Virtual environment paths
export PIPENV_VENV_IN_PROJECT=true
export PIPENV_IGNORE_VIRTUALENVS=true
VENV := .venv
VIRTUAL_ENV ?= .venv

# MAIN TASKS ##################################################################

SNIFFER := pipenv run sniffer
SNIFFER := poetry run sniffer

.PHONY: all
all: install
Expand All @@ -29,7 +27,7 @@ watch: install .clean-test ## Continuously run all CI tasks when files chanage

.PHONY: run ## Start the program
run: install
pipenv run python $(PACKAGE)/__main__.py
poetry run python $(PACKAGE)/__main__.py

# SYSTEM DEPENDENCIES #########################################################

Expand All @@ -39,24 +37,29 @@ doctor: ## Confirm system dependencies are available

# PROJECT DEPENDENCIES ########################################################

DEPENDENCIES := $(VENV)/.pipenv-$(shell bin/checksum Pipfile* setup.py)
DEPENDENCIES := $(VIRTUAL_ENV)/.poetry-$(shell bin/checksum pyproject.toml poetry.lock) *.egg-info

.PHONY: install
install: $(DEPENDENCIES)

$(DEPENDENCIES):
pipenv run python setup.py develop
pipenv install --dev
@ poetry config settings.virtualenvs.in-project true
poetry install
@ touch $@

# CHECKS ######################################################################

PYLINT := pipenv run pylint
PYCODESTYLE := pipenv run pycodestyle
PYDOCSTYLE := pipenv run pydocstyle
ISORT := poetry run isort
PYLINT := poetry run pylint
PYCODESTYLE := poetry run pycodestyle
PYDOCSTYLE := poetry run pydocstyle

.PHONY: check
check: pylint pycodestyle pydocstyle ## Run linters and static analysis
check: isort pylint pycodestyle pydocstyle ## Run linters and static analysis

.PHONY: isort
isort: install
$(ISORT) $(PACKAGES) $(CONFIG) --recursive --apply

.PHONY: pylint
pylint: install
Expand All @@ -72,9 +75,9 @@ pydocstyle: install

# TESTS #######################################################################

PYTEST := pipenv run pytest
COVERAGE := pipenv run coverage
COVERAGE_SPACE := pipenv run coverage.space
PYTEST := poetry run pytest
COVERAGE := poetry run coverage
COVERAGE_SPACE := poetry run coveragespace

RANDOM_SEED ?= $(shell date +%s)
FAILURES := .cache/v/cache/lastfailed
Expand Down Expand Up @@ -115,8 +118,8 @@ read-coverage:

# DOCUMENTATION ###############################################################

PYREVERSE := pipenv run pyreverse
MKDOCS := pipenv run mkdocs
PYREVERSE := poetry run pyreverse
MKDOCS := poetry run mkdocs

MKDOCS_INDEX := site/index.html

Expand Down Expand Up @@ -146,18 +149,16 @@ mkdocs-live: mkdocs

# BUILD #######################################################################

PYINSTALLER := pipenv run pyinstaller
PYINSTALLER_MAKESPEC := pipenv run pyi-makespec
PYINSTALLER := poetry run pyinstaller
PYINSTALLER_MAKESPEC := poetry run pyi-makespec

DIST_FILES := dist/*.tar.gz dist/*.whl
EXE_FILES := dist/$(PROJECT).*
.PHONY: dist
dist: install $(DIST_FILES)
$(DIST_FILES): $(MODULES)
rm -f $(DIST_FILES)
pipenv run python setup.py check --strict --metadata
pipenv run python setup.py sdist
pipenv run python setup.py bdist_wheel
poetry build

.PHONY: exe
exe: install $(EXE_FILES)
Expand All @@ -170,12 +171,10 @@ $(PROJECT).spec:

# RELEASE #####################################################################

TWINE := pipenv run twine

.PHONY: upload
upload: dist ## Upload the current version to PyPI
git diff --name-only --exit-code
$(TWINE) upload dist/*.*
poetry publish
bin/open https://pypi.org/project/$(PROJECT)

# CLEANUP #####################################################################
Expand All @@ -185,7 +184,7 @@ clean: .clean-build .clean-docs .clean-test .clean-install ## Delete all generat

.PHONY: clean-all
clean-all: clean
rm -rf $(VENV)
rm -rf $(VIRTUAL_ENV)

.PHONY: .clean-install
.clean-install:
Expand Down
46 changes: 0 additions & 46 deletions Pipfile

This file was deleted.

0 comments on commit bd4a424

Please sign in to comment.