-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (105 loc) · 4.36 KB
/
pyproject.toml
File metadata and controls
120 lines (105 loc) · 4.36 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
[build-system]
requires = ["pbr>=6.0.0", "setuptools>=64.0.0"]
build-backend = "pbr.build"
[project]
name = "openstack-cyborg"
description = "Distributed Acceleration Management as a Service"
readme = {file = "README.rst", content-type = "text/x-rst"}
license = {text = "Apache-2.0"}
requires-python = ">=3.10"
authors = [
]
classifiers = [
"Environment :: OpenStack",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = ["version", "dependencies"]
[project.urls]
"Bug Tracker" = "https://bugs.launchpad.net/cyborg/"
"Documentation" = "https://docs.openstack.org/cyborg/latest/"
"Source Code" = "https://opendev.org/openstack/cyborg"
[project.scripts]
cyborg-api = "cyborg.cmd.api:main"
cyborg-conductor = "cyborg.cmd.conductor:main"
cyborg-dbsync = "cyborg.cmd.dbsync:main"
cyborg-agent = "cyborg.cmd.agent:main"
cyborg-status = "cyborg.cmd.status:main"
[project.entry-points."oslo.policy.policies"]
"cyborg.api" = "cyborg.policies:list_policies"
[project.entry-points."oslo.config.opts"]
cyborg = "cyborg.conf.opts:list_opts"
[project.entry-points."cyborg.database.migration_backend"]
sqlalchemy = "cyborg.db.sqlalchemy.migration"
[project.entry-points."cyborg.accelerator.driver"]
intel_fpga_driver = "cyborg.accelerator.drivers.fpga.intel.driver:IntelFPGADriver"
inspur_fpga_driver = "cyborg.accelerator.drivers.fpga.inspur.driver:InspurFPGADriver"
xilinx_fpga_driver = "cyborg.accelerator.drivers.fpga.xilinx.driver:XilinxFPGADriver"
nvmf_spdk_driver = "cyborg.accelerator.drivers.spdk.nvmf.nvmf:NVMFDRIVER"
nvidia_gpu_driver = "cyborg.accelerator.drivers.gpu.nvidia.driver:NVIDIAGPUDriver"
fake_driver = "cyborg.accelerator.drivers.fake:FakeDriver"
huawei_ascend_driver = "cyborg.accelerator.drivers.aichip.huawei.ascend:AscendDriver"
intel_qat_driver = "cyborg.accelerator.drivers.qat.intel.driver:IntelQATDriver"
intel_nic_driver = "cyborg.accelerator.drivers.nic.intel.driver:IntelNICDriver"
inspur_nvme_ssd_driver = "cyborg.accelerator.drivers.ssd.inspur.driver:InspurNVMeSSDDriver"
pci_driver = "cyborg.accelerator.drivers.pci.pci.driver:PCIDriver"
[tool.setuptools]
packages = ["cyborg"]
# NOTE: data-files is deprecated by setuptools in favour of package_data,
# but package_data installs files inside the Python package tree and is not
# a suitable replacement for operator-facing configuration files that must
# be installed to system paths (e.g. /etc/cyborg/). These two files are
# required at runtime by PasteDeploy (api-paste.ini) and oslo.policy
# (policy.yaml), so we keep data-files as the only available mechanism for
# this use case. Distribution packages (deb/rpm) typically override this
# location via their own packaging rules.
[tool.setuptools.data-files]
"etc/cyborg" = ["etc/cyborg/policy.yaml", "etc/cyborg/api-paste.ini"]
[tool.ruff]
line-length = 79
target-version = "py310"
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "G", "I", "LOG", "S", "UP", "W", "C90"]
external = ["H"]
ignore = [
# asserts used for type narrowing only
"S101",
# S104 Possible binding to all interfaces
"S104",
# S105/S106 Possible hardcoded password
"S105",
"S106",
# S110 try-except-pass — logged elsewhere
"S110",
# UP031 % format — defer f-string migration to a later pass
"UP031",
# UP032 f-string — defer migration to a later pass
"UP032",
]
[tool.ruff.lint.per-file-ignores]
"cyborg/tests/*" = ["S"]
[tool.ruff.lint.isort]
known-first-party = ["cyborg"]
force-single-line = true
lines-after-imports = 2
lines-between-types = 1
section-order = ["future", "standard-library", "third-party", "first-party"]
# this is the default but just being explicit about the behavior
# in case that ever changes.
force-sort-within-sections = false
[tool.ruff.lint.mccabe]
max-complexity = 20
[tool.ruff.format]
quote-style = "preserve"
docstring-code-format = true