Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
116 lines (102 loc) · 3.91 KB
/
Copy pathpyproject.toml
File metadata and controls
116 lines (102 loc) · 3.91 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
# The Python SDK of the OVHcloud API.
#
# The distribution name and the import name are set in sdk.env, not here. This file always
# says "ovhcloud". scripts/export.sh writes the names of sdk.env into the exported copy.
[build-system]
requires = ["hatchling>=1.27"]
build-backend = "hatchling.build"
[project]
name = "ovhcloud"
dynamic = ["version"]
description = "Python client for the OVHcloud API"
# export.sh points this at README.md, which is docs/using-the-sdk.md in the exported tree.
readme = "README.md"
requires-python = ">=3.11"
license = "Apache-2.0"
# export.sh rewrites these two paths: the exported tree has LICENSE at its root.
license-files = ["LICENSE", "LICENSES/*"]
authors = [{ name = "OVH SAS" }]
keywords = ["ovh", "ovhcloud", "api", "sdk", "cloud"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Typing :: Typed",
]
dependencies = [
"httpx>=0.27,<1",
"pydantic>=2.11,<3",
"typing-extensions>=4.12",
]
[project.urls]
Homepage = "https://github.com/ovh/sdk-python"
Source = "https://github.com/ovh/sdk-python"
Changelog = "https://github.com/ovh/sdk-python/blob/master/CHANGELOG.md"
Documentation = "https://github.com/ovh/sdk-python#readme"
Issues = "https://github.com/ovh/sdk-python/issues"
[dependency-groups]
dev = [
"pytest>=8",
"respx>=0.22",
"trustme>=1.2",
]
[tool.hatch.version]
# export.sh stamps the release version in this file.
path = "src/ovhcloud/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/ovhcloud"]
[tool.hatch.build.targets.sdist]
include = ["src/ovhcloud", "docs/using-the-sdk.md", "opensource", "README.md", "LICENSE", "LICENSES", "CHANGELOG.md", "index", "AGENTS.md", "llms.txt", "README.md", "CHANGELOG.md", "CONTRIBUTING.md", "examples"]
[tool.ruff]
line-length = 100
target-version = "py311"
src = ["src", "tests", "scripts"]
extend-exclude = ["build", "dist", "sample/.venv"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP", "A", "SIM", "RUF", "N", "PTH", "PIE", "RET", "C4"]
ignore = [
# A Python SDK of a JSON API has many names like "id" and "type".
"A002",
"A003",
# "T | None | NotGiven" reads better with NotGiven last.
"RUF036",
]
[tool.ruff.lint.per-file-ignores]
# Generated code: names from the API. The templates add "# ruff: noqa: E501, F401" to the
# files with long docstring lines and imports they always add.
# E741: an enum member can be "I" or "l": the API's value ("i"), as in the Go SDK.
"src/ovhcloud/api/**" = ["A", "N", "UP", "RUF", "SIM", "RET", "C4", "PIE", "B", "E741"]
"build/**" = ["A", "N", "UP", "RUF", "SIM", "RET", "C4", "PIE", "B"]
"tests/**" = ["E501", "SIM105", "RUF012"]
"tests/fixtures/**" = ["A", "N", "UP", "RUF", "SIM", "RET", "C4", "PIE", "B"]
"scripts/**" = ["PTH", "E501"]
[tool.pyright]
include = ["src", "tests"]
# tests/fixtures holds generated code without its core: scripts/test-templates.sh checks it.
exclude = ["**/__pycache__", "build", "dist", "sample", "tests/fixtures"]
pythonVersion = "3.11"
typeCheckingMode = "standard"
# The hand-written core is checked in strict mode. Generated code is checked in standard mode.
strict = ["src/ovhcloud/_core"]
reportMissingModuleSource = false
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra"
xfail_strict = true
filterwarnings = ["error"]
[tool.hatch.build]
ignore-vcs = true
[tool.hatch.build.targets.wheel.force-include]
"index" = "ovhcloud/index"
"AGENTS.md" = "ovhcloud/AGENTS.md"
"llms.txt" = "ovhcloud/llms.txt"
"README.md" = "ovhcloud/README.md"
"CHANGELOG.md" = "ovhcloud/CHANGELOG.md"
"CONTRIBUTING.md" = "ovhcloud/CONTRIBUTING.md"