@@ -5,31 +5,111 @@ build-backend = "setuptools.build_meta"
55[project ]
66name = " ocrsmith"
77version = " 0.1.0"
8- description = " A versatile OCR dataset generator for Arabic and Latin text, with synthetic text generation and dataset export ."
8+ description = " Synthetic document and OCR dataset forge for Arabic, Darija and Latin scripts ."
99readme = " README.md"
1010authors = [
1111 { name = " Haitam Bouanane" , email = " bouananehaitam03@gmail.com" }
1212]
1313license = { file = " LICENSE" }
14- keywords = [" OCR" , " synthetic data" , " Arabic OCR" , " dataset generator" ]
15- requires-python = " >=3.11"
14+ keywords = [
15+ " OCR" ,
16+ " synthetic data" ,
17+ " Arabic OCR" ,
18+ " document AI" ,
19+ " dataset generator" ,
20+ " document understanding" ,
21+ ]
22+ classifiers = [
23+ " Development Status :: 4 - Beta" ,
24+ " Intended Audience :: Science/Research" ,
25+ " License :: OSI Approved :: MIT License" ,
26+ " Programming Language :: Python :: 3.10" ,
27+ " Programming Language :: Python :: 3.11" ,
28+ " Programming Language :: Python :: 3.12" ,
29+ " Topic :: Scientific/Engineering :: Artificial Intelligence" ,
30+ " Topic :: Scientific/Engineering :: Image Processing" ,
31+ ]
32+ requires-python = " >=3.10"
1633dependencies = [
17- " pydantic>=2.11.7" ,
18- " PyYAML==6.0.2" ,
19- " pillow==11.3.0" ,
20- " numpy==2.3.1" ,
21- " pandas==2.3.1" ,
22- " datasets==3.6.0"
34+ " pydantic>=2.7" ,
35+ " PyYAML>=6.0" ,
36+ " pillow>=10.0" ,
37+ " numpy>=1.24" ,
38+ " arabic-reshaper>=3.0" ,
39+ " python-bidi>=0.4.2" ,
40+ " typer>=0.12" ,
41+ " rich>=13.0" ,
42+ " tqdm>=4.66" ,
2343]
2444
2545[project .optional-dependencies ]
46+ # Tabular / HuggingFace text sources and dataset export targets.
47+ data = [
48+ " pandas>=2.0" ,
49+ " pyarrow>=14.0" ,
50+ " datasets>=2.19" ,
51+ " huggingface-hub>=0.23" ,
52+ ]
2653dev = [
27- " pytest==8.4.1" ,
28- " pytest-cov==6.2.1"
54+ " pytest>=8.0" ,
55+ " pytest-cov>=5.0" ,
56+ " ruff>=0.5" ,
57+ ]
58+ all = [
59+ " ocrsmith[data,dev]" ,
2960]
3061
62+ [project .urls ]
63+ Homepage = " https://github.com/atlasia-ma/OCRSmith"
64+ Repository = " https://github.com/atlasia-ma/OCRSmith"
65+ Issues = " https://github.com/atlasia-ma/OCRSmith/issues"
66+
3167[project .scripts ]
3268ocrsmith = " ocrsmith.cli:main"
3369
3470[tool .setuptools .packages .find ]
3571where = [" src" ]
72+
73+ [tool .setuptools .package-data ]
74+ ocrsmith = [" config/*.yaml" , " config/presets/*.yaml" ]
75+
76+ [tool .pytest .ini_options ]
77+ minversion = " 8.0"
78+ # Makes `pytest` work straight from a clone, without an editable install.
79+ pythonpath = [" src" ]
80+ testpaths = [" tests" ]
81+ addopts = " -ra --strict-markers"
82+ markers = [
83+ " slow: tests that render many samples or touch the network" ,
84+ " network: tests that require internet access" ,
85+ ]
86+ filterwarnings = [" ignore::DeprecationWarning" ]
87+
88+ [tool .coverage .run ]
89+ branch = true
90+ source = [" src/ocrsmith" ]
91+
92+ [tool .coverage .report ]
93+ exclude_lines = [
94+ " pragma: no cover" ,
95+ " raise NotImplementedError" ,
96+ " if TYPE_CHECKING:" ,
97+ ]
98+
99+ [tool .ruff ]
100+ line-length = 110
101+ target-version = " py310"
102+ src = [" src" , " tests" ]
103+
104+ [tool .ruff .lint ]
105+ select = [" E" , " F" , " I" , " UP" , " B" , " C4" , " SIM" ]
106+ ignore = [
107+ " E501" , # line length is handled by the formatter
108+ " B008" , # typer uses callables in argument defaults by design
109+ " SIM108" , # ternaries are not always clearer
110+ ]
111+
112+ [tool .ruff .lint .per-file-ignores ]
113+ # Re-exporting is what an __init__.py is for; the packages that care declare __all__.
114+ "__init__.py" = [" F401" ]
115+ "tests/*" = [" B011" ]
0 commit comments