predikit 0.5.1__tar.gz → 0.5.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.
Files changed (53) hide show
  1. {predikit-0.5.1 → predikit-0.5.2}/.claude/settings.local.json +3 -1
  2. predikit-0.5.2/.gitattributes +1 -0
  3. {predikit-0.5.1 → predikit-0.5.2}/.github/workflows/test.yml +5 -0
  4. {predikit-0.5.1 → predikit-0.5.2}/CHANGELOG.md +10 -0
  5. {predikit-0.5.1 → predikit-0.5.2}/PKG-INFO +1 -1
  6. {predikit-0.5.1 → predikit-0.5.2}/pyproject.toml +2 -2
  7. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/__init__.py +1 -1
  8. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/loaders/snowflake.py +1 -1
  9. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/tool.py +2 -2
  10. {predikit-0.5.1 → predikit-0.5.2}/tests/test_loaders_snowflake.py +4 -0
  11. {predikit-0.5.1 → predikit-0.5.2}/tests/test_registry.py +13 -0
  12. {predikit-0.5.1 → predikit-0.5.2}/uv.lock +1 -1
  13. {predikit-0.5.1 → predikit-0.5.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  14. {predikit-0.5.1 → predikit-0.5.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  15. {predikit-0.5.1 → predikit-0.5.2}/.github/workflows/publish.yml +0 -0
  16. {predikit-0.5.1 → predikit-0.5.2}/.gitignore +0 -0
  17. {predikit-0.5.1 → predikit-0.5.2}/.pre-commit-config.yaml +0 -0
  18. {predikit-0.5.1 → predikit-0.5.2}/CLAUDE.md +0 -0
  19. {predikit-0.5.1 → predikit-0.5.2}/CONTRIBUTING.md +0 -0
  20. {predikit-0.5.1 → predikit-0.5.2}/LICENSE +0 -0
  21. {predikit-0.5.1 → predikit-0.5.2}/README.md +0 -0
  22. {predikit-0.5.1 → predikit-0.5.2}/docs/logo.gif +0 -0
  23. {predikit-0.5.1 → predikit-0.5.2}/docs/logo.png +0 -0
  24. {predikit-0.5.1 → predikit-0.5.2}/examples/01_basic_sklearn.py +0 -0
  25. {predikit-0.5.1 → predikit-0.5.2}/examples/02_xgboost_regression.py +0 -0
  26. {predikit-0.5.1 → predikit-0.5.2}/examples/03_orlando_real_estate.py +0 -0
  27. {predikit-0.5.1 → predikit-0.5.2}/examples/04_confidence_routing.py +0 -0
  28. {predikit-0.5.1 → predikit-0.5.2}/examples/05_multi_model_ensemble.py +0 -0
  29. {predikit-0.5.1 → predikit-0.5.2}/examples/06_mlflow_loader.py +0 -0
  30. {predikit-0.5.1 → predikit-0.5.2}/examples/07_snowflake_loader.py +0 -0
  31. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/cli.py +0 -0
  32. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/coerce.py +0 -0
  33. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/ensemble.py +0 -0
  34. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/exceptions.py +0 -0
  35. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/exporters/__init__.py +0 -0
  36. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/exporters/langchain.py +0 -0
  37. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/exporters/openai.py +0 -0
  38. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/introspect.py +0 -0
  39. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/loaders/__init__.py +0 -0
  40. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/loaders/mlflow.py +0 -0
  41. {predikit-0.5.1 → predikit-0.5.2}/src/predikit/registry.py +0 -0
  42. {predikit-0.5.1 → predikit-0.5.2}/tests/__init__.py +0 -0
  43. {predikit-0.5.1 → predikit-0.5.2}/tests/test_cli.py +0 -0
  44. {predikit-0.5.1 → predikit-0.5.2}/tests/test_coerce.py +0 -0
  45. {predikit-0.5.1 → predikit-0.5.2}/tests/test_confidence.py +0 -0
  46. {predikit-0.5.1 → predikit-0.5.2}/tests/test_ensemble.py +0 -0
  47. {predikit-0.5.1 → predikit-0.5.2}/tests/test_exporters_langchain.py +0 -0
  48. {predikit-0.5.1 → predikit-0.5.2}/tests/test_exporters_openai.py +0 -0
  49. {predikit-0.5.1 → predikit-0.5.2}/tests/test_introspect.py +0 -0
  50. {predikit-0.5.1 → predikit-0.5.2}/tests/test_loaders_mlflow.py +0 -0
  51. {predikit-0.5.1 → predikit-0.5.2}/tests/test_logging.py +0 -0
  52. {predikit-0.5.1 → predikit-0.5.2}/tests/test_tool.py +0 -0
  53. {predikit-0.5.1 → predikit-0.5.2}/tests/test_weighted_ensemble.py +0 -0
@@ -25,7 +25,9 @@
25
25
  "Bash(./.venv/Scripts/python.exe -m ruff format --check src/ tests/)",
26
26
  "Bash(./.venv/Scripts/python.exe -m mypy src/predikit)",
27
27
  "Bash(git stash *)",
28
- "Bash(./.venv/Scripts/python.exe -m pytest -q)"
28
+ "Bash(./.venv/Scripts/python.exe -m pytest -q)",
29
+ "Bash(./.venv/Scripts/python.exe -c \"import numpy; print\\(numpy.__version__\\); print\\(numpy.__file__\\)\")",
30
+ "Bash(./.venv/Scripts/python.exe -m mypy --version)"
29
31
  ],
30
32
  "additionalDirectories": [
31
33
  "C:\\AI\\predikit"
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -31,6 +31,11 @@ jobs:
31
31
  - name: Mypy
32
32
  run: mypy src/predikit
33
33
 
34
+ - name: Build package
35
+ run: |
36
+ python -m pip install hatchling
37
+ python -m hatchling build
38
+
34
39
  test:
35
40
  runs-on: ubuntu-latest
36
41
  strategy:
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.5.2] - 2026-08-01
10
+
11
+ ### Fixed
12
+ - Repaired the development lockfile so `uv` can resolve the pinned Colorama artifact.
13
+ - Added repository-wide LF line-ending normalization so Ruff formatting is stable across platforms.
14
+
15
+ ### Added
16
+ - Regression coverage for invalid Snowflake output methods and duplicate registry names.
17
+ - CI package-build verification to catch release artifacts that cannot be built.
18
+
9
19
  ## [0.5.1] - 2026-07-21
10
20
 
11
21
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: predikit
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Wrap any trained sklearn/XGBoost model as an LLM-callable tool: auto-generated JSON schemas, Pydantic I/O, OpenAI & LangChain ready, zero boilerplate.
5
5
  Project-URL: Homepage, https://github.com/Tejas-TA/predikit
6
6
  Project-URL: Repository, https://github.com/Tejas-TA/predikit
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "predikit"
7
- version = "0.5.1"
7
+ version = "0.5.2"
8
8
  description = "Wrap any trained sklearn/XGBoost model as an LLM-callable tool: auto-generated JSON schemas, Pydantic I/O, OpenAI & LangChain ready, zero boilerplate."
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -89,7 +89,7 @@ ignore = ["E501"]
89
89
  known-first-party = ["predikit"]
90
90
 
91
91
  [tool.mypy]
92
- python_version = "3.10"
92
+ python_version = "3.12"
93
93
  warn_return_any = true
94
94
  warn_unused_configs = true
95
95
  ignore_missing_imports = true
@@ -4,4 +4,4 @@ from .registry import ToolRegistry
4
4
  from .tool import ModelTool
5
5
 
6
6
  __all__ = ["ModelTool", "ToolRegistry", "ModelEnsemble", "LowConfidenceError"]
7
- __version__ = "0.5.1"
7
+ __version__ = "0.5.2"
@@ -14,7 +14,7 @@ except ImportError:
14
14
 
15
15
 
16
16
  class _SnowflakeShim:
17
- """Wraps a Snowflake Model Registry model to look like an sklearn estimator."""
17
+ """Wrap a Snowflake Model Registry model as an sklearn estimator."""
18
18
 
19
19
  def __init__(
20
20
  self, sf_model: Any, output_method: str = "predict", classes: list | None = None
@@ -5,7 +5,7 @@ import time
5
5
  import warnings
6
6
  from collections.abc import Callable
7
7
  from types import UnionType
8
- from typing import Any, Union, get_args, get_origin
8
+ from typing import Any, Union, cast, get_args, get_origin
9
9
 
10
10
  import numpy as np
11
11
  from pydantic import BaseModel
@@ -180,7 +180,7 @@ class ModelTool:
180
180
 
181
181
  def _scalar_type(annotation: Any) -> type | None:
182
182
  if annotation in _SCALAR_TYPES:
183
- return annotation
183
+ return cast(type, annotation)
184
184
 
185
185
  if get_origin(annotation) in (Union, UnionType):
186
186
  args = [arg for arg in get_args(annotation) if arg is not _NONE_TYPE]
@@ -25,6 +25,10 @@ class MemberInput(BaseModel):
25
25
 
26
26
 
27
27
  class TestSnowflakeShim:
28
+ def test_invalid_output_method_raises(self):
29
+ with pytest.raises(AttributeError, match="no callable method"):
30
+ _SnowflakeShim(MagicMock(spec=["predict"]), output_method="score")
31
+
28
32
  def test_predict_calls_correct_method(self):
29
33
  mock_model = MagicMock()
30
34
  mock_model.predict.return_value = np.array([1])
@@ -87,3 +87,16 @@ def test_duplicate_tool_names_raise():
87
87
  )
88
88
  with pytest.raises(ValueError, match="Duplicate"):
89
89
  ToolRegistry([tool_a, tool_b])
90
+
91
+
92
+ def test_duplicate_tool_and_ensemble_names_raise(registry):
93
+ tool = registry.get("iris_classifier")
94
+ ensemble = ModelEnsemble(
95
+ tools=[tool],
96
+ name=tool.name,
97
+ description="Duplicate name",
98
+ strategy="vote",
99
+ )
100
+
101
+ with pytest.raises(ValueError, match="Duplicate"):
102
+ ToolRegistry([tool], ensembles=[ensemble])
@@ -560,7 +560,7 @@ wheels = [
560
560
 
561
561
  [[package]]
562
562
  name = "colorama"
563
- version = "0.5.0"
563
+ version = "0.4.6"
564
564
  source = { registry = "https://pypi.org/simple" }
565
565
  sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
566
566
  wheels = [
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