Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (133 loc) · 3.89 KB
/
Copy pathpyproject.toml
File metadata and controls
151 lines (133 loc) · 3.89 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[project]
name = "sarc"
version = "0.1.0"
description = "Surveillance et analyse des ressources de calcul"
authors = [{ name = "Mila-IDT" }]
requires-python = "==3.14.*"
readme = "README.md"
dependencies = [
"fabric>=3.0.0,<4",
"prometheus-api-client>=0.7,<0.8",
"pydantic>=2.11.4,<3",
"sqlmodel>=0.0.38",
"numpy>=2.5,<2.6",
"ldap3>=2.9.1,<3",
"python-hostlist>=2.2.1,<3",
"tqdm>=4.66,<5",
"flatten-dict>=0.5,<0.6",
"simple-parsing>=0.1.0,<0.2",
"opentelemetry-api>=1.36.0,<2",
"opentelemetry-sdk>=1.36.0,<2",
"requests-mock>=1.11.0,<2",
"pandas>=3.1.0,<3.2.0",
"gifnoc>=0.6,<0.7",
"serieux>=0.3.6,<0.4",
"watchdog>=6,<7",
"python-dateutil>=3,<4",
"opentelemetry-exporter-otlp>=1.23.0,<2",
"iguane",
"filelock>=3.18.0",
"fastapi[standard-no-fastapi-cloud-cli]>=0.161,<0.162",
"requests>=2.32.3,<3",
"google-auth>=2.40.2,<3",
"rapporteur>=0.1.1",
"easy-oauth>=0.0.9",
"pyotp>=2.9.0",
"alembic>=1.18.4",
"alembic-utils>=0.8.8",
"cloud-sql-python-connector>=1.20.3",
"pg8000>=1.31.5",
"jinja2>=3.1.6",
"mssql-python>=1.10.0",
"slack-sdk>=3.43.0",
"certifi>=2024.2.2",
"opentelemetry-instrumentation-sqlalchemy>=0.64b0",
"mistune>=3.3.3,<4",
"opentelemetry-instrumentation-fastapi>=0.65b0",
"httpx2>=2.15.1,<3",
]
[project.scripts]
sarc = "sarc.cli:main"
[dependency-groups]
dev = [
"pytest>=9.0.1,<10",
"pytest-cov>=7,<8",
"pytest-regressions>=2.7.0,<3,!=2.8.1",
"tox>=4.25.0,<5",
"fabric[testing]>=3.0.0,<4",
"pytest-timeout>=2.1.0,<3",
"pytest-custom-exit-code>=0.3.0,<0.4",
"pytest-xdist>=3.3.1,<4",
"tabulate>=0.10,<0.11",
"tox-uv>=1.25.0,<2",
"pytest-httpserver>=1.1.3,<2",
"types-paramiko>=3.5.0.20240928",
"pandas-stubs>=2.2.3.250308",
"types-requests>=2.32.0.20250328",
"types-ldap3>=2.9.13.20240205",
"types-tqdm>=4.67.0.20250417",
"pytest-env>=1.1.5,<2",
"ruff>=0.17,<0.18",
"sphinxcontrib-openapi>=0.10.0,<0.11.0",
"time-machine>=3.2.0",
"ty>=0.0.36",
"sphinx>=9.1,<10",
"sphinx-rtd-theme>=3.0.2,<4",
"myst-parser>=5,<6",
"sphinxcontrib-mermaid>=2.0.2",
]
# to consider
# - DTZ: datetimes without timezones (not right now)
# - TC: type checking style
[tool.ruff.format]
skip-magic-trailing-comma = true
[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.ruff.lint]
select = ["ARG", "E", "F", "FA", "LOG", "PERF", "PIE", "PL", "T20", "W", "I", "TID251"]
ignore = [
"E501", # line too long (ruff format will handle it)
"PLW2901", # loop variable overwritten by assignment
"PLR0912", # too many branches
"PLR0913", # too many function arguments
"PLR0915", # too many statements
"PLR0917", # too many positional arguments
"PLR2004", # replace magic value by variable
"PLC0415", # imports should be a the top level
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["ARG", "E", "PERF", "T20"]
"sarc/testing/**" = ["T20"]
"docs/**" = ["T20"]
"scripts/**" = ["T201"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"sqlmodel.SQLModel".msg = "Use 'from sarc.db.sqlmodel import SQLModel' (only for the SQLModel class itself)"
[tool.uv]
default-groups = ["dev"]
[tool.uv.sources]
iguane = { git = "https://github.com/mila-iqia/IGUANE.git", rev = "9cd7b5e1253033c935e39da9c1b8a22cda440112" }
[tool.pytest_env]
TQDM_DISABLE = "1"
[tool.hatch.build.targets.sdist]
include = ["sarc"]
[tool.hatch.build.targets.wheel]
include = ["sarc"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.alembic]
script_location = "%(here)s/alembic"
timezone = "UTC"
#prepend_sys_path = [
# "."
#]
[[tool.alembic.post_write_hooks]]
name = "ruff"
type = "exec"
executable = "ruff"
options = "check --fix REVISION_SCRIPT_FILENAME"
[[tool.alembic.post_write_hooks]]
name = "ruff_format"
type = "exec"
executable = "ruff"
options = "format REVISION_SCRIPT_FILENAME"