-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
115 lines (102 loc) · 2.72 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
[tool.poetry]
name = "waldur-site-agent"
version = "0.1.0"
description = "Agent for integrating service provider's site with Waldur Mastermind."
authors = ["OpenNode Team <[email protected]>"]
license = "MIT"
homepage = "https://waldur.com"
documentation = "https://docs.waldur.com"
readme = "README.md"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
packages = [{ include = "waldur_site_agent" }]
[tool.poetry.dependencies]
python = "^3.9"
python-waldur-client = "^0.5.9"
requests = "2.32.3"
pyyaml = "6.0.1"
sentry-sdk = "2.3.1"
poethepoet = "^0.26.1"
types-pyyaml = "^6.0.12.20240311"
paho-mqtt = "2.1.0"
[tool.poetry.group.dev.dependencies]
freezegun = "0.3.4"
coverage = "6.3.2"
pytest = "7.1.2"
pytest-cov = "3.0.0"
ruff = "^0.4.4"
[tool.poe.tasks]
pre.cmd = "pre-commit run --all-files"
pre.help = "Run pre-commit checks"
mypy.cmd = "mypy py_maker/**/*.py tests/**/*.py --strict"
mypy.help = "Run mypy checks"
format.cmd = "ruff format ."
format.help = "Format code with Ruff"
ruff.cmd = "ruff check waldur_site_agent --fix"
ruff.help = "Run Ruff checks"
markdown.cmd = "pymarkdown scan -r py_maker/**/[!CHANGELOG,!.github/]*.md docs/**/*.md"
markdown.help = "Run markdown checks"
[tool.ruff]
line-length = 100
lint.select = ["ALL"]
lint.ignore = [
"ANN101",
"PGH003",
"FBT002",
"FBT003",
"B006",
"PLR0913",
"C901",
"SLF001",
"BLE001",
"DTZ007",
"PERF203",
"FBT001",
"EM102",
'TRY003',
'PLW2901',
'TCH001',
'TCH002',
'TCH003',
'TD002',
'TD003',
'FIX002',
'S603',
'DTZ001',
'DTZ005',
"PLR0915",
"PLR0912",
] # These rules are ignored
lint.extend-ignore = [
"COM812",
"ISC001",
] # these are ignored for ruff formatting
[tool.ruff.format]
indent-style = "space"
quote-style = "double"
[tool.ruff.lint.pep8-naming]
classmethod-decorators = ["pydantic.validator", "pydantic.root_validator"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
"S101", # we can (and MUST!) use 'assert' in test files.
"ANN001", # annotations for fixtures are sometimes a pain for test files
]
[tool.ruff.lint.isort]
known-first-party = []
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.poetry.scripts]
waldur_site_agent = 'waldur_site_agent.main:main'
waldur_site_diagnostics = 'waldur_site_agent.common.utils:diagnostics'
waldur_site_load_components = 'waldur_site_agent.common.utils:load_offering_components'
waldur_slurm_create_homedirs = 'waldur_site_agent.common.utils:create_homedirs_for_offering_users'
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
addopts = "--cov=waldur_site_agent/"