python-betterproto/pyproject.toml
nat 804805f0f5
Update poe (#132)
- This update improves support for windows & removes the direct dependency on poetry
2020-08-06 22:16:25 +02:00

77 lines
2.3 KiB
TOML

[tool.poetry]
name = "betterproto"
version = "2.0.0b1"
description = "A better Protobuf / gRPC generator & library"
authors = ["Daniel G. Taylor <danielgtaylor@gmail.com>"]
readme = "README.md"
repository = "https://github.com/danielgtaylor/python-betterproto"
keywords = ["protobuf", "gRPC"]
license = "MIT"
packages = [
{ include = "betterproto", from = "src" }
]
[tool.poetry.dependencies]
python = "^3.6"
backports-datetime-fromisoformat = { version = "^1.0.0", python = "<3.7" }
black = { version = "^19.10b0", optional = true }
dataclasses = { version = "^0.7", python = ">=3.6, <3.7" }
grpclib = "^0.3.1"
jinja2 = { version = "^2.11.2", optional = true }
protobuf = { version = "^3.12.2", optional = true }
[tool.poetry.dev-dependencies]
black = "^19.10b0"
bpython = "^0.19"
grpcio-tools = "^1.30.0"
jinja2 = "^2.11.2"
mypy = "^0.770"
poethepoet = "^0.5.0"
protobuf = "^3.12.2"
pytest = "^5.4.2"
pytest-asyncio = "^0.12.0"
pytest-cov = "^2.9.0"
pytest-mock = "^3.1.1"
tox = "^3.15.1"
[tool.poetry.scripts]
protoc-gen-python_betterproto = "betterproto.plugin:main"
[tool.poetry.extras]
compiler = ["black", "jinja2", "protobuf"]
[tool.poe.tasks]
# Dev workflow tasks
generate = { script = "tests.generate:main", help = "Generate test cases (do this once before running test)" }
test = { cmd = "pytest --cov src", help = "Run tests" }
types = { cmd = "mypy src --ignore-missing-imports", help = "Check types with mypy" }
format = { cmd = "black . --exclude tests/output_", help = "Apply black formatting to source code" }
clean = { cmd = "rm -rf .coverage .mypy_cache .pytest_cache dist betterproto.egg-info **/__pycache__ tests/output_*", help = "Clean out generated files from the workspace" }
# CI tasks
full-test = { shell = "poe generate && tox", help = "Run tests with multiple pythons" }
check-style = { cmd = "black . --check --diff --exclude tests/output_", help = "Check if code style is correct"}
[tool.black]
target-version = ['py36']
[tool.coverage.run]
omit = ["betterproto/tests/*"]
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
envlist = py36, py37, py38
[testenv]
whitelist_externals = poetry
commands =
poetry install -v --extras compiler
poetry run pytest --cov betterproto
"""
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"