-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
131 lines (115 loc) · 3.45 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
127
128
129
130
131
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "knarrow"
description = 'Shoot a knarrow to the knee'
readme = "README.md"
requires-python = ">=3.8"
license = "Apache-2.0"
keywords = [ "optimization", "knee", "elbow", "kneedle" ]
authors = [
{ name = "Marijan Smetko", email = "[email protected]" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Utilities",
"Typing :: Typed",
]
dependencies = [
"numpy",
]
dynamic = ["version"]
[project.optional-dependencies]
cli = ["typer[all]==0.13.0"]
[project.urls]
Documentation = "https://github.com/InCogNiTo124/knarrow#readme"
Issues = "https://github.com/InCogNiTo124/knarrow/issues"
Source = "https://github.com/InCogNiTo124/knarrow"
[project.scripts]
knarrow = "knarrow.cli:app"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/knarrow/__about__.py"
[tool.hatch.envs.default]
dependencies = [
"black",
"coverage[toml]",
"flake8",
"isort",
"mypy",
"pytest",
"pytest-cov",
"typer[all]"
]
[tool.hatch.envs.default.scripts]
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src/knarrow --cov=tests {args}"
no-cov = "cov --no-cov {args}"
lint = [
"flake8 src/",
# "mypy src/",
"black --check src/",
"isort --check src/",
]
[tool.hatch.build.targets.wheel]
packages = ["src/knarrow"]
[tool.hatch.build.targets.sdist]
include = ["src/knarrow/*"]
[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"] # matches entries in workflow
### TODO perhaps optimize the tool configurations
[tool.mypy]
plugins = "numpy.typing.mypy_plugin"
ignore_missing_imports = true
allow_untyped_calls = true
strict = false
exclude = "venv"
# If certain strict config options are too pedantic for a project,
# disable them selectively here by setting to false.
[tool.black]
# Use the more relaxed max line length permitted in PEP8.
line-length = 120
target-version = ["py38", "py39", "py310", "py311"]
# black will automatically exclude all files listed in .gitignore
# If you need to exclude additional folders, consider using extend-exclude to avoid disabling the
# default .gitignore behaviour.
[tool.isort]
profile = "black"
line_length = 120
force_sort_within_sections = true
# Inform isort of paths to import names that should be considered part of the "First Party" group.
src_paths = ["src/knarrow"]
skip_gitignore = true
# If you need to skip/exclude folders, consider using skip_glob as that will allow the
# isort defaults for skip to remain without the need to duplicate them.
[tool.coverage.run]
branch = true
parallel = true
omit = [
"src/knarrow/__about__.py",
"tests/conftest.py"
]
[tool.coverage.report]
show_missing = true
fail_under = 95
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
sort = "-miss"