-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
164 lines (141 loc) · 3.98 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[build-system]
requires = ["hatchling", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[project]
name = "harbor-cli"
description = 'Command-line interface for Harbor.'
requires-python = ">=3.8"
license = "MIT"
keywords = []
authors = [{ name = "pederhan", email = "[email protected]" }]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Internet",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
"Typing :: Typed",
]
dependencies = [
"typer==0.9.0",
"harborapi>=0.25.2",
"pydantic>=2.7.4",
"trogon>=0.5.0",
"platformdirs>=2.5.4",
"tomli>=2.0.1",
"tomli-w>=1.0.0",
"rich>=12.6.0",
"click-repl==0.2.0",
"fuzzywuzzy>=0.18.0",
"python-Levenshtein>=0.20.9",
"keyring>=24.2.0",
"httpx[socks]>=0.26.0",
"strenum>=0.4.15",
]
dynamic = ["version", "readme"]
[project.optional-dependencies]
dev = [
"pytest>=7.2.0",
"pytest-cov>=4.0.0",
"pytest-mock>=3.10.0",
"pytest-timeout>=2.1.0",
"hypothesis>=6.62.1",
"ruff>=0.2.0",
"freezegun>=1.2.2",
]
[project.urls]
Source = "https://github.com/unioslo/harbor-cli"
Documentation = "https://unioslo.github.io/harbor-cli/"
Changelog = "https://github.com/unioslo/harbor-cli/blob/main/CHANGELOG.md"
Issues = "https://github.com/unioslo/harbor-cli/issues"
[project.scripts]
harbor = "harbor_cli.main:main"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"
end-before = "\n<!-- Cut before here -->"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "CHANGELOG.md"
pattern = "<!-- changelog follows -->\n\n(.*)"
[tool.hatch.version]
path = "harbor_cli/__about__.py"
[tool.hatch.envs.default]
dependencies = ["harbor_cli[dev]"]
[tool.hatch.envs.default.scripts]
test = "pytest {args}"
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=harbor_cli --cov=tests {args}"
no-cov = "cov --no-cov {args}"
# Version bumping
bump = "python scripts/bump_version.py {args}"
bump-dry = "python scripts/bump_version.py --dry-run {args}"
[tool.hatch.envs.docs]
dependencies = [
"mkdocs",
"mkdocs-material",
"mkdocstrings[python]",
"mkdocs-macros-plugin",
"mkdocs-literate-nav",
"mkdocs-simple-hooks",
"sanitize-filename",
"jinja2",
"pyyaml",
]
[tool.hatch.envs.docs.scripts]
build = "mkdocs build --clean --strict"
serve = "mkdocs serve --dev-addr localhost:8001"
[[tool.hatch.envs.test.matrix]]
python = ["38", "39", "310", "311"]
[tool.coverage.run]
branch = true
parallel = true
omit = ["harbor_cli/__about__.py"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"pass",
]
[tool.pyright]
pythonVersion = "3.8"
venvPath = "."
venv = ".venv"
ignore = ["tests", "scripts", "docs/scripts"]
typeCheckingMode = "strict"
[tool.ruff]
src = ["harbor_cli"]
extend-exclude = ["harbor_cli/__init__.py"]
[tool.ruff.lint]
extend-select = ["I"]
select = [
"E", # pycodestyle
"F", # pyflakes
]
ignore = [
"E501", # line too long (we let ruff formatter handle this)
"F541", # f-string is missing placeholders
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403"]
"harbor_cli/state.py" = ["E402"]
"scripts/**" = ["D"]
[tool.ruff.lint.isort]
# Force one line per import to simplify diffing and merging
force-single-line = true
# Add annotations import to every file
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"