onekit 0.1.1__tar.gz → 0.1.2__tar.gz
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.
- {onekit-0.1.1 → onekit-0.1.2}/PKG-INFO +5 -5
- {onekit-0.1.1 → onekit-0.1.2}/README.md +4 -4
- {onekit-0.1.1 → onekit-0.1.2}/docs/api/pipelines.md +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/docs/configuration.md +3 -3
- {onekit-0.1.1 → onekit-0.1.2}/docs/index.md +6 -6
- {onekit-0.1.1 → onekit-0.1.2}/docs/quickstart.md +4 -4
- onekit-0.1.2/final_rename.sh +67 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/__init__.py +3 -3
- {onekit-0.1.1 → onekit-0.1.2}/onekit/_core/__init__.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/onekit/_core/report.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/onekit/_core/validators.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/onekit/matplotlib/__init__.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/onekit/numpy/__init__.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/onekit/pandas/__init__.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/onekit/pandas/profiling.py +2 -2
- {onekit-0.1.1 → onekit-0.1.2}/onekit/pipelines/__init__.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/onekit/pipelines/workflows.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/onekit/scipy/__init__.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/onekit/seaborn/__init__.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/onekit/seaborn/theme.py +2 -2
- {onekit-0.1.1 → onekit-0.1.2}/pyproject.toml +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/tests/conftest.py +1 -1
- {onekit-0.1.1 → onekit-0.1.2}/tests/test_seaborn.py +2 -2
- onekit-0.1.1/rename_to_onekit.sh +0 -98
- {onekit-0.1.1 → onekit-0.1.2}/.cache/mkdocs-jupyter/1c1807ea38451701936354f1f081991429a4633a7e3e611fbd916be5a019d5e3.json +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/.cache/mkdocs-jupyter/394ae67f91055c31a592b9aeefb2db778c0b7299e24e8ab65d1849b24c883b6e.json +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/.coverage +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/CHANGELOG.md +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/LICENSE +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/docs/api/matplotlib.md +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/docs/api/numpy.md +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/docs/api/pandas.md +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/docs/api/scipy.md +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/docs/api/seaborn.md +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/docs/examples/advanced_workflow.ipynb +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/docs/examples/beginner_workflow.ipynb +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/mkdocs.yml +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/matplotlib/context.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/matplotlib/grids.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/matplotlib/utils.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/numpy/transforms.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/numpy/utils.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/pandas/cleaning.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/pandas/encoding.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/scipy/fitting.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/scipy/stats.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/onekit/seaborn/eda.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/404.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/api/matplotlib/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/api/numpy/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/api/pandas/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/api/pipelines/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/api/scipy/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/api/seaborn/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/images/favicon.png +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/bundle.79ae519e.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/bundle.79ae519e.min.js.map +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.ar.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.da.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.de.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.du.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.el.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.es.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.fi.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.fr.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.he.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.hi.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.hu.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.hy.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.it.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.ja.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.jp.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.kn.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.ko.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.multi.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.nl.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.no.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.pt.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.ro.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.ru.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.sa.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.sv.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.ta.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.te.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.th.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.tr.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.vi.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/min/lunr.zh.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/tinyseg.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/lunr/wordcut.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/workers/search.2c215733.min.js +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/javascripts/workers/search.2c215733.min.js.map +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/stylesheets/main.484c7ddc.min.css +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/stylesheets/main.484c7ddc.min.css.map +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/stylesheets/palette.ab4e12ef.min.css +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/assets/stylesheets/palette.ab4e12ef.min.css.map +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/configuration/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/examples/advanced_workflow/advanced_workflow.ipynb +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/examples/advanced_workflow/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/examples/beginner_workflow/beginner_workflow.ipynb +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/examples/beginner_workflow/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/quickstart/index.html +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/search/search_index.json +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/sitemap.xml +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/site/sitemap.xml.gz +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/tests/test_matplotlib.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/tests/test_numpy_transforms.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/tests/test_numpy_utils.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/tests/test_pandas_cleaning.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/tests/test_pandas_encoding.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/tests/test_pandas_profiling.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/tests/test_pipelines.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/tests/test_scipy_fitting.py +0 -0
- {onekit-0.1.1 → onekit-0.1.2}/tests/test_scipy_stats.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: onekit
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: One-liner utilities for the Python data science stack
|
|
5
5
|
Project-URL: Homepage, https://github.com/Tenali-Rama/onekit
|
|
6
6
|
Project-URL: Documentation, https://Tenali-Rama.github.io/onekit
|
|
@@ -55,9 +55,9 @@ Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
|
55
55
|
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
56
56
|
Description-Content-Type: text/markdown
|
|
57
57
|
|
|
58
|
-
#
|
|
58
|
+
# OneKit
|
|
59
59
|
**One-liner utilities for the Python data science stack**
|
|
60
|
-
|
|
60
|
+
OneKit eliminates repetitive boilerplate that every data scientist rewrites from scratch. It wraps NumPy, Pandas, Matplotlib, Seaborn, and SciPy with smart defaults, transparent reporting, and full parameter control.
|
|
61
61
|
## Installation
|
|
62
62
|
```bash
|
|
63
63
|
pip install onekit
|
|
@@ -92,8 +92,8 @@ print(result['interpretation'])
|
|
|
92
92
|
| `plot_corr()` | Correlation heatmap | seaborn |
|
|
93
93
|
| `compare_groups()` | Automatic t‑test vs Mann‑Whitney | scipy |
|
|
94
94
|
| `quick_eda()` | Full exploratory pipeline | pipelines |
|
|
95
|
-
| … and many more | See [documentation](https://Tenali-Rama.github.io/
|
|
95
|
+
| … and many more | See [documentation](https://Tenali-Rama.github.io/onekit) | |
|
|
96
96
|
## Documentation
|
|
97
|
-
Full documentation, including API reference and examples, is available at [https://Tenali-Rama.github.io/
|
|
97
|
+
Full documentation, including API reference and examples, is available at [https://Tenali-Rama.github.io/onekit](https://Tenali-Rama.github.io/onekit).
|
|
98
98
|
## License
|
|
99
99
|
MIT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# OneKit
|
|
2
2
|
**One-liner utilities for the Python data science stack**
|
|
3
|
-
|
|
3
|
+
OneKit eliminates repetitive boilerplate that every data scientist rewrites from scratch. It wraps NumPy, Pandas, Matplotlib, Seaborn, and SciPy with smart defaults, transparent reporting, and full parameter control.
|
|
4
4
|
## Installation
|
|
5
5
|
```bash
|
|
6
6
|
pip install onekit
|
|
@@ -35,8 +35,8 @@ print(result['interpretation'])
|
|
|
35
35
|
| `plot_corr()` | Correlation heatmap | seaborn |
|
|
36
36
|
| `compare_groups()` | Automatic t‑test vs Mann‑Whitney | scipy |
|
|
37
37
|
| `quick_eda()` | Full exploratory pipeline | pipelines |
|
|
38
|
-
| … and many more | See [documentation](https://Tenali-Rama.github.io/
|
|
38
|
+
| … and many more | See [documentation](https://Tenali-Rama.github.io/onekit) | |
|
|
39
39
|
## Documentation
|
|
40
|
-
Full documentation, including API reference and examples, is available at [https://Tenali-Rama.github.io/
|
|
40
|
+
Full documentation, including API reference and examples, is available at [https://Tenali-Rama.github.io/onekit](https://Tenali-Rama.github.io/onekit).
|
|
41
41
|
## License
|
|
42
42
|
MIT
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Configuration
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
OneKit supports a per‑project configuration file named `.onekit.toml`. This file lets you set default parameters for theme, imputation, output, and colours without repeating them in every script.
|
|
4
4
|
|
|
5
5
|
## Where to put the file
|
|
6
6
|
|
|
7
|
-
Place `.onekit.toml` in your working directory or any parent directory.
|
|
7
|
+
Place `.onekit.toml` in your working directory or any parent directory. OneKit searches upward from the current working directory (like `.gitignore`).
|
|
8
8
|
|
|
9
9
|
## File format
|
|
10
10
|
|
|
@@ -115,6 +115,6 @@ palette = "Set2"
|
|
|
115
115
|
|
|
116
116
|
## Notes
|
|
117
117
|
|
|
118
|
-
- The configuration system is optional. If no file is found,
|
|
118
|
+
- The configuration system is optional. If no file is found, OneKit uses built‑in defaults.
|
|
119
119
|
- Config values never override explicit function arguments – they only provide defaults when the argument is omitted.
|
|
120
120
|
- To see which version of the config is loaded, call `dk.get_config()` after loading.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# OneKit Documentation
|
|
2
2
|
|
|
3
|
-
Welcome to
|
|
3
|
+
Welcome to OneKit, the Python utility package that eliminates repetitive data science boilerplate.
|
|
4
4
|
|
|
5
5
|
**One-liner functions. Smart defaults. Full control when you need it.**
|
|
6
6
|
|
|
7
|
-
## What is
|
|
7
|
+
## What is OneKit?
|
|
8
8
|
|
|
9
9
|
Every data scientist rewrites the same code over and over:
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ Every data scientist rewrites the same code over and over:
|
|
|
14
14
|
- Running statistical tests
|
|
15
15
|
- Encoding categorical variables
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
OneKit wraps Pandas, NumPy, Matplotlib, Seaborn, and SciPy into simple one‑call functions. Beginners get professional results without knowing the internals. Experts can override every parameter.
|
|
18
18
|
|
|
19
19
|
## Quick example
|
|
20
20
|
|
|
@@ -66,7 +66,7 @@ pip install onekit
|
|
|
66
66
|
|
|
67
67
|
## Design philosophy
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
OneKit follows six principles:
|
|
70
70
|
|
|
71
71
|
1. **Sensible defaults with full override** – Every function works with minimal arguments; advanced parameters are available as keyword arguments.
|
|
72
72
|
2. **Transparent output** – Functions tell you what they did (unless you set `verbose=False`).
|
|
@@ -77,4 +77,4 @@ DataKit follows six principles:
|
|
|
77
77
|
|
|
78
78
|
## License
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
OneKit is released under the MIT license.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Quickstart Guide
|
|
2
2
|
|
|
3
|
-
This guide will get you up and running with
|
|
3
|
+
This guide will get you up and running with OneKit in less than 5 minutes.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ pip install onekit
|
|
|
10
10
|
|
|
11
11
|
Requires Python 3.9 or newer.
|
|
12
12
|
|
|
13
|
-
## Your first
|
|
13
|
+
## Your first OneKit analysis
|
|
14
14
|
|
|
15
15
|
Let's walk through a complete analysis on a sample dataset.
|
|
16
16
|
|
|
@@ -110,7 +110,7 @@ dk.groupby_chart(df, by='city', metric='satisfaction', agg='mean', chart_type='b
|
|
|
110
110
|
|
|
111
111
|
## Common patterns
|
|
112
112
|
|
|
113
|
-
| Task |
|
|
113
|
+
| Task | OneKit code |
|
|
114
114
|
|------|--------------|
|
|
115
115
|
| Profile a DataFrame | `dk.profile_df(df)` |
|
|
116
116
|
| Clean column names | `dk.clean_columns(df)` |
|
|
@@ -122,4 +122,4 @@ dk.groupby_chart(df, by='city', metric='satisfaction', agg='mean', chart_type='b
|
|
|
122
122
|
| Curve fitting | `dk.fit_and_plot(model, x, y)` |
|
|
123
123
|
| Set random seed | `dk.set_seed(42)` |
|
|
124
124
|
|
|
125
|
-
That's it! You're now ready to use
|
|
125
|
+
That's it! You're now ready to use OneKit in your own projects.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# final_rename_to_onekit.sh - Replace all datakit references with onekit
|
|
3
|
+
|
|
4
|
+
set -e # exit on error
|
|
5
|
+
|
|
6
|
+
echo "🔍 Replacing 'datakit' with 'onekit' in all project files..."
|
|
7
|
+
|
|
8
|
+
# 1. Update pyproject.toml (if any datakit left)
|
|
9
|
+
if [ -f "pyproject.toml" ]; then
|
|
10
|
+
sed -i.bak 's/datakit/onekit/g' pyproject.toml
|
|
11
|
+
# Also update documentation URL if present
|
|
12
|
+
sed -i.bak 's|https://Tenali-Rama.github.io/datakit|https://Tenali-Rama.github.io/onekit|g' pyproject.toml
|
|
13
|
+
rm -f pyproject.toml.bak
|
|
14
|
+
echo "✅ Updated pyproject.toml"
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# 2. Update README.md (critical for PyPI description)
|
|
18
|
+
if [ -f "README.md" ]; then
|
|
19
|
+
sed -i.bak 's/datakit/onekit/g' README.md
|
|
20
|
+
sed -i.bak 's/DataKit/OneKit/g' README.md
|
|
21
|
+
sed -i.bak 's|https://Tenali-Rama.github.io/datakit|https://Tenali-Rama.github.io/onekit|g' README.md
|
|
22
|
+
rm -f README.md.bak
|
|
23
|
+
echo "✅ Updated README.md"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
# 3. Update all Markdown files in docs/
|
|
27
|
+
if [ -d "docs" ]; then
|
|
28
|
+
find docs -name "*.md" -type f -exec sed -i.bak 's/datakit/onekit/g' {} \;
|
|
29
|
+
find docs -name "*.md" -type f -exec sed -i.bak 's/DataKit/OneKit/g' {} \;
|
|
30
|
+
find docs -name "*.md" -type f -exec sed -i.bak 's|https://Tenali-Rama.github.io/datakit|https://Tenali-Rama.github.io/onekit|g' {} \;
|
|
31
|
+
find docs -name "*.md.bak" -delete 2>/dev/null || true
|
|
32
|
+
echo "✅ Updated docs/*.md"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# 4. Update Python files in the module (oneshot/onekit) – but careful with import statements
|
|
36
|
+
# We already did module rename, but some comments/strings may still have "datakit"
|
|
37
|
+
if [ -d "onekit" ]; then
|
|
38
|
+
find onekit -name "*.py" -type f -exec sed -i.bak 's/datakit/onekit/g' {} \;
|
|
39
|
+
find onekit -name "*.py" -type f -exec sed -i.bak 's/DataKit/OneKit/g' {} \;
|
|
40
|
+
find onekit -name "*.py.bak" -delete 2>/dev/null || true
|
|
41
|
+
echo "✅ Updated Python files in onekit/"
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
# 5. Update test files
|
|
45
|
+
if [ -d "tests" ]; then
|
|
46
|
+
find tests -name "*.py" -type f -exec sed -i.bak 's/datakit/onekit/g' {} \;
|
|
47
|
+
find tests -name "*.py.bak" -delete 2>/dev/null || true
|
|
48
|
+
echo "✅ Updated tests/"
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
# 6. Update Jupyter notebooks
|
|
52
|
+
if [ -d "docs/examples" ]; then
|
|
53
|
+
find docs/examples -name "*.ipynb" -type f -exec sed -i.bak 's/datakit/onekit/g' {} \;
|
|
54
|
+
find docs/examples -name "*.ipynb.bak" -delete 2>/dev/null || true
|
|
55
|
+
echo "✅ Updated notebooks"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# 7. Update mkdocs.yml
|
|
59
|
+
if [ -f "mkdocs.yml" ]; then
|
|
60
|
+
sed -i.bak 's/datakit/onekit/g' mkdocs.yml
|
|
61
|
+
sed -i.bak 's|https://Tenali-Rama.github.io/datakit|https://Tenali-Rama.github.io/onekit|g' mkdocs.yml
|
|
62
|
+
rm -f mkdocs.yml.bak
|
|
63
|
+
echo "✅ Updated mkdocs.yml"
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
echo "🎉 All 'datakit' references replaced with 'onekit'."
|
|
67
|
+
echo "📦 Now rebuild and upload a new version (increment version to 0.1.2)."
|
|
@@ -17,7 +17,7 @@ _config = None # cached config dict
|
|
|
17
17
|
|
|
18
18
|
def load_config(path=None):
|
|
19
19
|
"""
|
|
20
|
-
Load a .
|
|
20
|
+
Load a .onekit.toml configuration file.
|
|
21
21
|
|
|
22
22
|
path : explicit file path, or None to search upward from current directory
|
|
23
23
|
Returns a dict with configuration, or empty dict if no config found.
|
|
@@ -34,7 +34,7 @@ def load_config(path=None):
|
|
|
34
34
|
# search upward from current working directory
|
|
35
35
|
current = os.getcwd()
|
|
36
36
|
while True:
|
|
37
|
-
candidate = os.path.join(current, '.
|
|
37
|
+
candidate = os.path.join(current, '.onekit.toml')
|
|
38
38
|
if os.path.isfile(candidate):
|
|
39
39
|
config_path = candidate
|
|
40
40
|
break
|
|
@@ -44,7 +44,7 @@ def load_config(path=None):
|
|
|
44
44
|
current = parent
|
|
45
45
|
|
|
46
46
|
if config_path is None:
|
|
47
|
-
print("No .
|
|
47
|
+
print("No .onekit.toml configuration file found. Using defaults.")
|
|
48
48
|
_config = {}
|
|
49
49
|
return _config
|
|
50
50
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# simple helper to print formatted reports consistently across
|
|
1
|
+
# simple helper to print formatted reports consistently across onekit
|
|
2
2
|
# we use a simple function instead of a full class, as per the style guide
|
|
3
3
|
|
|
4
4
|
def print_report(title, sections=None, width=50):
|
|
@@ -148,7 +148,7 @@ def profile_df(df, include_samples=True, top_n=5, export_html=False, output_path
|
|
|
148
148
|
if export_html:
|
|
149
149
|
try:
|
|
150
150
|
html = []
|
|
151
|
-
html.append("<html><head><title>
|
|
151
|
+
html.append("<html><head><title>OneKit Profile Report</title>")
|
|
152
152
|
html.append("<style>")
|
|
153
153
|
html.append("body { font-family: sans-serif; margin: 20px; }")
|
|
154
154
|
html.append("h1, h2 { color: #333; }")
|
|
@@ -158,7 +158,7 @@ def profile_df(df, include_samples=True, top_n=5, export_html=False, output_path
|
|
|
158
158
|
html.append(".numeric { text-align: right; }")
|
|
159
159
|
html.append("</style></head><body>")
|
|
160
160
|
|
|
161
|
-
html.append(f"<h1>
|
|
161
|
+
html.append(f"<h1>OneKit Profile: {output_path}</h1>")
|
|
162
162
|
html.append("<h2>Overview</h2>")
|
|
163
163
|
html.append("<tr>")
|
|
164
164
|
html.append("<tr><th>Metric</th><th>Value</th></tr>")
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import matplotlib.pyplot as plt
|
|
5
5
|
import seaborn as sns
|
|
6
6
|
|
|
7
|
-
def set_theme(style='whitegrid', palette='muted', font_scale=1.2, dpi=120, from_config=False, config_path='.
|
|
7
|
+
def set_theme(style='whitegrid', palette='muted', font_scale=1.2, dpi=120, from_config=False, config_path='.onekit.toml'):
|
|
8
8
|
"""
|
|
9
9
|
Set up seaborn and matplotlib theme in one call.
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ def set_theme(style='whitegrid', palette='muted', font_scale=1.2, dpi=120, from_
|
|
|
12
12
|
palette : seaborn color palette ('muted', 'bright', 'colorblind', 'Set2', etc.)
|
|
13
13
|
font_scale : multiplier for font sizes
|
|
14
14
|
dpi : figure DPI for matplotlib
|
|
15
|
-
from_config : if True, load settings from .
|
|
15
|
+
from_config : if True, load settings from .onekit.toml and override parameters
|
|
16
16
|
config_path : path to config file (used only if from_config=True)
|
|
17
17
|
|
|
18
18
|
Returns None.
|
|
@@ -86,8 +86,8 @@ def test_set_theme_sets_rcparams():
|
|
|
86
86
|
plt.rcParams['figure.dpi'] = original_dpi
|
|
87
87
|
|
|
88
88
|
def test_set_theme_with_config(tmp_path):
|
|
89
|
-
"""set_theme with from_config=True should read .
|
|
90
|
-
config_file = tmp_path / ".
|
|
89
|
+
"""set_theme with from_config=True should read .onekit.toml"""
|
|
90
|
+
config_file = tmp_path / ".onekit.toml"
|
|
91
91
|
config_file.write_text("""
|
|
92
92
|
[theme]
|
|
93
93
|
style = "darkgrid"
|
onekit-0.1.1/rename_to_onekit.sh
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# rename_to_onekit.sh – Renames the DataKit project to "onekit"
|
|
3
|
-
# Usage: ./rename_to_onekit.sh [CURRENT_MODULE_NAME]
|
|
4
|
-
# If CURRENT_MODULE_NAME is not provided, the script will auto-detect.
|
|
5
|
-
|
|
6
|
-
set -e # exit on error
|
|
7
|
-
|
|
8
|
-
# Colors for output
|
|
9
|
-
GREEN='\033[0;32m'
|
|
10
|
-
YELLOW='\033[1;33m'
|
|
11
|
-
NC='\033[0m' # No Color
|
|
12
|
-
|
|
13
|
-
# Determine current module name
|
|
14
|
-
if [ -n "$1" ]; then
|
|
15
|
-
OLD_NAME="$1"
|
|
16
|
-
elif [ -d "datakit" ]; then
|
|
17
|
-
OLD_NAME="datakit"
|
|
18
|
-
elif [ -d "oneshot" ]; then
|
|
19
|
-
OLD_NAME="oneshot"
|
|
20
|
-
elif [ -d "onepy" ]; then
|
|
21
|
-
OLD_NAME="onepy"
|
|
22
|
-
elif [ -d "onekit" ]; then
|
|
23
|
-
echo -e "${YELLOW}Already named onekit? Doing nothing.${NC}"
|
|
24
|
-
exit 0
|
|
25
|
-
else
|
|
26
|
-
echo "Error: Could not detect current module directory (datakit, oneshot, or onepy)."
|
|
27
|
-
echo "Please provide the current module name as argument: ./rename_to_onekit.sh <oldname>"
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
NEW_NAME="onekit"
|
|
32
|
-
|
|
33
|
-
echo -e "${GREEN}Renaming project from '$OLD_NAME' to '$NEW_NAME'...${NC}"
|
|
34
|
-
|
|
35
|
-
# 1. Rename the module directory
|
|
36
|
-
if [ -d "$OLD_NAME" ]; then
|
|
37
|
-
echo "📁 Moving $OLD_NAME/ → $NEW_NAME/"
|
|
38
|
-
mv "$OLD_NAME" "$NEW_NAME"
|
|
39
|
-
else
|
|
40
|
-
echo "Error: Directory '$OLD_NAME' not found."
|
|
41
|
-
exit 1
|
|
42
|
-
fi
|
|
43
|
-
|
|
44
|
-
# 2. Update pyproject.toml
|
|
45
|
-
if [ -f "pyproject.toml" ]; then
|
|
46
|
-
echo "📝 Updating pyproject.toml..."
|
|
47
|
-
sed -i.bak "s/name = \"$OLD_NAME\"/name = \"$NEW_NAME\"/" pyproject.toml
|
|
48
|
-
sed -i.bak "s/packages = \[\"$OLD_NAME\"\]/packages = [\"$NEW_NAME\"]/" pyproject.toml
|
|
49
|
-
# Also replace any other occurrences (e.g., URLs)
|
|
50
|
-
sed -i.bak "s/$OLD_NAME/$NEW_NAME/g" pyproject.toml
|
|
51
|
-
rm -f pyproject.toml.bak
|
|
52
|
-
else
|
|
53
|
-
echo "Warning: pyproject.toml not found"
|
|
54
|
-
fi
|
|
55
|
-
|
|
56
|
-
# 3. Update all Python imports in the module and tests
|
|
57
|
-
echo "🔄 Updating Python imports in $NEW_NAME/ and tests/..."
|
|
58
|
-
find "$NEW_NAME" tests -name "*.py" -type f -exec sed -i.bak "s/from $OLD_NAME\./from $NEW_NAME\./g" {} \;
|
|
59
|
-
find "$NEW_NAME" tests -name "*.py" -type f -exec sed -i.bak "s/import $OLD_NAME\( as .*\)\?/import $NEW_NAME\1/g" {} \;
|
|
60
|
-
find "$NEW_NAME" tests -name "*.py" -type f -exec sed -i.bak "s/from $OLD_NAME import/from $NEW_NAME import/g" {} \;
|
|
61
|
-
# Remove backup files
|
|
62
|
-
find "$NEW_NAME" tests -name "*.py.bak" -delete 2>/dev/null || true
|
|
63
|
-
|
|
64
|
-
# 4. Update Jupyter notebooks (docs/examples/*.ipynb)
|
|
65
|
-
if [ -d "docs/examples" ]; then
|
|
66
|
-
echo "📓 Updating notebooks in docs/examples/..."
|
|
67
|
-
find docs/examples -name "*.ipynb" -type f -exec sed -i.bak "s/$OLD_NAME/$NEW_NAME/g" {} \;
|
|
68
|
-
find docs/examples -name "*.ipynb.bak" -delete 2>/dev/null || true
|
|
69
|
-
fi
|
|
70
|
-
|
|
71
|
-
# 5. Update Markdown documentation (README.md, docs/*.md)
|
|
72
|
-
echo "📝 Updating Markdown files..."
|
|
73
|
-
for md in README.md docs/*.md docs/**/*.md; do
|
|
74
|
-
if [ -f "$md" ]; then
|
|
75
|
-
sed -i.bak "s/pip install $OLD_NAME/pip install $NEW_NAME/g" "$md"
|
|
76
|
-
sed -i.bak "s/import $OLD_NAME/import $NEW_NAME/g" "$md"
|
|
77
|
-
sed -i.bak "s/$OLD_NAME as dk/$NEW_NAME as dk/g" "$md"
|
|
78
|
-
sed -i.bak "s/$OLD_NAME\./$NEW_NAME./g" "$md"
|
|
79
|
-
rm -f "$md.bak"
|
|
80
|
-
fi
|
|
81
|
-
done
|
|
82
|
-
|
|
83
|
-
# 6. Update mkdocs.yml if it exists
|
|
84
|
-
if [ -f "mkdocs.yml" ]; then
|
|
85
|
-
echo "⚙️ Updating mkdocs.yml..."
|
|
86
|
-
sed -i.bak "s/$OLD_NAME/$NEW_NAME/g" mkdocs.yml
|
|
87
|
-
rm -f mkdocs.yml.bak
|
|
88
|
-
fi
|
|
89
|
-
|
|
90
|
-
# 7. Update the top-level __init__.py docstring (optional)
|
|
91
|
-
if [ -f "$NEW_NAME/__init__.py" ]; then
|
|
92
|
-
sed -i.bak "s/DataKit/$NEW_NAME/g" "$NEW_NAME/__init__.py"
|
|
93
|
-
rm -f "$NEW_NAME/__init__.py.bak"
|
|
94
|
-
fi
|
|
95
|
-
|
|
96
|
-
echo -e "${GREEN}✅ Renaming complete! New module name: $NEW_NAME${NC}"
|
|
97
|
-
echo -e "${GREEN}📦 Run 'pytest tests/' to verify everything still works.${NC}"
|
|
98
|
-
echo -e "${GREEN}🚀 Then rebuild: rm -rf dist/ && python -m build && twine upload dist/*${NC}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|