-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
164 lines (144 loc) · 4.66 KB
/
Copy pathpyproject.toml
File metadata and controls
164 lines (144 loc) · 4.66 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
[build-system]
requires = ["uv_build>=0.9.13,<0.12.0"]
build-backend = "uv_build"
[project]
name = "naampy"
version = "0.9.0"
description = "Infer Gender from Indian Names"
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
authors = [
{ name = "Gaurav Sood", email = "gsood07@gmail.com" },
{ name = "Suriyan Laohaprapanon", email = "suriyant@gmail.com" },
{ name = "Rajashekar Chintalapati", email = "rajshekar.ch@gmail.com" }
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities"
]
keywords = ["gender", "names"]
dependencies = [
"torch>=2.0.0",
"numpy>=1.21.0",
"pandas>=2.0.0",
"requests>=2.25.0",
"tqdm>=4.60.0",
]
license-files = ["LICENSE"]
[dependency-groups]
dev = ["pytest>=7.0", "pytest-cov>=4.0", "pytest-xdist>=3.0", "ruff>=0.7.0", "types-requests>=2.25.0", "types-tqdm>=4.0", "pandas-stubs>=2.0", "pre-commit>=3.0", "pydoclint>=0.8.0", "pyright>=1.1.390"]
test = [
"pytest>=7.0",
"pytest-cov>=4.0",
"pytest-xdist>=3.0",
]
docs = [
"sphinx>=8",
"furo",
"myst-parser",
"myst-nb>=1.1.0",
"sphinx-autodoc-typehints>=1.25",
"sphinx-copybutton",
"ipykernel>=6.0.0",
"jupytext>=1.15.0",
"py-canon @ git+https://github.com/gojiplus/py-canon@v1",
]
[project.urls]
Homepage = "https://github.com/appeler/naampy"
Documentation = "https://appeler.github.io/naampy/"
Repository = "https://github.com/appeler/naampy"
Issues = "https://github.com/appeler/naampy/issues"
Changelog = "https://github.com/appeler/naampy/blob/master/CHANGELOG.md"
[project.scripts]
in_rolls_fn_gender = "naampy.in_rolls_fn:main"
[tool.uv.build-backend]
module-name = "naampy"
module-root = ""
# Ruff configuration
[tool.ruff]
line-length = 88
target-version = "py311"
# Restored from the pre-adopt config: exploratory/training scripts, the
# Streamlit demo, and notebooks are not part of the shipped package and were
# intentionally out of lint scope (mirrors [tool.deptry] extend_exclude below).
exclude = [
"docs",
"model_training",
"streamlit",
"naampy/data",
"*.ipynb",
]
[tool.ruff.lint]
external = ["DOC"]
select = ["E", "W", "F", "I", "B", "C4", "UP", "N", "D", "S", "SIM", "T20", "PT", "RUF"]
ignore = ["D203", "D213", "B008", "C901", "E501"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
# Tests are written against unittest.TestCase (self.assertX); PT rules push
# toward bare `assert`, which would mean rewriting every assertion in the
# suite for a style choice, not a bug. S101 (assert) doesn't apply to
# unittest-style tests either way, but is excluded for consistency.
"tests/**" = ["S101", "S110", "D", "PT"]
# load_naampy_data/main() print user-facing progress and CLI output
# (download/cache status, argparse echo, "saving output to" messages).
"naampy/in_rolls_fn.py" = ["T201"]
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = "test_*.py"
addopts = [
"-ra",
"--strict-markers",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
filterwarnings = ["error"]
# Coverage configuration (optional)
# To run with coverage: pytest --cov=naampy --cov-report=term-missing --cov-report=html
[tool.uv]
required-environments = [
"sys_platform == 'win32' and platform_machine == 'AMD64'",
"sys_platform == 'darwin' and platform_machine == 'arm64'",
"sys_platform == 'linux' and platform_machine == 'x86_64'",
"sys_platform == 'linux' and platform_machine == 'aarch64'"
]
[tool.coverage.run]
source = ["naampy"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
# mypy configuration
[tool.deptry]
# Ignore docs dependencies that are actually used in conf.py but not detected
per_rule_ignores = {DEP002 = ["sphinx", "furo", "sphinx-autodoc-typehints", "sphinx-copybutton", "myst-parser"]}
# Exclude everything except docs, tests, and naampy source
extend_exclude = ["model_training", "streamlit", ".*\\.ipynb$"]
# pydoclint configuration
[tool.pydoclint]
style = "google"
arg-type-hints-in-docstring = false
check-return-types = false
check-class-attributes = false
allow-init-docstring = true
exclude = '\.venv|tests|docs'
[tool.pyright]
include = ["naampy"]
typeCheckingMode = "standard"