datadoc-cli 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,254 @@
1
+ Metadata-Version: 2.4
2
+ Name: datadoc-cli
3
+ Version: 0.1.0
4
+ Summary: The Open Source Operating System for Dataset Engineering.
5
+ Project-URL: Homepage, https://github.com/narain-karti/DATADOC
6
+ Project-URL: Repository, https://github.com/narain-karti/DATADOC
7
+ Project-URL: Issues, https://github.com/narain-karti/DATADOC/issues
8
+ Author: narain-karti
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Requires-Python: >=3.9
22
+ Requires-Dist: numpy>=1.24.0
23
+ Requires-Dist: plotext>=5.2.8
24
+ Requires-Dist: polars>=0.20.0
25
+ Requires-Dist: rich>=13.7.0
26
+ Requires-Dist: typer>=0.12.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
29
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
30
+ Description-Content-Type: text/markdown
31
+
32
+ <p align="center">
33
+ <pre>
34
+ ____ _ _____ _ ____ ___ ____
35
+ | _ \ / \|_ _|/ \ | _ \ / _ \ / ___|
36
+ | | | |/ _ \ | | / _ \ | | | | | | | |
37
+ | |_| / ___ \| |/ ___ \| |_| | |_| | |___
38
+ |____/_/ \_\_/_/ \_\____/ \___/ \____|
39
+ </pre>
40
+ </p>
41
+
42
+ <h3 align="center">The Open Source Operating System for Dataset Engineering.</h3>
43
+
44
+ <p align="center">
45
+ <a href="#installation">Install</a> |
46
+ <a href="#quick-start">Quick Start</a> |
47
+ <a href="#cli-commands">CLI Commands</a> |
48
+ <a href="#plugins">Plugins</a> |
49
+ <a href="#contributing">Contributing</a>
50
+ </p>
51
+
52
+ ---
53
+
54
+ ## What is DATADOC?
55
+
56
+ DATADOC is an intelligent, modular **Dataset Engineering Framework** that orchestrates existing powerful libraries (Pandas, NumPy, Scikit-learn) into a standardized, reusable workflow.
57
+
58
+ **DATADOC is NOT another EDA tool.** It doesn't just show you charts. It **diagnoses**, **recommends**, and **automatically engineers** your dataset -- then hands you a portable Python script to replicate it anywhere.
59
+
60
+ ### Core Philosophy
61
+
62
+ - **Orchestrate, don't replace** -- DATADOC wraps Pandas, NumPy, and Sklearn. It doesn't reinvent them.
63
+ - **Modular Plugin Architecture** -- Every transformation is an isolated, testable plugin.
64
+ - **Explainable by Default** -- Every action can be explained, rolled back, and exported as code.
65
+ - **Deterministic First** -- v1.0 uses a rule-based engine. No black-box AI decisions.
66
+
67
+ ---
68
+
69
+ ## Installation
70
+
71
+ ```bash
72
+ # Clone and install
73
+ git clone https://github.com/narain-karti/DATADOC.git
74
+ cd DATADOC
75
+ pip install -e .
76
+
77
+ # Or install with dev dependencies
78
+ pip install -e ".[dev]"
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Quick Start
84
+
85
+ ```bash
86
+ # Analyze your dataset's health
87
+ datadoc analyze your_data.csv
88
+
89
+ # Get recommendations without changing anything
90
+ datadoc recommend your_data.csv
91
+
92
+ # Automatically engineer your dataset
93
+ datadoc engineer your_data.csv
94
+
95
+ # Compare before vs after
96
+ datadoc compare your_data.csv
97
+
98
+ # Export a standalone Python pipeline
99
+ datadoc pipeline your_data.csv
100
+
101
+ # Generate a Markdown report
102
+ datadoc report your_data.csv
103
+
104
+ # List all available plugins
105
+ datadoc plugin
106
+ ```
107
+
108
+ ### Python SDK
109
+
110
+ ```python
111
+ from datadoc.core.engine import DATADOC
112
+
113
+ doc = DATADOC("your_data.csv")
114
+
115
+ # Analyze
116
+ report = doc.analyze()
117
+ print(report)
118
+
119
+ # Get recommendations
120
+ for rec in doc.recommend():
121
+ print(rec)
122
+
123
+ # Auto-engineer
124
+ clean_df = doc.engineer()
125
+ clean_df.to_csv("clean_data.csv", index=False)
126
+
127
+ # Export pipeline
128
+ with open("pipeline.py", "w") as f:
129
+ f.write(doc.pipeline())
130
+ ```
131
+
132
+ ---
133
+
134
+ ## CLI Commands
135
+
136
+ | Command | Description |
137
+ |---------|-------------|
138
+ | `datadoc analyze <file>` | Scans dataset and shows a health report with status indicators |
139
+ | `datadoc recommend <file>` | Lists suggested engineering steps without modifying data |
140
+ | `datadoc engineer <file>` | Automatically applies all recommended transformations |
141
+ | `datadoc compare <file>` | Shows a before/after diff of the raw vs engineered dataset |
142
+ | `datadoc pipeline <file>` | Exports a standalone `.py` script with the exact Pandas code |
143
+ | `datadoc report <file>` | Generates a full Markdown report |
144
+ | `datadoc plugin` | Lists all registered plugins with priority and descriptions |
145
+ | `datadoc version` | Displays the DATADOC version |
146
+
147
+ ---
148
+
149
+ ## Plugins
150
+
151
+ DATADOC ships with 5 built-in plugins, executed in priority order:
152
+
153
+ | Priority | Plugin | What it Does |
154
+ |----------|--------|-------------|
155
+ | 10 | **MissingValuePlugin** | Imputes missing numeric values with median, categorical with mode |
156
+ | 20 | **OutlierPlugin** | Detects outliers via IQR and clips at 5th/95th percentiles |
157
+ | 30 | **DatetimePlugin** | Detects date columns and extracts year, month, day, day_of_week |
158
+ | 40 | **CategoricalEncoderPlugin** | One-Hot Encodes categorical columns (< 10 unique values) |
159
+ | 45 | **ScalingPlugin** | Standard scales numeric columns when scale ratio exceeds 10x |
160
+
161
+ ### Plugin Interface
162
+
163
+ Every plugin implements the full `BasePlugin` interface:
164
+
165
+ ```python
166
+ class BasePlugin(ABC):
167
+ name: str # Plugin identifier
168
+ version: str # Semantic version
169
+ description: str # One-line description
170
+ priority: int # Execution order (lower = first)
171
+ supported_datatypes # Which dtypes this plugin handles
172
+ dependencies # Plugins that must run before this one
173
+
174
+ analyze(df) -> dict # Detect issues
175
+ recommend(analysis) -> list # Suggest fixes
176
+ generate_code(analysis) -> str # Export as Python code
177
+ apply(df) -> DataFrame # Apply transformation
178
+ validate(df) -> bool # Verify result
179
+ rollback(original) -> DataFrame # Undo transformation
180
+ explain() -> str # Human-readable explanation
181
+ estimate_runtime(df) -> float # Performance estimate
182
+ ```
183
+
184
+ ### Building Your Own Plugin
185
+
186
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for a step-by-step guide on building and registering custom plugins.
187
+
188
+ ---
189
+
190
+ ## Architecture
191
+
192
+ ```
193
+ datadoc/
194
+ core/
195
+ engine.py # DATADOC orchestrator class
196
+ cli/
197
+ app.py # Typer CLI with Rich terminal UI
198
+ plugins/
199
+ base.py # Abstract BasePlugin interface
200
+ missing_values.py # MissingValuePlugin
201
+ outliers.py # OutlierPlugin
202
+ datetime_feat.py # DatetimePlugin
203
+ encoders.py # CategoricalEncoderPlugin
204
+ scaling.py # ScalingPlugin
205
+ tests/
206
+ test_core.py # Comprehensive test suite
207
+ ```
208
+
209
+ The CLI talks to the Core Engine, which orchestrates Plugins sorted by priority. Each plugin independently analyzes, recommends, and applies transformations.
210
+
211
+ ---
212
+
213
+ ## Development
214
+
215
+ ```bash
216
+ # Install dev dependencies
217
+ pip install -e ".[dev]"
218
+
219
+ # Run tests
220
+ pytest tests/ -v
221
+
222
+ # Lint
223
+ ruff check datadoc/
224
+ ```
225
+
226
+ ---
227
+
228
+ ## Roadmap
229
+
230
+ - [x] Core Engine with plugin orchestration
231
+ - [x] 5 built-in plugins (Missing Values, Outliers, Datetime, Encoding, Scaling)
232
+ - [x] 7 CLI commands with Rich terminal UI
233
+ - [x] Pipeline export (standalone `.py` scripts)
234
+ - [x] Markdown report generation
235
+ - [x] Full plugin interface (validate, rollback, explain, estimate_runtime)
236
+ - [x] CI/CD with GitHub Actions
237
+ - [ ] PyPI release (`pip install datadoc`)
238
+ - [ ] Polars backend support
239
+ - [ ] REST API (FastAPI)
240
+ - [ ] Web Dashboard
241
+ - [ ] AI Planner (LLM replaces Rule Engine)
242
+ - [ ] Plugin Marketplace
243
+
244
+ ---
245
+
246
+ ## License
247
+
248
+ MIT License. See [LICENSE](LICENSE) for details.
249
+
250
+ ---
251
+
252
+ ## Contributing
253
+
254
+ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
@@ -0,0 +1,17 @@
1
+ datadoc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ datadoc/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ datadoc/cli/app.py,sha256=x6AuaJddr0zgII1momvkOEyWL4csn-_2ojkspdYGQEk,21062
4
+ datadoc/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ datadoc/core/engine.py,sha256=h7Dinb6mO3hToe5tPkr99quXbgpAJM8bhlrUwIuMj3w,5563
6
+ datadoc/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ datadoc/plugins/base.py,sha256=-UZZsZviZ_nIWUfLBJVFq29g6FXuH9kBVnzUZLC_sBQ,2144
8
+ datadoc/plugins/datetime_feat.py,sha256=KiNa2gSTmb-z1cN_Ro97YZy6bd4i9VXOv2blAIZN6jg,3651
9
+ datadoc/plugins/encoders.py,sha256=Tv1f8lJH0eFyd-BhJHNfil-9VBL4aVK7pBmuoRl5FjU,2532
10
+ datadoc/plugins/missing_values.py,sha256=7_vYrRme1qlzLnN8ZoilyDEh1gqfLc9ozHt_5P-MMaw,2821
11
+ datadoc/plugins/outliers.py,sha256=J9XVLCEHxco_-bmkqnHTC1HeGHAxl4k5oUSmpqjfPeU,3153
12
+ datadoc/plugins/scaling.py,sha256=iom7aVHNjw9YK23ifS4o1hvWCEJIkESoinI1_t4rHK8,3401
13
+ datadoc_cli-0.1.0.dist-info/METADATA,sha256=U0uOnCLkWRnROLiy8xhicPCWNPfwWNaAf-tdJ2TsEXM,7573
14
+ datadoc_cli-0.1.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
15
+ datadoc_cli-0.1.0.dist-info/entry_points.txt,sha256=lCLwvyMXnoOXaDiam7ISwcuspPgZ4-Uyo-5IeDGoABc,48
16
+ datadoc_cli-0.1.0.dist-info/licenses/LICENSE,sha256=RjDNnL6vIA0vCdwmmtWQKaJI-Fidt5QxGNiYx_d7EOM,1069
17
+ datadoc_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.31.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ datadoc = datadoc.cli.app:app
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 narain-karti
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.