generated from Parici75/python-poetry-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpyproject.toml
136 lines (122 loc) · 3.54 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[tool.poetry]
name = "homr"
version = "0.1.0"
description = "End-to-end Optical Music Recognition (OMR) system build on top of vision transformers."
authors = ["Christian Liebhardt <[email protected]>"]
license = "AGPL-3.0"
readme = "README.md"
homepage = "https://github.com/liebharc"
documentation = "https://github.com/liebharc/homr"
[tool.poetry.dependencies]
python = "^3.10"
numpy = "^1.26.4"
tensorflow = "^2.15.1"
opencv-python-headless = "^4.9.0.80"
Pillow = "^10.0.0"
types-Pillow = "^10.1.0.1"
scipy = "^1.11.2"
types-tensorflow = "^2.12.0.10"
torch = "^2.2.1"
typing_extensions = "^4.5.0"
transformers = "^4.39.1"
x-transformers = "^1.27.19"
musicxml = "^1.4"
easyocr = "^1.7.1"
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.2"
mypy = "^1.8.0"
black = "^24.2.0"
ruff = "^0.3.5"
isort = "^5.13.2"
pyupgrade = "^3.15.1"
pre-commit = "^3.6.2"
pyclean = "^2.7.3"
coverage = "^7.4.4"
augly = "^1.0.0"
albumentations = "^1.4.0"
timm = "^0.9.16"
editdistance = "^0.8.1"
torchvision = "^0.17.1"
transformers = {extras = ["torch"], version = "^4.40.2"}
cairosvg = "^2.7.1"
[tool.poetry.group.docs]
[tool.poetry.group.docs.dependencies]
sphinx = "^7.2.6"
furo = "^2023.5.20"
myst-parser = "^2.0.0"
myst-nb = "^1.1.0"
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
pattern = "^v(?P<base>\\d+\\.\\d+\\.\\d+)(-?((?P<stage>[a-zA-Z]+)\\.?(?P<revision>\\d+)?))?"
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
## Tools
[tool.black]
target-version = ['py311']
line-length = 100
preview = true
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"C", # flake8-comprehensions
"B", # flake8-bugbear
"S", # flake8-bandit
"A", # flake8-builtins
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"PL", # pylint
"TID252", # flake8-tidy-imports
"T201", # no-print
]
ignore = [
"UP015", # Unnecessary open mode parameters
"PLC1901", # compare-to-empty-string
"PLR0913", # Too many arguments to function call
"S311", # pseudo-random generators are not suitable for cryptographic purposes - we use them to randomize training data
"S105", # we use the term "token" for transformer tokens which sometimes triggers false positives of this warning
"UP035", # mypy doesn't seem to support "from typing import Self" yet
]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.isort]
profile = "black"
sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
[tool.mypy]
python_version = "3.10"
exclude = ["datasets"]
cache_dir = ".mypy_cache/strict"
show_error_codes = true
show_column_numbers = true
# Strict guidelines taken from https://github.com/pytorch/pytorch/blob/master/mypy-strict.ini
# Across versions of mypy, the flags toggled by --strict vary. To ensure
# we have reproducible type check, we instead manually specify the flags
follow_imports = "normal"
warn_no_return = true
warn_return_any = true
disallow_any_unimported = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
warn_redundant_casts = true
warn_unused_ignores = true
implicit_reexport = false
strict_equality = true
[tool.pytest.ini_options]
log_cli = true
log_cli_level = 10
testpaths = ["tests"]
[tool.poetry.scripts]
homr = "homr.main:main"