From cc54e6243ad7a31d5f5ac75abb3f97bf27fc5966 Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Wed, 27 Jan 2021 18:00:24 -0500 Subject: [PATCH] Add dev makefile target for setting up the local dev env --- Makefile | 6 +++++- README.md | 15 ++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 1cfcf27..3dc1399 100644 --- a/Makefile +++ b/Makefile @@ -32,5 +32,9 @@ source: ## Build Python source distribution package test: ## Run the project testsuite(s) poetry run tox --recreate -publish: wheel source ## Build and upload to pypi (requires $PYPI_API_KEY be set) +dev: ## Create the local dev environment + poetry install -E poetry + poetry run pre-commit install + +publish: test wheel source ## Build and upload to pypi (requires $PYPI_API_KEY be set) @poetry publish --username __token__ --password $(PYPI_API_KEY) diff --git a/README.md b/README.md index f91fb82..f2d5323 100644 --- a/README.md +++ b/README.md @@ -491,15 +491,16 @@ git clone https://github.com/enpaul/tox-poetry-installer.git # ...over SSH git clone git@github.com:enpaul/tox-poetry-installer.git -# Create a the local project virtual environment and install dependencies -cd tox-poetry-installer -poetry install -E poetry +cd tox-poetry-installer/ -# Install pre-commit hooks -poetry run pre-commit install +# Create and configure the local development environment +make dev -# Run tests and static analysis -poetry run tox +# Run tests and CI locally +make test + +# Check additional make targets +make help ``` **NOTE:** Because the pre-commit hooks require dependencies in the Poetry environment it