2019-04-03 17:17:55 +00:00
|
|
|
[build-system]
|
|
|
|
requires = [
|
|
|
|
"setuptools",
|
|
|
|
"wheel",
|
|
|
|
]
|
2020-02-23 02:45:34 +00:00
|
|
|
|
2021-07-13 06:23:36 +00:00
|
|
|
|
2020-11-13 21:57:46 +00:00
|
|
|
[tool.isort]
|
|
|
|
known_first_party = [
|
|
|
|
"pl_examples",
|
|
|
|
"pytorch_lightning",
|
2023-01-04 15:57:18 +00:00
|
|
|
"lightning_fabric",
|
2022-06-15 22:10:49 +00:00
|
|
|
"tests_pytorch",
|
2020-11-13 21:57:46 +00:00
|
|
|
]
|
2021-02-03 20:21:19 +00:00
|
|
|
profile = "black"
|
2020-11-13 21:57:46 +00:00
|
|
|
line_length = 120
|
2021-01-03 22:13:22 +00:00
|
|
|
force_sort_within_sections = "False"
|
2020-12-16 06:09:26 +00:00
|
|
|
order_by_type = "False"
|
2022-07-27 09:02:58 +00:00
|
|
|
skip = ["_notebooks"]
|
2021-07-13 06:23:36 +00:00
|
|
|
|
|
|
|
|
2021-07-26 11:37:35 +00:00
|
|
|
[tool.black]
|
|
|
|
line-length = 120
|
2022-07-27 09:02:58 +00:00
|
|
|
exclude = '(_notebooks/.*)'
|
2021-07-26 11:37:35 +00:00
|
|
|
|
|
|
|
|
2021-07-13 06:23:36 +00:00
|
|
|
[tool.mypy]
|
2022-07-11 21:46:52 +00:00
|
|
|
files = [
|
|
|
|
"src/pytorch_lightning",
|
2023-01-04 15:57:18 +00:00
|
|
|
"src/lightning_fabric",
|
2022-10-13 14:46:40 +00:00
|
|
|
"src/lightning_app",
|
2022-09-20 17:23:48 +00:00
|
|
|
]
|
2022-12-08 18:36:16 +00:00
|
|
|
# This section is for folders with "-" as they are not valid python modules
|
2022-09-20 17:23:48 +00:00
|
|
|
exclude = [
|
2022-12-08 18:36:16 +00:00
|
|
|
"src/lightning_app/cli/app-template",
|
2022-10-13 14:46:40 +00:00
|
|
|
"src/lightning_app/cli/component-template",
|
|
|
|
"src/lightning_app/cli/pl-app-template",
|
2022-09-20 17:23:48 +00:00
|
|
|
"src/lightning_app/cli/react-ui-template",
|
2022-07-11 21:46:52 +00:00
|
|
|
]
|
|
|
|
install_types = "True"
|
|
|
|
non_interactive = "True"
|
2021-07-13 06:23:36 +00:00
|
|
|
disallow_untyped_defs = "True"
|
|
|
|
ignore_missing_imports = "True"
|
|
|
|
show_error_codes = "True"
|
|
|
|
warn_redundant_casts = "True"
|
|
|
|
warn_unused_configs = "True"
|
|
|
|
warn_unused_ignores = "True"
|
|
|
|
allow_redefinition = "True"
|
|
|
|
# disable this rule as the Trainer attributes are defined in the connectors, not in its __init__
|
|
|
|
disable_error_code = "attr-defined"
|
2021-08-26 08:36:21 +00:00
|
|
|
# style choices
|
|
|
|
warn_no_return = "False"
|
2021-07-13 06:23:36 +00:00
|
|
|
|
2021-11-26 20:14:11 +00:00
|
|
|
# Ignore mypy errors for these files
|
2021-11-25 10:27:13 +00:00
|
|
|
# TODO: the goal is for this to be empty
|
2021-07-13 06:23:36 +00:00
|
|
|
[[tool.mypy.overrides]]
|
2021-11-25 10:27:13 +00:00
|
|
|
# the list can be generated with:
|
2022-07-13 21:15:28 +00:00
|
|
|
# mypy --no-error-summary 2>&1 | tr ':' ' ' | awk '{print $1}' | sort | uniq | sed 's/\.py//g; s|src/||g; s|\/|\.|g' | xargs -I {} echo '"{}",'
|
2021-07-13 06:23:36 +00:00
|
|
|
module = [
|
2022-11-08 12:55:31 +00:00
|
|
|
"lightning_app.components.multi_node.lite",
|
|
|
|
"lightning_app.components.multi_node.base",
|
|
|
|
"lightning_app.components.multi_node.pytorch_spawn",
|
2022-11-10 15:19:18 +00:00
|
|
|
"lightning_app.components.multi_node.trainer",
|
2022-09-20 17:23:48 +00:00
|
|
|
"lightning_app.api.http_methods",
|
|
|
|
"lightning_app.api.request_types",
|
|
|
|
"lightning_app.cli.commands.app_commands",
|
|
|
|
"lightning_app.cli.commands.connection",
|
2022-12-08 18:36:16 +00:00
|
|
|
"lightning_app.cli.commands.lightning_cli",
|
|
|
|
"lightning_app.cli.commands.cmd_install",
|
|
|
|
"lightning_app.cli.cmd_install",
|
2022-10-28 13:57:35 +00:00
|
|
|
"lightning_app.components.database.client",
|
|
|
|
"lightning_app.components.database.server",
|
|
|
|
"lightning_app.components.database.utilities",
|
2022-09-20 17:23:48 +00:00
|
|
|
"lightning_app.components.python.popen",
|
|
|
|
"lightning_app.components.python.tracer",
|
2023-01-14 13:00:37 +00:00
|
|
|
"lightning_app.components.serve.gradio_server",
|
2022-09-20 17:23:48 +00:00
|
|
|
"lightning_app.components.serve.serve",
|
2022-10-28 20:33:53 +00:00
|
|
|
"lightning_app.components.serve.streamlit",
|
2022-09-20 17:23:48 +00:00
|
|
|
"lightning_app.components.serve.types.image",
|
|
|
|
"lightning_app.components.serve.types.type",
|
2022-11-10 21:38:38 +00:00
|
|
|
"lightning_app.components.serve.python_server",
|
2022-12-19 10:25:24 +00:00
|
|
|
"lightning_app.components.serve.auto_scaler",
|
2022-09-20 17:23:48 +00:00
|
|
|
"lightning_app.components.training",
|
|
|
|
"lightning_app.core.api",
|
|
|
|
"lightning_app.core.app",
|
|
|
|
"lightning_app.core.flow",
|
|
|
|
"lightning_app.core.queues",
|
|
|
|
"lightning_app.core.work",
|
|
|
|
"lightning_app.frontend.panel.app_state_comm",
|
|
|
|
"lightning_app.frontend.panel.app_state_watcher",
|
|
|
|
"lightning_app.frontend.panel.panel_frontend",
|
|
|
|
"lightning_app.frontend.panel.panel_serve_render_fn",
|
|
|
|
"lightning_app.frontend.stream_lit",
|
|
|
|
"lightning_app.frontend.streamlit_base",
|
|
|
|
"lightning_app.frontend.utils",
|
|
|
|
"lightning_app.frontend.web",
|
2022-12-08 13:58:57 +00:00
|
|
|
"lightning_app.perf.pdb",
|
2022-09-20 17:23:48 +00:00
|
|
|
"lightning_app.runners.backends.__init__",
|
|
|
|
"lightning_app.runners.backends.backend",
|
|
|
|
"lightning_app.runners.backends.cloud",
|
|
|
|
"lightning_app.runners.backends.docker",
|
|
|
|
"lightning_app.runners.backends.mp_process",
|
|
|
|
"lightning_app.runners.cloud",
|
|
|
|
"lightning_app.runners.multiprocess",
|
|
|
|
"lightning_app.runners.runtime",
|
|
|
|
"lightning_app.source_code.copytree",
|
|
|
|
"lightning_app.source_code.hashing",
|
|
|
|
"lightning_app.source_code.local",
|
|
|
|
"lightning_app.source_code.tar",
|
|
|
|
"lightning_app.source_code.uploader",
|
|
|
|
"lightning_app.storage.copier",
|
|
|
|
"lightning_app.storage.drive",
|
|
|
|
"lightning_app.storage.orchestrator",
|
|
|
|
"lightning_app.storage.path",
|
|
|
|
"lightning_app.storage.payload",
|
|
|
|
"lightning_app.structures.dict",
|
|
|
|
"lightning_app.structures.list",
|
|
|
|
"lightning_app.testing.helpers",
|
|
|
|
"lightning_app.testing.testing",
|
|
|
|
"lightning_app.utilities.app_helpers",
|
|
|
|
"lightning_app.utilities.app_logs",
|
|
|
|
"lightning_app.utilities.cli_helpers",
|
|
|
|
"lightning_app.utilities.cloud",
|
|
|
|
"lightning_app.utilities.cluster_logs",
|
|
|
|
"lightning_app.utilities.commands.base",
|
|
|
|
"lightning_app.utilities.component",
|
|
|
|
"lightning_app.utilities.enum",
|
|
|
|
"lightning_app.utilities.exceptions",
|
|
|
|
"lightning_app.utilities.git",
|
|
|
|
"lightning_app.utilities.imports",
|
|
|
|
"lightning_app.utilities.introspection",
|
|
|
|
"lightning_app.utilities.layout",
|
|
|
|
"lightning_app.utilities.load_app",
|
|
|
|
"lightning_app.utilities.log_helpers",
|
|
|
|
"lightning_app.utilities.login",
|
|
|
|
"lightning_app.utilities.name_generator",
|
|
|
|
"lightning_app.utilities.network",
|
|
|
|
"lightning_app.utilities.openapi",
|
|
|
|
"lightning_app.utilities.packaging.cloud_compute",
|
|
|
|
"lightning_app.utilities.packaging.docker",
|
|
|
|
"lightning_app.utilities.packaging.lightning_utils",
|
2022-11-24 15:36:37 +00:00
|
|
|
"lightning_app.utilities.port",
|
2022-09-20 17:23:48 +00:00
|
|
|
"lightning_app.utilities.proxies",
|
|
|
|
"lightning_app.utilities.scheduler",
|
|
|
|
"lightning_app.utilities.state",
|
|
|
|
"lightning_app.utilities.tracer",
|
|
|
|
"lightning_app.utilities.tree",
|
2021-07-13 06:23:36 +00:00
|
|
|
]
|
|
|
|
ignore_errors = "True"
|
2023-01-19 11:59:00 +00:00
|
|
|
|
|
|
|
[tool.coverage.report]
|
|
|
|
exclude_lines = [
|
|
|
|
"pragma: no cover",
|
|
|
|
"warnings",
|
|
|
|
"pass",
|
|
|
|
"rank_zero_warn",
|
|
|
|
"raise NotImplementedError",
|
|
|
|
]
|
|
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
|
|
norecursedirs = [
|
|
|
|
".git",
|
|
|
|
".github",
|
|
|
|
"dist",
|
|
|
|
"build",
|
|
|
|
"docs",
|
|
|
|
]
|
|
|
|
addopts = "--strict-markers --doctest-modules --color=yes --disable-pytest-warnings --ignore=legacy/checkpoints"
|
|
|
|
markers = [
|
|
|
|
"cloud:Run the cloud tests for example",
|
|
|
|
]
|
|
|
|
filterwarnings = [
|
|
|
|
"error::FutureWarning",
|
|
|
|
]
|
|
|
|
xfail_strict = true
|
|
|
|
junit_duration_report = "call"
|