phronesisml 0.2.0__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.
Files changed (138) hide show
  1. phronesisml-0.2.0/.dockerignore +40 -0
  2. phronesisml-0.2.0/.editorconfig +18 -0
  3. phronesisml-0.2.0/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
  4. phronesisml-0.2.0/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  5. phronesisml-0.2.0/.github/PULL_REQUEST_TEMPLATE.md +34 -0
  6. phronesisml-0.2.0/.github/dependabot.yml +22 -0
  7. phronesisml-0.2.0/.github/workflows/ci.yml +182 -0
  8. phronesisml-0.2.0/.github/workflows/docs.yml +28 -0
  9. phronesisml-0.2.0/.gitignore +57 -0
  10. phronesisml-0.2.0/.pre-commit-config.yaml +16 -0
  11. phronesisml-0.2.0/CHANGELOG.md +108 -0
  12. phronesisml-0.2.0/CODE_OF_CONDUCT.md +52 -0
  13. phronesisml-0.2.0/CONTRIBUTING.md +90 -0
  14. phronesisml-0.2.0/Dockerfile +45 -0
  15. phronesisml-0.2.0/LICENSE +21 -0
  16. phronesisml-0.2.0/Makefile +31 -0
  17. phronesisml-0.2.0/PKG-INFO +622 -0
  18. phronesisml-0.2.0/README.md +554 -0
  19. phronesisml-0.2.0/SECURITY.md +41 -0
  20. phronesisml-0.2.0/Striver A2Z custom final (2).xlsx +0 -0
  21. phronesisml-0.2.0/assets/banner.png +0 -0
  22. phronesisml-0.2.0/docker-compose.yml +0 -0
  23. phronesisml-0.2.0/docs/api.md +76 -0
  24. phronesisml-0.2.0/docs/guides/advanced-api.md +69 -0
  25. phronesisml-0.2.0/docs/guides/cli.md +50 -0
  26. phronesisml-0.2.0/docs/guides/incremental.md +82 -0
  27. phronesisml-0.2.0/docs/guides/rest-api.md +95 -0
  28. phronesisml-0.2.0/docs/guides/simple-api.md +65 -0
  29. phronesisml-0.2.0/docs/index.md +92 -0
  30. phronesisml-0.2.0/docs/limitations.md +41 -0
  31. phronesisml-0.2.0/mkdocs.yml +68 -0
  32. phronesisml-0.2.0/phronesisml/__init__.py +326 -0
  33. phronesisml-0.2.0/phronesisml/agents/__init__.py +0 -0
  34. phronesisml-0.2.0/phronesisml/agents/base.py +125 -0
  35. phronesisml-0.2.0/phronesisml/agents/eda/__init__.py +0 -0
  36. phronesisml-0.2.0/phronesisml/agents/eda/agent.py +113 -0
  37. phronesisml-0.2.0/phronesisml/agents/etl/__init__.py +0 -0
  38. phronesisml-0.2.0/phronesisml/agents/etl/agent.py +165 -0
  39. phronesisml-0.2.0/phronesisml/agents/evaluation/__init__.py +0 -0
  40. phronesisml-0.2.0/phronesisml/agents/evaluation/agent.py +169 -0
  41. phronesisml-0.2.0/phronesisml/agents/explainability/__init__.py +0 -0
  42. phronesisml-0.2.0/phronesisml/agents/explainability/agent.py +191 -0
  43. phronesisml-0.2.0/phronesisml/agents/feature_engineering/__init__.py +0 -0
  44. phronesisml-0.2.0/phronesisml/agents/feature_engineering/agent.py +148 -0
  45. phronesisml-0.2.0/phronesisml/agents/model_selection/__init__.py +0 -0
  46. phronesisml-0.2.0/phronesisml/agents/model_selection/agent.py +252 -0
  47. phronesisml-0.2.0/phronesisml/agents/reporting/__init__.py +0 -0
  48. phronesisml-0.2.0/phronesisml/agents/reporting/agent.py +90 -0
  49. phronesisml-0.2.0/phronesisml/agents/storage/__init__.py +0 -0
  50. phronesisml-0.2.0/phronesisml/agents/storage/agent.py +130 -0
  51. phronesisml-0.2.0/phronesisml/agents/target_detection/__init__.py +0 -0
  52. phronesisml-0.2.0/phronesisml/agents/target_detection/agent.py +127 -0
  53. phronesisml-0.2.0/phronesisml/agents/upload/__init__.py +0 -0
  54. phronesisml-0.2.0/phronesisml/agents/upload/agent.py +147 -0
  55. phronesisml-0.2.0/phronesisml/agents/validation/__init__.py +0 -0
  56. phronesisml-0.2.0/phronesisml/agents/validation/agent.py +111 -0
  57. phronesisml-0.2.0/phronesisml/configs/__init__.py +5 -0
  58. phronesisml-0.2.0/phronesisml/configs/settings.py +97 -0
  59. phronesisml-0.2.0/phronesisml/data/__init__.py +0 -0
  60. phronesisml-0.2.0/phronesisml/data/loaders/__init__.py +0 -0
  61. phronesisml-0.2.0/phronesisml/data/loaders/file_loader.py +223 -0
  62. phronesisml-0.2.0/phronesisml/data/profilers/__init__.py +9 -0
  63. phronesisml-0.2.0/phronesisml/data/profilers/stats.py +119 -0
  64. phronesisml-0.2.0/phronesisml/data/transformers/__init__.py +0 -0
  65. phronesisml-0.2.0/phronesisml/data/transformers/cleaning.py +175 -0
  66. phronesisml-0.2.0/phronesisml/data/validators/__init__.py +9 -0
  67. phronesisml-0.2.0/phronesisml/data/validators/checks.py +103 -0
  68. phronesisml-0.2.0/phronesisml/engines/__init__.py +0 -0
  69. phronesisml-0.2.0/phronesisml/engines/base_engine.py +210 -0
  70. phronesisml-0.2.0/phronesisml/engines/engine_selector.py +125 -0
  71. phronesisml-0.2.0/phronesisml/engines/pandas_engine.py +134 -0
  72. phronesisml-0.2.0/phronesisml/engines/polars_engine.py +139 -0
  73. phronesisml-0.2.0/phronesisml/engines/spark_engine.py +148 -0
  74. phronesisml-0.2.0/phronesisml/exceptions.py +84 -0
  75. phronesisml-0.2.0/phronesisml/interfaces/api/__init__.py +7 -0
  76. phronesisml-0.2.0/phronesisml/interfaces/api/app.py +137 -0
  77. phronesisml-0.2.0/phronesisml/interfaces/api/jobs.py +128 -0
  78. phronesisml-0.2.0/phronesisml/interfaces/api/models.py +132 -0
  79. phronesisml-0.2.0/phronesisml/interfaces/api/routes.py +486 -0
  80. phronesisml-0.2.0/phronesisml/interfaces/cli/__init__.py +0 -0
  81. phronesisml-0.2.0/phronesisml/interfaces/cli/app.py +114 -0
  82. phronesisml-0.2.0/phronesisml/ml/__init__.py +0 -0
  83. phronesisml-0.2.0/phronesisml/ml/automl/__init__.py +23 -0
  84. phronesisml-0.2.0/phronesisml/ml/automl/auto_selector.py +288 -0
  85. phronesisml-0.2.0/phronesisml/ml/automl/trainer.py +333 -0
  86. phronesisml-0.2.0/phronesisml/ml/evaluation/__init__.py +9 -0
  87. phronesisml-0.2.0/phronesisml/ml/evaluation/metrics.py +247 -0
  88. phronesisml-0.2.0/phronesisml/ml/explainability/__init__.py +16 -0
  89. phronesisml-0.2.0/phronesisml/ml/explainability/shap_explainer.py +214 -0
  90. phronesisml-0.2.0/phronesisml/ml/feature_engineering/__init__.py +9 -0
  91. phronesisml-0.2.0/phronesisml/ml/feature_engineering/engineer.py +358 -0
  92. phronesisml-0.2.0/phronesisml/ml/reports/__init__.py +9 -0
  93. phronesisml-0.2.0/phronesisml/ml/reports/builder.py +458 -0
  94. phronesisml-0.2.0/phronesisml/ml/reports/templates/full_report.md +64 -0
  95. phronesisml-0.2.0/phronesisml/ml/target_detection/__init__.py +12 -0
  96. phronesisml-0.2.0/phronesisml/ml/target_detection/detector.py +252 -0
  97. phronesisml-0.2.0/phronesisml/py.typed +0 -0
  98. phronesisml-0.2.0/phronesisml/sdk.py +786 -0
  99. phronesisml-0.2.0/phronesisml/simple.py +1039 -0
  100. phronesisml-0.2.0/phronesisml/workflow/__init__.py +0 -0
  101. phronesisml-0.2.0/phronesisml/workflow/graph.py +186 -0
  102. phronesisml-0.2.0/phronesisml/workflow/nodes.py +69 -0
  103. phronesisml-0.2.0/phronesisml/workflow/router.py +157 -0
  104. phronesisml-0.2.0/phronesisml/workflow/state.py +185 -0
  105. phronesisml-0.2.0/pyproject.toml +92 -0
  106. phronesisml-0.2.0/requirements.txt +26 -0
  107. phronesisml-0.2.0/test_phronesis.py +5 -0
  108. phronesisml-0.2.0/tests/conftest.py +136 -0
  109. phronesisml-0.2.0/tests/fixtures/ambiguous_target.csv +11 -0
  110. phronesisml-0.2.0/tests/fixtures/sample.csv +6 -0
  111. phronesisml-0.2.0/tests/test_api.py +407 -0
  112. phronesisml-0.2.0/tests/test_cli_app.py +44 -0
  113. phronesisml-0.2.0/tests/test_configs_settings.py +105 -0
  114. phronesisml-0.2.0/tests/test_data_contract.py +292 -0
  115. phronesisml-0.2.0/tests/test_data_pipeline.py +201 -0
  116. phronesisml-0.2.0/tests/test_eda_agent.py +159 -0
  117. phronesisml-0.2.0/tests/test_edge_cases.py +214 -0
  118. phronesisml-0.2.0/tests/test_engines_full.py +223 -0
  119. phronesisml-0.2.0/tests/test_etl_agent.py +137 -0
  120. phronesisml-0.2.0/tests/test_evaluation.py +504 -0
  121. phronesisml-0.2.0/tests/test_explainability.py +416 -0
  122. phronesisml-0.2.0/tests/test_feature_engineering.py +257 -0
  123. phronesisml-0.2.0/tests/test_file_loader.py +181 -0
  124. phronesisml-0.2.0/tests/test_full_pipeline.py +105 -0
  125. phronesisml-0.2.0/tests/test_model_selection.py +663 -0
  126. phronesisml-0.2.0/tests/test_pipeline_e2e.py +111 -0
  127. phronesisml-0.2.0/tests/test_reporting.py +470 -0
  128. phronesisml-0.2.0/tests/test_retroactive.py +147 -0
  129. phronesisml-0.2.0/tests/test_sdk.py +565 -0
  130. phronesisml-0.2.0/tests/test_simple.py +379 -0
  131. phronesisml-0.2.0/tests/test_stub_agents.py +68 -0
  132. phronesisml-0.2.0/tests/test_target_detection.py +198 -0
  133. phronesisml-0.2.0/tests/test_upload_agent.py +78 -0
  134. phronesisml-0.2.0/tests/test_validation_agent.py +171 -0
  135. phronesisml-0.2.0/tests/test_verification.py +300 -0
  136. phronesisml-0.2.0/tests/test_workflow_modules.py +316 -0
  137. phronesisml-0.2.0/tests/verify_ambiguous_unit.py +62 -0
  138. phronesisml-0.2.0/tests/verify_pass4.py +41 -0
@@ -0,0 +1,40 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .git/
7
+ .github/
8
+ .venv/
9
+ venv/
10
+ .mypy_cache/
11
+ .ruff_cache/
12
+ .pytest_cache/
13
+ htmlcov/
14
+
15
+ # Tests & docs (not needed in image)
16
+ tests/
17
+ docs/
18
+ notebooks/
19
+ examples/
20
+ *.md
21
+ !README.md
22
+
23
+ # Dev artifacts
24
+ Phronesis_artifacts/
25
+ phronesisml_artifacts/
26
+ .mlflow/
27
+ mlflow.db
28
+ .pre-commit-config.yaml
29
+ .editorconfig
30
+ .gitignore
31
+ docker-compose.yml
32
+ Makefile
33
+
34
+ # OS
35
+ .DS_Store
36
+ Thumbs.db
37
+
38
+ # IDE
39
+ .vscode/
40
+ .idea/
@@ -0,0 +1,18 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 4
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [*.{toml,cfg,ini}]
12
+ indent_size = 4
13
+
14
+ [*.{json,yml,yaml}]
15
+ indent_size = 2
16
+
17
+ [Makefile]
18
+ indent_style = tab
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug to help us improve PhronesisML
4
+ title: "[BUG] "
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ **Describe the bug**
10
+ A clear and concise description of what the bug is.
11
+
12
+ **To Reproduce**
13
+ Minimal code snippet that reproduces the behavior:
14
+
15
+ ```python
16
+ from phronesisml import Phronesis
17
+
18
+ ml = Phronesis("your_data.csv")
19
+ ml.run() # or whichever method fails
20
+ ```
21
+
22
+ **Expected behavior**
23
+ What you expected to happen.
24
+
25
+ **Actual behavior**
26
+ What actually happened. Include full traceback if applicable.
27
+
28
+ **Environment**
29
+ - OS: [e.g., Windows 11, Ubuntu 22.04]
30
+ - Python version: [e.g., 3.13.3]
31
+ - PhronesisML version: [e.g., 0.2.0]
32
+ - Installation method: [e.g., pip, source]
33
+
34
+ **Dataset info**
35
+ - File format: [e.g., CSV, Parquet]
36
+ - Approximate size: [e.g., 500 rows x 20 columns]
37
+ - If possible, attach a minimal sample or describe the schema.
38
+
39
+ **Additional context**
40
+ Add any other context about the problem here.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature or improvement for PhronesisML
4
+ title: "[FEATURE] "
5
+ labels: enhancement
6
+ assignees: ""
7
+ ---
8
+
9
+ **Is your feature request related to a problem?**
10
+ A clear description of the problem. E.g., "I'm always frustrated when..."
11
+
12
+ **Describe the solution you'd like**
13
+ A clear description of what you want to happen.
14
+
15
+ **Describe alternatives you've considered**
16
+ Any alternative solutions or features you've considered.
17
+
18
+ **Use case**
19
+ Describe the use case this feature would enable. Who benefits and how?
20
+
21
+ **Additional context**
22
+ Add any other context, code examples, or references here.
@@ -0,0 +1,34 @@
1
+ ## Description
2
+
3
+ Brief description of the changes in this PR.
4
+
5
+ ## Type of Change
6
+
7
+ - [ ] Bug fix (non-breaking change that fixes an issue)
8
+ - [ ] New feature (non-breaking change that adds functionality)
9
+ - [ ] Breaking change (fix or feature that causes existing functionality to change)
10
+ - [ ] Documentation update
11
+ - [ ] Refactoring (no functional changes)
12
+
13
+ ## Checklist
14
+
15
+ - [ ] My code follows the project's code style (`ruff check` and `ruff format` pass)
16
+ - [ ] I have added/updated tests that prove my fix is effective or my feature works
17
+ - [ ] New and existing tests pass locally (`pytest`)
18
+ - [ ] I have updated the documentation (if applicable)
19
+ - [ ] I have added an entry to `CHANGELOG.md` (if applicable)
20
+
21
+ ## Testing
22
+
23
+ Describe the tests you ran to verify your changes:
24
+
25
+ ```bash
26
+ pytest tests/ -q
27
+ ruff check phronesisml/ --no-fix
28
+ ruff format --check phronesisml/
29
+ mypy phronesisml/ --ignore-missing-imports
30
+ ```
31
+
32
+ ## Screenshots / Output
33
+
34
+ If applicable, add screenshots or paste test output to demonstrate the change.
@@ -0,0 +1,22 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ open-pull-requests-limit: 10
8
+ labels:
9
+ - "dependencies"
10
+ commit-message:
11
+ prefix: "deps"
12
+
13
+ - package-ecosystem: "github-actions"
14
+ directory: "/"
15
+ schedule:
16
+ interval: "weekly"
17
+ open-pull-requests-limit: 5
18
+ labels:
19
+ - "dependencies"
20
+ - "ci"
21
+ commit-message:
22
+ prefix: "ci"
@@ -0,0 +1,182 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ["v*"]
7
+ pull_request:
8
+ branches: [main]
9
+
10
+ permissions:
11
+ contents: write
12
+ packages: write
13
+
14
+ jobs:
15
+ # ── Auto-format: runs on PRs, commits fixes back to the branch ──
16
+ auto-format:
17
+ runs-on: ubuntu-latest
18
+ if: github.event_name == 'pull_request'
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ with:
22
+ ref: ${{ github.head_ref }}
23
+ token: ${{ secrets.GITHUB_TOKEN }}
24
+ - uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.13"
27
+ cache: pip
28
+ - run: pip install ruff
29
+ - name: Run ruff fix + format
30
+ run: |
31
+ ruff check phronesisml/ --fix
32
+ ruff format phronesisml/
33
+ - name: Commit and push if changed
34
+ run: |
35
+ git config user.name "github-actions[bot]"
36
+ git config user.email "github-actions[bot]@users.noreply.github.com"
37
+ git add -A
38
+ if ! git diff --cached --quiet; then
39
+ git commit -m "style: auto-format with ruff"
40
+ git push
41
+ else
42
+ echo "No formatting changes to commit."
43
+ fi
44
+
45
+ # ── Lint: always runs, fails if code is not clean ───────────────
46
+ lint:
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ - uses: actions/setup-python@v5
51
+ with:
52
+ python-version: "3.13"
53
+ cache: pip
54
+ - run: pip install ruff
55
+ - run: ruff check phronesisml/ --no-fix
56
+ - run: ruff format --check phronesisml/
57
+
58
+ typecheck:
59
+ runs-on: ubuntu-latest
60
+ steps:
61
+ - uses: actions/checkout@v4
62
+ - uses: actions/setup-python@v5
63
+ with:
64
+ python-version: "3.13"
65
+ cache: pip
66
+ - run: pip install -e ".[dev]"
67
+ - run: mypy phronesisml/ --ignore-missing-imports
68
+
69
+ test:
70
+ runs-on: ubuntu-latest
71
+ strategy:
72
+ fail-fast: false
73
+ matrix:
74
+ python-version: ["3.11", "3.12", "3.13"]
75
+ steps:
76
+ - uses: actions/checkout@v4
77
+ - uses: actions/setup-python@v5
78
+ with:
79
+ python-version: ${{ matrix.python-version }}
80
+ cache: pip
81
+ - run: pip install -e ".[dev]"
82
+ - run: pytest tests/ -q --tb=short
83
+
84
+ test-api:
85
+ runs-on: ubuntu-latest
86
+ needs: [lint, typecheck]
87
+ steps:
88
+ - uses: actions/checkout@v4
89
+ - uses: actions/setup-python@v5
90
+ with:
91
+ python-version: "3.13"
92
+ cache: pip
93
+ - run: pip install -e ".[dev,api]"
94
+ - run: pytest tests/test_api.py -q --tb=short
95
+
96
+ test-cli:
97
+ runs-on: ubuntu-latest
98
+ needs: [lint, typecheck]
99
+ steps:
100
+ - uses: actions/checkout@v4
101
+ - uses: actions/setup-python@v5
102
+ with:
103
+ python-version: "3.13"
104
+ cache: pip
105
+ - run: pip install -e ".[dev,cli]"
106
+ - run: pytest tests/test_cli_app.py -q --tb=short
107
+
108
+ test-explain:
109
+ runs-on: ubuntu-latest
110
+ needs: [lint, typecheck]
111
+ steps:
112
+ - uses: actions/checkout@v4
113
+ - uses: actions/setup-python@v5
114
+ with:
115
+ python-version: "3.13"
116
+ cache: pip
117
+ - run: pip install -e ".[dev,explain]"
118
+ - run: pytest tests/test_sdk.py tests/test_simple.py tests/test_explainability.py -q --tb=short
119
+
120
+ docker:
121
+ runs-on: ubuntu-latest
122
+ needs: [lint, typecheck, test]
123
+ steps:
124
+ - uses: actions/checkout@v4
125
+ - run: docker build -t phronesisml:test .
126
+ - run: docker run -d --name phronesisml-test -p 8000:8000 phronesisml:test
127
+ - name: Wait for health endpoint
128
+ run: |
129
+ for i in $(seq 1 30); do
130
+ if curl -sf http://localhost:8000/health > /dev/null 2>&1; then
131
+ echo "Health check passed on attempt $i"
132
+ exit 0
133
+ fi
134
+ echo "Attempt $i/30 failed, retrying in 1s..."
135
+ sleep 1
136
+ done
137
+ echo "Health check failed after 30 attempts"
138
+ exit 1
139
+ - name: Stop container
140
+ if: always()
141
+ run: docker stop phronesisml-test && docker rm phronesisml-test
142
+
143
+ docker-publish:
144
+ runs-on: ubuntu-latest
145
+ needs: [lint, typecheck, test, docker]
146
+ if: startsWith(github.ref, 'refs/tags/v')
147
+ steps:
148
+ - uses: actions/checkout@v4
149
+ - name: Log in to GitHub Container Registry
150
+ uses: docker/login-action@v3
151
+ with:
152
+ registry: ghcr.io
153
+ username: ${{ github.actor }}
154
+ password: ${{ secrets.GITHUB_TOKEN }}
155
+ - name: Extract tag name
156
+ id: tag
157
+ run: echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
158
+ - name: Build and push
159
+ uses: docker/build-push-action@v5
160
+ with:
161
+ context: .
162
+ push: true
163
+ tags: |
164
+ ghcr.io/${{ github.repository_owner }}/phronesisml:${{ steps.tag.outputs.version }}
165
+ ghcr.io/${{ github.repository_owner }}/phronesisml:latest
166
+
167
+ pypi-publish:
168
+ runs-on: ubuntu-latest
169
+ needs: [lint, typecheck, test]
170
+ if: startsWith(github.ref, 'refs/tags/v')
171
+ environment: pypi
172
+ permissions:
173
+ id-token: write
174
+ steps:
175
+ - uses: actions/checkout@v4
176
+ - uses: actions/setup-python@v5
177
+ with:
178
+ python-version: "3.13"
179
+ - run: pip install build
180
+ - run: python -m build
181
+ - name: Publish to PyPI
182
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,28 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.13"
20
+ cache: pip
21
+ - run: pip install -e ".[dev]" mkdocs-material "mkdocstrings[python]"
22
+ - run: mkdocs build --strict
23
+ - name: Deploy to GitHub Pages
24
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
25
+ run: |
26
+ git config user.name "github-actions[bot]"
27
+ git config user.email "github-actions[bot]@users.noreply.github.com"
28
+ mkdocs gh-deploy --force
@@ -0,0 +1,57 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ *.egg-info/
7
+ dist/
8
+ build/
9
+ *.egg
10
+
11
+ # Virtual environments
12
+ .venv/
13
+ venv/
14
+ ENV/
15
+
16
+ # IDE
17
+ .vscode/
18
+ .idea/
19
+ *.swp
20
+ *.swo
21
+ *~
22
+
23
+ # Testing
24
+ .pytest_cache/
25
+ .coverage
26
+ htmlcov/
27
+ .mypy_cache/
28
+ .ruff_cache/
29
+
30
+ # Environment
31
+ .env
32
+ .env.local
33
+
34
+ # OS
35
+ .DS_Store
36
+ Thumbs.db
37
+
38
+ # Jupyter
39
+ .ipynb_checkpoints/
40
+
41
+ # Distribution
42
+ *.tar.gz
43
+ *.whl
44
+
45
+ # MLflow
46
+ mlruns/
47
+ mlflow.db
48
+ mlartifacts/
49
+ phronesisml_artifacts/
50
+ Phronesis_artifacts/
51
+
52
+ # Database files
53
+ *.db
54
+ *.sqlite3
55
+
56
+ # MkDocs
57
+ site/
@@ -0,0 +1,16 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.11.13
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
8
+
9
+ - repo: https://github.com/pre-commit/pre-commit-hooks
10
+ rev: v4.6.0
11
+ hooks:
12
+ - id: trailing-whitespace
13
+ - id: end-of-file-fixer
14
+ - id: check-yaml
15
+ - id: check-added-large-files
16
+ args: ['--maxkb=10000']
@@ -0,0 +1,108 @@
1
+ # Changelog
2
+
3
+ All notable changes to PhronesisML will be documented in this file.
4
+
5
+ > **Note:** This project was formerly known as **AetherML** and published to PyPI as
6
+ > [`aetherml`](https://pypi.org/project/aetherml/). The `aetherml` package on PyPI is
7
+ > now **deprecated** — no new versions will be published there. Install the new package
8
+ > with `pip install phronesisml`.
9
+
10
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
11
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
12
+
13
+ ## [0.2.0] - 2026-07-13
14
+
15
+ ### Changed (Breaking)
16
+
17
+ - **Project renamed from AetherML to PhronesisML** — The package, CLI, Docker image,
18
+ and all public-facing names have been updated.
19
+ - **Package:** `pip install aetherml` → `pip install phronesisml`
20
+ - **Import:** `from aetherml import AetherML` → `from phronesisml import Phronesis`
21
+ - **CLI command:** `aetherml run` → `phronesisml run`
22
+ - **Docker image:** `ghcr.io/kartik00052/phronesisml`
23
+ - **GitHub repo:** `github.com/kartik00052/PhronesisML`
24
+ - **Class renames:**
25
+ - `AetherML` → `Phronesis`
26
+ - `AetherMLConfig` → `PhronesisConfig`
27
+ - `AetherMLError` → `PhronesisError`
28
+ - **PyPI deprecation:** The `aetherml` package on PyPI is deprecated. New versions will
29
+ only be published as `phronesisml`. Existing `aetherml` installs are unaffected but
30
+ will not receive further updates.
31
+
32
+ ---
33
+
34
+ The entries below document the project's history under its former name, **AetherML**.
35
+
36
+ ## [0.1.3] - 2026-07-13 *(as AetherML)*
37
+
38
+ ### Added
39
+
40
+ - **`py.typed` marker** (PEP 561) — Downstream users get proper type-checking support from mypy/pyright.
41
+ - **Dependabot config** — Automated weekly dependency-update PRs for pip and GitHub Actions.
42
+ - **Real CI/PyPI badges** in README — Dynamic shields linked to PyPI, GitHub Actions, and license.
43
+ - **Installation matrix** in README — Shows which extras enable which features.
44
+
45
+ ### Changed
46
+
47
+ - **Version bump to 0.1.3** — Fresh publish to validate Trusted Publisher pipeline end-to-end.
48
+
49
+ ## [0.1.2] - 2026-07-13 *(as AetherML)*
50
+
51
+ ### Added
52
+
53
+ - **PyPI Trusted Publishing** — CI now publishes to PyPI automatically on `v*` tags via GitHub OIDC (no API tokens stored in secrets).
54
+ - **PyPI CI publish job** — `pypi-publish` in `ci.yml` builds the wheel and pushes to PyPI using `pypa/gh-action-pypi-publish`.
55
+
56
+ ### Changed
57
+
58
+ - **`openpyxl` and `pyarrow` are now core dependencies** — Excel (.xlsx), Parquet, and Feather files work out of the box with `pip install aetherml`. No manual extra installs needed.
59
+ - **README installation section** rewritten with format support table, extras matrix, and clearer quick-start guidance.
60
+ - **Import error messages** in `pandas_engine.py`, `shap_explainer.py`, and `file_loader.py` updated to reference `pip install aetherml[explain]` instead of raw pip package names.
61
+
62
+ ### Removed
63
+
64
+ - **Stale manual extras** — Removed separate `[excel]` and `[parquet]` extras (now core). Cleaned up any leftover `[excel]`/`[parquet]` references from v0.1.0.
65
+
66
+ ## [0.1.0] - 2026-07-12 *(as AetherML)*
67
+
68
+ ### Added
69
+
70
+ - **AetherML class** — High-level SDK facade (`from aetherml import AetherML`) that wraps the full LangGraph pipeline behind method-chained calls (`ml.run()`, `ml.report()`, `ml.train()`). Every method returns typed result objects (`DatasetSummary`, `ValidationReport`, `ModelInfo`, etc.).
71
+ - **Simple API** — Zero-friction one-liner functions (`analyze()`, `train()`, `clean()`, `validate()`, `detect_target()`, `engineer()`, `select_model()`, `explain()`, `report()`) with `async` variants for FastAPI and Jupyter async contexts. Each returns a frozen dataclass with documented fields.
72
+ - **model_type parameter** — Pass `model_type="random_forest"` (or any supported model name) to `AetherML.train()`, `select_model()`, `train()`, or `train_async()` to skip model selection and train a specific model directly.
73
+ - **Incremental execution** — Call individual stages in any order; previously-executed stages are deduplicated and not re-run.
74
+ - **Async loop guard** — `_ensure_sync()` raises `RuntimeError` with a clear message if called from inside a running event loop (FastAPI, Jupyter async), preventing silent hangs.
75
+ - **Jupyter support** — `_repr_html_()` on the `AetherML` class renders a rich summary widget in notebooks.
76
+ - **Degenerate feature handling** — `FeatureEngineeringAgent` now gracefully handles zero-variance, all-null, and single-value columns without crashing, controlled by `FeatureSelectionConfig` (`variance_threshold`, `correlation_threshold`, `min_features`).
77
+ - **Structured exceptions** — `AetherMLError` hierarchy (`DataValidationError`, `EngineSelectionError`, `WorkflowError`, `ConfigurationError`) with structured fields for programmatic error handling.
78
+ - **FastAPI interface** — REST endpoints with multipart file upload, background job execution, job status polling, and OpenAPI docs (`pip install aetherml[api]`).
79
+ - **CLI interface** — Typer-based CLI (`aetherml run`, `aetherml info`) as a thin wrapper around the SDK (`pip install aetherml[cli]`).
80
+ - **PySpark engine** — Optional PySpark data engine for distributed/large-scale datasets (`pip install aetherml[spark]`).
81
+ - **SHAP explainability** — Optional SHAP-based feature importance and model explanation (`pip install aetherml[explain]`).
82
+ - **XGBoost support** — Optional XGBoost model family in the model selection candidate pool (`pip install aetherml[boost]`).
83
+ - **HTML report generation** — `AetherML.generate_report(format="html")` produces a self-contained HTML report.
84
+ - **CI/CD pipeline** — GitHub Actions workflow with lint (ruff), typecheck (mypy), tests (pytest across Python 3.11/3.12/3.13), API tests, CLI tests, explainability tests, Docker build, and GHCR image publishing on tagged releases.
85
+ - **Docker image** — Multi-stage Dockerfile producing a minimal production image, published to `ghcr.io/kartik00052/aetherml`.
86
+ - **Core dependencies required by default** — pandas, polars, numpy, scikit-learn, pydantic, langgraph, and joblib are always installed. Optional extras: `[api]`, `[cli]`, `[spark]`, `[explain]`, `[boost]`, `[mlflow]`.
87
+ - **`python-multipart` in API extras** — Required by FastAPI for file upload parsing; added to the `[api]` extra.
88
+
89
+ ### Changed
90
+
91
+ - **SDK-first architecture** — CLI and FastAPI are now thin clients that delegate entirely to the SDK; no business logic lives outside the SDK.
92
+ - **WorkflowState** — Expanded to 11 typed fields covering every pipeline stage; agents read/write through this shared state.
93
+ - **`__init__.py` exports** — All public API symbols (Simple API functions, OOP API classes, Advanced API types) are exported from the top-level `aetherml` package.
94
+ - **Mypy strictness** — Enabled `strict = true` with `python_version = "3.13"` and per-module overrides for FastAPI/Typer decorator types.
95
+
96
+ ### Fixed
97
+
98
+ - **pyproject.toml `[project.urls]` placement** — Moved after `dependencies` to resolve build-system warnings.
99
+ - **GHCR image name casing** — Lowercased to `kartik00052/aetherml` to comply with GitHub Container Registry's all-lowercase requirement.
100
+ - **CI test isolation** — `conftest.py` uses `collect_ignore` to skip `test_api.py` and `test_cli_app.py` when FastAPI/Typer are not installed.
101
+
102
+ ### Known Limitations
103
+
104
+ - **PDF reports** — `generate_report(format="pdf")` raises `NotImplementedError`. Only Markdown and HTML are supported.
105
+ - **Clustering** — The pipeline is designed for supervised learning (classification/regression). Unsupervised tasks (clustering, dimensionality reduction) are not yet supported.
106
+ - **Time-series** — No special handling for temporal features, forecasting, or time-based train/test splits.
107
+ - **Plugin system** — The `plugins/` directory and entry-points-based discovery mechanism are planned but not yet implemented.
108
+ - **Additional storage backends** — Only local filesystem storage is implemented. S3/GCS/Azure Blob backends are planned.
@@ -0,0 +1,52 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to a positive environment:
15
+
16
+ - Using welcoming and inclusive language
17
+ - Being respectful of differing viewpoints and experiences
18
+ - Gracefully accepting constructive criticism
19
+ - Focusing on what is best for the community
20
+ - Showing empathy towards other community members
21
+
22
+ Examples of unacceptable behavior:
23
+
24
+ - Trolling, insulting/derogatory comments, and personal or political attacks
25
+ - Public or private harassment
26
+ - Publishing others' private information without explicit permission
27
+ - Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of
33
+ acceptable behavior and will take appropriate and fair corrective action in
34
+ response to any behavior that they deem inappropriate, threatening, offensive,
35
+ or harmful.
36
+
37
+ ## Scope
38
+
39
+ This Code of Conduct applies within all community spaces, and also applies when
40
+ an individual is officially representing the community in public spaces.
41
+
42
+ ## Enforcement
43
+
44
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
45
+ reported to the project maintainer at kartiksharma18852@gmail.com. All
46
+ complaints will be reviewed and investigated promptly and fairly.
47
+
48
+ ## Attribution
49
+
50
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
51
+ version 2.0, available at
52
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.