-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
116 lines (99 loc) · 2.79 KB
/
Copy pathpyproject.toml
File metadata and controls
116 lines (99 loc) · 2.79 KB
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
[build-system]
requires = ["hatchling", "versioningit"]
build-backend = "hatchling.build"
[project]
name = "slurm-usage"
description = "Command to list the current cluster usage per user."
dynamic = ["version"]
authors = [{ name = "Bas Nijholt", email = "bas@nijho.lt" }]
dependencies = [
"polars>=1.8.2",
"pydantic>=2.10.6",
"pyyaml>=6.0.2",
"rich",
"typer>=0.16.1",
]
requires-python = ">=3.10"
license = { text = "MIT" }
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://github.com/basnijholt/slurm-usage"
[project.optional-dependencies]
test = ["pytest", "pre-commit", "coverage", "pytest-cov"]
docs = ["zensical", "markdown-gfm-admonition", "markdown-code-runner>=2.7.0"]
[project.scripts]
slurm-usage = "slurm_usage:app"
stats = "slurm_usage:app"
[tool.pytest.ini_options]
addopts = """
--cov=slurm_usage
--cov-report term
--cov-report html
--cov-fail-under=70
"""
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]
[tool.black]
line_length = 88
[tool.ruff]
line-length = 150
target-version = "py38"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"T20", # flake8-print
"ANN101", # Missing type annotation for {name} in method
"S101", # Use of assert detected
"PD901", # df is a bad variable name. Be kinder to your future self.
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {name}
"D402", # First line should not be the function's signature
"PLW0603", # Using the global statement to update `X` is discouraged
"D401", # First line of docstring should be in imperative mood
"SLF001", # Private member accessed
"PTH", # Use pathlib.Path
"DTZ005", # The use of `datetime.datetime.now()` without `tz` argument is not allowed
"PLR0913", # Too many arguments to function call
"S602", # `subprocess` call with `shell=True` identified, security issue
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["SLF001"]
".github/*" = ["INP001"]
[tool.ruff.lint.mccabe]
max-complexity = 18
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_any_unimported = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
check_untyped_defs = true
strict_equality = true
[tool.hatch.version]
source = "versioningit"
default-version = "0.0.0+unknown"
[tool.hatch.version.vcs]
method = "git"
match = ["v*"]
default-tag = "0.0.0"
[dependency-groups]
dev = [
"markdown-code-runner>=2.7.0",
"pytest>=7.4.4",
"pytest-cov>=4.1.0",
]
docs = [
"zensical",
"markdown-gfm-admonition",
"markdown-code-runner>=2.7.0",
]