-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
100 lines (87 loc) · 2.65 KB
/
pyproject.toml
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
[build-system]
requires = [
"setuptools",
"wheel",
]
[tool.ruff]
line-length = 120
# Enable Pyflakes `E` and `F` codes by default.
select = [
"E", "W", # see: https://pypi.org/project/pycodestyle
"F", # see: https://pypi.org/project/pyflakes
]
ignore = [
"E731", # Do not assign a lambda expression, use a def
]
# Exclude a variety of commonly ignored directories.
exclude = [
".git",
"docs",
".tox",
"*.egg",
"build",
"temp",
]
ignore-init-module-imports = true
output-format = "pylint"
[tool.ruff.per-file-ignores]
"src/fts_examples/ipynb_src/fts_superglue_nb.py" = ["E501","F401","F821"]
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.isort]
known-first-party = ["docs","fts_examples","finetuning_scheduler","tests"]
force-sort-within-sections = false
order-by-type = false
[tool.mypy]
files = ["src/finetuning_scheduler"]
disallow_untyped_defs = "True"
ignore_missing_imports = "True"
show_error_codes = "True"
warn_redundant_casts = "True"
warn_unused_configs = "True"
warn_unused_ignores = "False"
allow_redefinition = "True"
# disable this rule as the PL Trainer attributes are defined in the connectors, not in its __init__
disable_error_code = "attr-defined"
# style choices
warn_no_return = "False"
exclude = ['tests/.*']
# Ignore mypy errors for these files
# TODO: the goal is for this to be empty
#[[tool.mypy.overrides]]
# the list can be generated with:
# mypy | tr ':' ' ' | awk '{print $1}' | sort | uniq | sed 's/\.py//g' | sed 's|\/|\.|g' | xargs -I {} echo '"{}",'
# module = []
# ignore_errors = "True"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"warnings",
"pass",
"rank_zero_warn",
"raise NotImplementedError",
"except Exception"
]
[tool.pytest.ini_options]
pythonpath = "tests"
norecursedirs = [
".git",
".github",
"dist",
"build",
"docs",
]
# two sets of default options to allow periodic warnings pruning
################################################################
addopts = """--strict-markers --doctest-modules --color=yes --ignore-glob='src/fts_examples/ipynb_src/*.py'
--ignore='.actions/assistant.py' --disable-pytest-warnings""" # comment during warnings pruning, otherwise uncomment
# addopts = """--strict-markers --doctest-modules --color=yes --ignore-glob='src/fts_examples/ipynb_src/*.py'
# --ignore='.actions/assistant.py'""" # uncomment during warnings pruning, otherwise comment
################################################################
junit_duration_report = "call"
[tool.jupytext]
notebook_metadata_filter = "-all"
[tool.jupytext.formats]
"notebooks/" = "ipynb"
"scripts/" = "py"