[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 = [ {name = "OpenStack", email = "openstack-discuss@lists.openstack.org"}, ] 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.find] # pci-sim/ is an out-of-tree kernel module and must not be packaged in # cyborg wheels or sdists. Restricting auto-discovery to cyborg* ensures # it is excluded from both the wheel and the sdist (pbr.build delegates # to setuptools.build_meta for both). include = ["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"] # pci-sim scripts are system-level test fixtures that intentionally call # subprocess with controlled arguments; suppress the subprocess audit rules. "pci-sim/*" = ["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