-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
148 lines (136 loc) · 3.79 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
## ###########################################################################
## Project and Build
## ###########################################################################
[project]
name = "planet-auth"
requires-python = ">=3.9"
dynamic = ["version"]
# version = "X.X.X"
description = "Planet Auth Utility Code"
readme = "docs/index.md"
authors = [{ name = "Carl Adams", email = "[email protected]" }]
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
]
keywords = []
dependencies = [
# Base dependnecies for planet_auth
"httpx", # TODO: move into an optional dependency
"pyjwt[crypto]",
"pyqrcode",
"requests",
"setuptools", # for pkg_resources
"strenum",
# "sops", No longer maintained!
# Additional dependencies for planet_auth_utils (could make optional)
"click",
"prompt_toolkit",
]
[project.optional-dependencies]
build = [
"build",
"simple503",
"twine",
]
docs = [
"mkdocs",
"mkdocstrings[python]",
"mkdocs-click",
"mkdocs-material",
"mkdocs-macros-plugin"
]
examples = [
"flask",
# "planet-auth-config >= 2.0.0"
]
test = [
"black",
"coverage[toml]",
"freezegun",
"mypy",
"nox",
"pyflakes",
"pylint",
# "pylint[spelling]", ## TODO
"pytest",
"pytest-cov",
"pytest-xdist",
"semgrep",
"validators",
]
dev = [
"planet-auth[test, docs, build]",
]
internal = [
# For Planet Engineering internal usage. These are Planet internal packages,
# and will not be generally available.
"planet-auth-config >= 2.0.0",
]
[project.scripts]
plauth = "planet_auth_utils.commands.cli.main:plauth_cmd_group"
[build-system]
requires = ["setuptools>=62.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.dynamic]
# version = {file = "version.txt"}
version = {file = "version-with-buildnum.txt"}
## ###########################################################################
## Testing
## ###########################################################################
[tool.coverage.run]
# Note: Coverage seems to break step debugging in PyCharm.
source = [
"planet_auth",
"planet_auth_utils",
# "tests",
]
branch = true
[tool.coverage.report]
# skip_covered = true
show_missing = true
fail_under = 75
[tool.pytest.ini_options] # ignored if pytest.ini exists
# addopts = "--cov-report=term"
addopts = "--cov -rxXs --numprocesses=auto"
testpaths = [
"tests/test_planet_auth/unit",
# "tests/test_planet_auth/live_service",
"tests/test_planet_auth_utils/unit",
]
## ###########################################################################
## Formatting and Linting
## ###########################################################################
[tool.black]
line-length = 119
extend-exclude = "/docs/"
[tool.mypy]
# packages = "planet_auth"
files = "src,docs"
# PEP 484 now says optional should be explicit. TODO: change code and remove this mypy config
implicit_optional = true
[tool.pylint.main]
disable = [
"format", # We use black for formatting, so disable all formatting checks
"fixme", # Don't fail our build for TODO/FIXME comments.
#
"broad-exception-caught",
"consider-using-f-string",
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"too-few-public-methods",
"too-many-arguments",
"too-many-positional-arguments",
"unused-argument",
#
"C", # convention, for programming standard violation
"R", # refactor, for bad code smell
# "W", # warning, for python specific problems
# "E", # error, for probable bugs in the code
# "F", # fatal, if an error occurred which prevented pylint from doing
"protected-access"
]
#[tool.pylint.format]
#max-line-length = 119