-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
poetry: Switch from using pipenv to poetry
Fixes: 32
- Loading branch information
Showing
8 changed files
with
962 additions
and
964 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,3 +131,6 @@ cython_debug/ | |
# VS Code | ||
.history | ||
.vscode | ||
|
||
#pyenv | ||
.python-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,42 @@ | ||
.DEFAULT_GOAL := help | ||
.PHONY: help build test | ||
|
||
PYPI_TOKEN := $(shell echo ${PYPI_TOKEN}) | ||
PYPI_TEST_TOKEN := $(shell echo ${PYPI_TEST_TOKEN}) | ||
|
||
|
||
build: ## Build an application | ||
@pipenv run python -m build --no-isolation | ||
@poetry build | ||
|
||
configure_pypi_publishing: ## Configure publishing to PyPI | ||
@if [ -z "${PYPI_TOKEN}" ] ; then echo "you need to export PYPI_TOKEN before running this command" ; false ; fi | ||
@if [ -z "${PYPI_TOKEN}" ] ; then echo "you need to export PYPI_TEST_TOKEN before running this command" ; false ; fi | ||
@poetry config repositories.test-pypi https://test.pypi.org/legacy/ | ||
@poetry config pypi-token.test-pypi $(PYPI_TEST_TOKEN) | ||
@poetry config pypi-token.pypi $(PYPI_TOKEN) | ||
|
||
publish-test: ## Upload package to test PyPI | ||
@pipenv run twine upload --repository testpypi dist/* | ||
@poetry publish -r test-pypi | ||
|
||
publish: build ## Upload package to PyPI | ||
@pipenv run twine upload dist/* | ||
@poetry publish | ||
@make clean | ||
|
||
install: build ## Install application to Pip environment | ||
@pipenv run python -m pip install | ||
|
||
install-dev: ## Install application to Pip development environment | ||
@pipenv run python -m pip install -e | ||
@make clean | ||
install: build ## Install application to Poetry environment | ||
@poetry install | ||
|
||
clean: ## Remove build files | ||
@rm -Rf build/ dist/ *.egg-info .pytest_cache/ .mypy_cache/ .pytype/ .eggs/ src/*.egg-info | ||
@echo "Temporary files were clear" | ||
|
||
test: ## Run code tests | ||
@pipenv run python -m pytest -q | ||
|
||
sync: ## Sync with Pipfile packages list | ||
@pipenv sync | ||
@poetry run pytest | ||
|
||
lint: ## Run code linters | ||
@echo "Run code linters..." | ||
@pipenv run mypy ./src | ||
@poetry run mypy ./src | ||
|
||
help: ## Show this message | ||
@echo "Application management" | ||
@echo | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[tool.poetry] | ||
name = "openapi3-parser" | ||
version = "1.1.16" | ||
description = "OpenAPI 3 parser to use a specification inside of the code in your projects" | ||
authors = ["Artem Manchenkov <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
packages = [{ include = "openapi_parser", from = "src" }] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
prance = ">=0.20.2" | ||
openapi-spec-validator = "==0.6.0" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
wheel = ">=0.35.1" | ||
mypy = ">=0.800" | ||
pytest = ">=6.2.2" | ||
build = "*" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
|
||
[tool.pytest.ini_options] | ||
testpaths = [ | ||
"tests", | ||
] | ||
pythonpath = [ | ||
"./src" | ||
] |