-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
126 lines (112 loc) · 3.24 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Poetry
[tool.poetry]
name = "pycql2"
version = "0.2.0"
description = "Pydantic models for OGC cql2-json and parser for cql2-text."
license = "MIT"
readme = "README.md"
authors = ["Erik Seglem <[email protected]>"]
include = ["pycql2/cql2.lark"]
repository = "https://github.com/eseglem/pycql2"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: Pydantic :: 1",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: GIS",
]
[tool.poetry.dependencies]
python = "^3.8"
pydantic = "^2.0.0"
geojson-pydantic = "^1.0.1"
lark = "^1.0.0"
pytest = { version = ">=7.2,<8.0", optional = true }
coverage = { version = ">=7.2", optional = true, extras = ["toml"] }
pytest-cov = { version = ">=4.0", optional = true }
hypothesis = { version = ">=6.94.0", optional = true }
hypofuzz = { version = ">=24.02.1", optional = true }
ruff = { version = ">=0.0.254", optional = true }
mypy = { version = ">=1.1.0", optional = true }
pre-commit = { version = ">=3.1.1", optional = true, python = ">=3.9" }
[tool.poetry.extras]
dev = ["ruff", "mypy", "pre-commit"]
test = ["pytest", "coverage", "pytest-cov", "hypothesis"]
fuzz = ["hypofuzz"]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# Ruff
[tool.ruff]
target-version = "py38"
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"S", # flake8-bandit
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"TRY", # tryceratops
"RUF", # Ruff specific rules
]
ignore = [
"E501", # Line length is handled automatically
]
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.lint.per-file-ignores]
"test_*" = [
"S101", # Use of assert is fine in tests
]
# Pytest
[tool.pytest.ini_options]
pythonpath = "pycql2"
testpaths = ["tests"]
# Most of the tests compare highly nested pydantic models and are truncated
# without extra verbosity.
addopts = "-vv"
# Coverage
[tool.coverage.run]
source = ["pycql2"]
branch = true
[tool.coverage.report]
show_missing = true
skip_empty = true
# MyPy
[tool.mypy]
mypy_path = "pycql2"
python_version = "3.10"
plugins = ["pydantic.mypy"]
show_error_codes = true
check_untyped_defs = true
namespace_packages = true
no_implicit_reexport = true
no_implicit_optional = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
warn_unused_configs = true
warn_unused_ignores = true
warn_redundant_casts = true
[[tool.mypy.overrides]]
module = ["rich"]
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true