[build-system] # Minimum requirements for the build system to execute. requires = [ "setuptools>=47.2.0", "wheel", "setuptools_scm[toml]", ] build-backend = "setuptools.build_meta" [project] name = "labgrid" authors = [ { name="Rouven Czerwinski", email="entwicklung@pengutronix.de" }, { name="Jan Luebbe", email="entwicklung@pengutronix.de" }, ] description = "embedded systems control library for development, testing and installation" readme = "README.rst" license = { file="LICENSE" } requires-python = ">=3.10" classifiers = [ "Intended Audience :: Developers", "Development Status :: 5 - Production/Stable", "Operating System :: POSIX :: Linux", "Topic :: Software Development :: Testing", "Framework :: Pytest", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", ] dependencies = [ "attrs>=21.4.0", "exceptiongroup>=1.3.0", # TODO: drop if Python >= 3.11 guaranteed "grpcio>=1.64.1, <2.0.0", "grpcio-reflection>=1.64.1, <2.0.0", "protobuf>=5.27.0", "jinja2>=3.0.2", "pexpect>=4.8.0", "pyserial-labgrid>=3.4.0.1", "pytest>=7.0.0", "pyudev>=0.24.4", "pyusb>=1.2.1", "PyYAML>=6.0.1", "requests>=2.26.0", "xmodem>=0.4.6", ] dynamic = ["version"] # via setuptools_scm [project.urls] "Homepage" = "https://github.com/labgrid-project/labgrid" "Bug Tracker" = "https://github.com/labgrid-project/labgrid/issues" [project.optional-dependencies] doc = [ "sphinx_rtd_theme>=1.0.0", "Sphinx>=2.0.0,<9.0.0", "sphinxcontrib-autoprogram>=0.1.9", ] docker = ["docker>=5.0.2"] graph = ["graphviz>=0.17.0"] kasa = ["python-kasa>=0.7.0"] laa = ["laam"] modbus = ["pyModbusTCP>=0.2.0"] modbusrtu = ["minimalmodbus>=1.0.2"] mqtt = ["paho-mqtt>=2.0.0"] netgear = ["py-netgear-plus>=0.4.7"] onewire = ["onewire>=0.2"] pyvisa = [ "pyvisa>=1.11.3", "PyVISA-py>=0.5.2", ] snmp = [ "pysnmp>=4.4.12, <6", "pyasn1<0.6.1", ] vxi11 = ["python-vxi11>=0.9"] xena = ["xenavalkyrie>=3.0.1"] deb = ["labgrid[modbus,onewire,snmp]"] dev = [ "labgrid[doc,docker,graph,kasa,modbus,modbusrtu,mqtt,netgear,onewire,pyvisa,snmp,vxi11]", # additional dev dependencies "psutil>=5.8.0", "pytest-benchmark>=4.0.0", "pytest-cov>=3.0.0", "pytest-dependency>=0.5.1", "pytest-isort>=2.0.0", "pytest-mock>=3.6.1", "pylint>=3.0.0", "ruff>=0.5.7", "pystuck", # GRPC Channelz support "grpcio-channelz>=1.64.1, <2.0.0", ] [project.scripts] labgrid-autoinstall = "labgrid.autoinstall.main:main" labgrid-client = "labgrid.remote.client:main" labgrid-exporter = "labgrid.remote.exporter:main" labgrid-suggest = "labgrid.resource.suggest:main" labgrid-coordinator = "labgrid.remote.coordinator:main" labgrid-tap-fwd = "labgrid.tapfwd:main" # the following makes a plugin available to pytest [project.entry-points.pytest11] labgrid = "labgrid.pytestplugin" [tool.setuptools] packages = [ "labgrid", "labgrid.autoinstall", "labgrid.driver", "labgrid.driver.power", "labgrid.driver.usbtmc", "labgrid.protocol", "labgrid.pytestplugin", "labgrid.remote", "labgrid.remote.generated", "labgrid.resource", "labgrid.strategy", "labgrid.util", "labgrid.util.agents", ] [tool.setuptools_scm] local_scheme = "no-local-version" version_file = "labgrid/_version.py" [tool.pytest.ini_options] testpaths = [ "tests", "labgrid", ] addopts = "-p no:labgrid --ignore-glob=tests/test_client* --ignore-glob=tests/test_barebox* --verbosity=5" [tool.pylint.imports] ignored-modules = ["gi"] [tool.pylint."messages control"] # disable all, then enable explicitly disable = ["all"] enable = [ "F", # all checks from fatal category "E", # all checks from error category # warning checks (sorted alphabetically) 'deprecated-argument', 'deprecated-class', 'deprecated-decorator', 'deprecated-method', 'deprecated-module', 'duplicate-key', 'expression-not-assigned', 'f-string-without-interpolation', 'import-self', 'keyword-arg-before-vararg', 'logging-format-interpolation', 'logging-fstring-interpolation', 'logging-not-lazy', 'pointless-statement', 'pointless-string-statement', 'redefined-builtin', 'redefined-outer-name', 'reimported', 'unknown-option-value', 'unnecessary-semicolon', 'unreachable', 'unused-import', 'unused-variable', 'useless-else-on-loop', 'using-constant-test', 'wildcard-import', # convention checks (sorted alphabetically) "wrong-import-order", # refactor checks (sorted alphabetically) "redefined-argument-from-local", ] [tool.pylint.typecheck] generated-members = [ "labgrid.driver.*", "labgrid.strategy.*", "labgrid_coordinator_pb2", ] signature-mutators = ["labgrid.step.step"] [tool.tox] legacy_tox_ini = """ [tox] envlist = py39, py310, py311, py312, py313, py314 isolated_build = true [testenv] extras = dev passenv = TERM commands = pytest tests {posargs} \ --cov={envsitepackagesdir}/labgrid \ --cov-report=html:htmlcov [testenv:lint] extras = dev commands = pylint -f colorized labgrid """ [tool.ruff] line-length = 119 extend-exclude = [ ".pybuild", "debian", "env", "envs", "labgrid/remote/generated", ] include = [ "**/pyproject.toml", "examples/**/*.py", "labgrid/driver/httpvideodriver.py", "labgrid/driver/manualswitchdriver.py", "labgrid/driver/power/gude8031.py", "labgrid/driver/power/pe6216.py", "labgrid/driver/power/poe_netgear_plus.py", "labgrid/driver/power/shelly_gen2.py", "labgrid/driver/rawnetworkinterfacedriver.py", "labgrid/protocol/**/*.py", "labgrid/remote/**/*.py", "labgrid/resource/httpvideostream.py", "labgrid/resource/provider.py", "labgrid/util/agents/network_interface.py", "labgrid/util/agents/usb_hid_relay.py", "labgrid/util/exceptions.py", "labgrid/util/netns.py", "labgrid/tapfwd.py", "tests/test_netns.py", ] [tool.ruff.lint] select = ["B", "E", "F", "I", "SIM", "UP"]