-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (120 loc) · 3.23 KB
/
pyproject.toml
File metadata and controls
135 lines (120 loc) · 3.23 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[project]
name = "unity-job-analytics"
version = "2025.1.0"
requires-python = ">=3.11"
readme = "README.md"
description = "Unity Job Analytics is a tool for analyzing job data in the Unity cluster, providing insights into job performance and efficiency."
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[tool.ruff]
# Ruff configuration options
line-length = 119 # Override ruff's default so that lines aren't more than 120 characters
target-version = "py311"
preview = true # enable preview features to support new pydocstyle rules
# Formatting
indent-width = 4
[tool.ruff.lint]
select = [
# pycodestyle: E
"E",
# Pyflakes: F
"F",
# pyupgrade: UP
"UP",
# flake8-bugbear: B
"B",
# flake8-simplify: SIM
"SIM",
# PEP 8 naming: N
"N",
# NumPy rules: NPY
"NPY",
# pandas-vet: PD
"PD",
# flake8-todos: TD
"TD",
# pydoclint: DOC
"DOC",
# flake8-annotations: ANN
"ANN",
# pydocstyle: D
# Undocumented public method and public class: D102, D101
"D102", "D101",
# pydocstyle: D
# One blank line between summary and description: D205
"D205",
# pydocstyle: D
# Docstring capitalization: D403, D405
"D403", "D405",
# pydocstyle: D
# Docstring should not start with this: D404
"D404",
# pydocstyle: D
# Missing blank line after docstring section: D410
"D410",
# undocumented-param (D417)
"D417",
]
ignore = [
# Ignore use ternary operator in if statements
"SIM108",
# Ignore use of FIXME tags
"TD001",
# Ignore missing issue link in TODO tags
"TD003",
# Ignore removing returns section when function doesn't return anything
"DOC202",
]
[tool.ruff.lint.per-file-ignores]
# Ignore some rules in Benjamin's file
"mvp_scripts/*" = ["N", "NPY", "PD", "D100", "TD", "ANN"]
"notebooks/mvp/SlurmGPU.ipynb" = ["N", "NPY", "PD", "D100", "TD", "ANN"]
[tool.ruff.lint.isort]
# Combine multiple 'as' imports on a single line (e.g., import foo as bar, baz as qux)
combine-as-imports = true
# Force sorting of imports within each section (standard, third-party, first-party)
force-sort-within-sections = true
# Treat 'scripts' and 'src' directory as first-party code for import sorting
known-first-party = ["mvp_scripts", "src"]
# Docstring style
[tool.ruff.format]
# format code in docstrings
docstring-code-format = true
# Exclude some directories
exclude = [
"__pycache__",
".git",
".venv",
"venv",
"build",
"dist"
]
[tool.pytest.ini_options]
# pytest configuration options
addopts = [
"--import-mode=importlib", "-ra"
]
pythonpath = "."
testpaths = ["tests"]
env = [
# Set the environment variable to indicate that tests are running
"RUN_ENV=TEST"
]
[tool.mkdocs]
# MkDocs configuration options in the YAML file (mkdocs.yml) can be embedded here in pyproject.toml instead
[tool.coverage.run]
source = ["unity-job-analytics"]
branch = true
[tool.coverage.report]
show_missing = true
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
exclude = [
# Exclude Benjamin's code from type checking
"mvp_scripts/cpu_metrics.py",
"mvp_scripts/gpu_metrics.py",
"mvp_scripts/zero_gpu_usage_list.py",
"notebooks/mvp/SlurmGPU.ipynb"
]