blob: 2f001cd50e1ead09eb4993bb32196c77ec10db12 [file] [log] [blame]
# Reference at https://peps.python.org/pep-0621/
[build-system]
requires = ["setuptools", "setuptools-scm[toml]"]
build-backend = "setuptools.build_meta"
[project]
name = "antlion"
description = "Host-driven, hardware-agnostic Fuchsia connectivity tests"
requires-python = ">=3.8"
license = { text = "Apache-2.0" }
dynamic = ["version"]
readme = "README.md"
dependencies = ["mobly==1.12.2", "pyyaml>=5.1", "tenacity~=8.0"]
[project.optional-dependencies]
# Required to support development tools
dev = [
"autoflake~=2.1", # remove unused code
"black~=23.3", # code formatting
"isort~=5.12", # import sorting
"mock~=5.0", # required for unit tests
"mypy~=1.8", # static type checking
"shiv~=1.0", # packaging python
"toml==0.10.2", # required for pyproject.toml
"vulture~=2.11", # finds unused code
# Library stubs for type checking
"types-PyYAML~=6.0",
"types-mock~=5.0",
"types-psutil~=5.9",
]
digital_loggers_pdu = ["dlipower"]
html_graphing = ["bokeh"]
flash = ["usbinfo"]
mdns = ["psutil", "zeroconf"]
android = ["numpy", "scapy"]
[tool.setuptools.packages.find]
where = ["packages"]
[tool.autoflake]
imports = [
"antlion",
"dataclasses",
"dlipower",
"mobly",
"mock",
"numpy",
"scapy",
"tenacity",
"usbinfo",
"zeroconf",
]
[tool.isort]
profile = "black"
known_local_folder = ["antlion"]
[tool.mypy]
mypy_path = "stubs, $FUCHSIA_DIR/src/testing/end_to_end/honeydew"
python_version = "3.11"
#
# Disallow dynamic typing
#
#disallow_any_unimported = true
#disallow_any_expr = true
#disallow_any_decorated = true
#disallow_any_explicit = true
#disallow_any_generics = true
disallow_subclassing_any = true
#
# Untyped definitions and calls
#
#disallow_untyped_calls = true
#disallow_untyped_defs = true
#disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
#
# Configuring warnings
#
warn_redundant_casts = true
#warn_unused_ignores = true
warn_no_return = true
#warn_return_any = true
#warn_unreachable = true
#
# Miscellaneous strictness flags
#
strict_equality = true
exclude = [
# TODO(http://b/285950835): Fix typing of relevant Fuchsia-related utilities and
# tests
"packages/antlion/unit_tests/",
"tests/netstack/NetstackIfaceTest.py",
"tests/wlan/functional/DownloadStressTest.py",
"tests/wlan/functional/WlanWirelessNetworkManagementTest.py",
"tests/wlan/performance/WlanWmmTest.py",
# TODO(http://b/274619290): Remove the following files when the migration from ACTS
# to Mobly is complete.
"packages/antlion/base_test.py",
"packages/antlion/config_parser.py",
"packages/antlion/context.py",
"packages/antlion/logger.py",
"packages/antlion/records.py",
"packages/antlion/test_decorators.py",
"packages/antlion/test_runner.py",
"packages/antlion/libs/yaml_writer.py",
# TODO(http://b/285950976): Fix typing of non-Fuchsia related controllers and test
# utilities, or remove if no longer relevant.
"packages/antlion/controllers/adb.py",
"packages/antlion/controllers/android_device.py",
"packages/antlion/controllers/android_lib/tel/tel_utils.py",
"packages/antlion/controllers/attenuator_lib/_tnhelper.py",
"packages/antlion/controllers/attenuator_lib/minicircuits/http.py",
"packages/antlion/controllers/iperf_server.py",
"packages/antlion/controllers/packet_sender.py",
"packages/antlion/controllers/pdu_lib/digital_loggers/webpowerswitch.py",
"packages/antlion/controllers/sl4a_lib/event_dispatcher.py",
"packages/antlion/controllers/sl4a_lib/rpc_client.py",
"packages/antlion/controllers/sl4a_lib/sl4a_manager.py",
"packages/antlion/controllers/sniffer_lib/local/tcpdump.py",
"packages/antlion/controllers/sniffer_lib/local/tshark.py",
"packages/antlion/controllers/utils_lib/commands/route.py",
"packages/antlion/libs/logging/log_stream.py",
"packages/antlion/libs/ota/ota_runners/ota_runner_factory.py",
"packages/antlion/libs/ota/ota_tools/ota_tool_factory.py",
"packages/antlion/libs/proc/job.py",
"packages/antlion/libs/proc/process.py",
"packages/antlion/test_utils/net/net_test_utils.py",
"packages/antlion/utils.py",
"setup.py",
"stubs/mobly/",
]
[tool.vulture]
paths = ["packages", "tests"]
sort_by_size = true
min_confidence = 80