Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
171 lines (153 loc) · 4.21 KB
/
Copy pathpyproject.toml
File metadata and controls
171 lines (153 loc) · 4.21 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mela-parser"
version = "0.1.0"
description = "Extract recipes from EPUB cookbooks to Mela format"
readme = "README.md"
requires-python = ">=3.13"
license = {text = "MIT"}
authors = [
{name = "gwhthompson"}
]
keywords = ["recipe", "epub", "parser", "mela", "cookbook"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Markup",
"Typing :: Typed",
]
dependencies = [
"beautifulsoup4>=4.13.4",
"ebooklib>=0.18",
"html2text>=2024.2.26",
"markitdown[all]>=0.1.3",
"openai>=1.66.3",
"pillow>=11.1.0",
"rich>=13.9.0",
]
[project.urls]
Homepage = "https://github.com/gwhthompson/mela_parser"
Repository = "https://github.com/gwhthompson/mela_parser.git"
Issues = "https://github.com/gwhthompson/mela_parser/issues"
Documentation = "https://github.com/gwhthompson/mela_parser#readme"
[project.optional-dependencies]
dev = [
"bandit>=1.8.0",
"basedpyright>=1.24.0",
"pip-audit>=2.7.0",
"pre-commit>=4.0.0",
"pytest>=8.3.5",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"ruff>=0.11.6",
]
[project.scripts]
mela-parse = "mela_parser.cli:main"
[tool.hatch.build.targets.wheel]
packages = ["src/mela_parser"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
[tool.ruff]
line-length = 100
target-version = "py313"
src = ["src", "tests"]
exclude = ["debug"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # Pyflakes
"I", # isort
"N", # pep8-naming
"W", # pycodestyle warnings
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"D", # pydocstyle
"ANN", # flake8-annotations
"PT", # flake8-pytest-style
"RUF", # Ruff-specific rules
]
ignore = [
"D104", # Missing docstring in public package (__init__.py)
"D107", # Missing docstring in __init__ methods
"ANN401", # Dynamically typed expressions (Any) - needed for third-party lib interop
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"E501", # Allow longer lines in tests
"D", # Don't require docstrings in tests
"ANN", # Don't require type annotations in tests
]
[tool.basedpyright]
include = ["src", "tests"]
exclude = [
"**/__pycache__",
".venv",
"debug",
"output",
"examples",
"dist",
"build"
]
typeCheckingMode = "strict"
pythonVersion = "3.13"
# External libraries without type stubs (ebooklib, markitdown)
reportMissingTypeStubs = false
# Source code should be strictly typed, but tests use mocking extensively
# which creates false positives. Configure per-path strictness:
[[tool.basedpyright.executionEnvironments]]
root = "src"
reportUnknownMemberType = true
reportUnknownArgumentType = true
reportUnknownVariableType = true
reportUnknownParameterType = true
[[tool.basedpyright.executionEnvironments]]
root = "tests"
reportUnknownMemberType = false
reportUnknownArgumentType = false
reportUnknownVariableType = false
reportUnknownParameterType = false
reportUnknownLambdaType = false
reportMissingParameterType = false
reportPrivateUsage = false
reportMissingTypeArgument = false
reportUnusedFunction = false
reportUnnecessaryComparison = false
[tool.coverage.run]
source = ["src"]
omit = ["tests/*", "**/__pycache__/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod"
]
precision = 2
show_missing = true
fail_under = 70
[tool.coverage.html]
directory = "htmlcov"
[dependency-groups]
dev = [
"pytest-httpx>=0.36.0",
]