-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
181 lines (164 loc) · 4.56 KB
/
Copy pathpyproject.toml
File metadata and controls
181 lines (164 loc) · 4.56 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
172
173
174
175
176
177
178
179
180
181
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "memeplotlib"
version = "0.5.0"
description = "Memes with Python's matplotlib"
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
authors = [
{ name = "Brian Keegan" },
]
keywords = ["meme", "matplotlib", "memegen", "image-macro"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Graphics",
"Framework :: Matplotlib",
]
dependencies = [
"matplotlib>=3.8.0",
"requests>=2.20.0",
"numpy>=1.16.0",
"platformdirs>=2.0.0",
"Pillow>=8.0.0",
]
[project.optional-dependencies]
docs = [
"sphinx>=7.0",
"sphinx-gallery>=0.16.0",
"pydata-sphinx-theme>=0.15",
"numpydoc>=1.7",
"matplotlib>=3.8.0",
]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"pytest-mock>=3.0",
"pytest-mpl>=0.17",
"pytest-httpserver>=1.0",
"pytest-socket>=0.7",
"responses>=0.20.0",
"ruff>=0.5",
"black>=24.0",
"mypy>=1.10",
"numpydoc>=1.7",
"types-requests",
"build>=1.0",
]
mcp = [
"mcp>=1.0",
]
[project.scripts]
memeplotlib = "memeplotlib.__main__:main"
memeplotlib-mcp = "memeplotlib._mcp:main"
[project.urls]
Homepage = "https://github.com/brianckeegan/memeplotlib"
Documentation = "https://brianckeegan.github.io/memeplotlib/"
Repository = "https://github.com/brianckeegan/memeplotlib"
Issues = "https://github.com/brianckeegan/memeplotlib/issues"
[tool.hatch.build.targets.wheel]
packages = ["src/memeplotlib"]
[tool.hatch.build.targets.wheel.force-include]
"src/memeplotlib/fonts/Anton-Regular.ttf" = "memeplotlib/fonts/Anton-Regular.ttf"
"src/memeplotlib/fonts/OFL.txt" = "memeplotlib/fonts/OFL.txt"
[tool.hatch.build.targets.sdist]
include = [
"src/memeplotlib/**",
"tests/**",
"docs/**",
"examples/**",
"README.md",
"LICENSE",
"CHANGELOG.md",
"CLAUDE.md",
"pyproject.toml",
]
exclude = [
"docs/_build/**",
"docs/_build_baseline/**",
"docs/auto_examples/**",
"docs/_internal/**",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
# Skip integration / slow tests by default — they hit the live memegen API.
# Run them explicitly with: `pytest -m 'integration or slow'`.
addopts = "--strict-markers -m 'not integration and not slow'"
markers = [
"slow: marks tests as slow (require network)",
"integration: marks integration tests (require network)",
"mpl_image_compare: pytest-mpl image comparison test",
"allow_network: opt out of the offline-only autouse fixture",
"uses_default_backend: opt out of the legacy matplotlib-backend fixture",
]
[tool.coverage.run]
source = ["memeplotlib"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"\\.\\.\\.",
]
fail_under = 85
show_missing = true
skip_covered = false
[tool.ruff]
target-version = "py310"
line-length = 99
extend-exclude = ["docs/_build", "docs/auto_examples", "docs/_internal"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"NPY", # numpy-specific
]
ignore = [
"E501", # line length, handled by black
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["B011"] # assert False in tests is fine
"docs/conf.py" = ["E402"] # late imports for path setup
[tool.black]
target-version = ["py310", "py311", "py312", "py313"]
line-length = 99
[tool.mypy]
python_version = "3.10"
strict = true
warn_unused_ignores = true
warn_redundant_casts = true
files = ["src/memeplotlib"]
[[tool.mypy.overrides]]
module = ["sphinx_gallery.*", "responses.*", "pytest_httpserver.*"]
ignore_missing_imports = true
[tool.numpydoc_validation]
checks = [
"all",
"EX01", # Don't require Examples section on every function
"SA01", # Don't require See Also section
"ES01", # Don't require extended summary
"GL01", # Allow same-line summaries (matplotlib's convention)
"GL08", # Internal modules don't need module-level docstrings
"SS06", # Allow multi-line summaries when genuinely clearer
]
exclude = [
'\._', # private modules
'\.__init__$',
]