feat(python-sdk): python SDK scaffold#37
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces an initial scaffold for the learning-commons-evaluators Python SDK, including core schema/config/error types, a base evaluator abstraction, LangChain-backed provider integration, settings loading utilities, and a pytest-based test suite with CI wiring.
Changes:
- Add core SDK modules (schemas, base evaluator, logging utilities, provider factory, settings loader) and package-level re-exports.
- Add unit tests for public imports, config/errors/schemas, logging, and LangChain provider behavior.
- Add Python SDK packaging + developer tooling (pyproject, Makefile, README) and a GitHub Actions workflow to run
make verify.
Reviewed changes
Copilot reviewed 40 out of 41 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| sdks/python/tests/test_package_imports.py | Smoke tests for package-level import surface. |
| sdks/python/tests/test_logger.py | Unit tests for SDK logging helpers and formatting. |
| sdks/python/tests/settings/init.py | Test package marker for settings tests. |
| sdks/python/tests/schemas/test_text_complexity.py | Tests for text complexity schema types. |
| sdks/python/tests/schemas/test_metadata.py | Tests for metadata models and helpers. |
| sdks/python/tests/schemas/test_input_specs.py | Tests for input spec registry + discriminated union behavior. |
| sdks/python/tests/schemas/test_errors.py | Tests for error hierarchy and provider-error wrapping. |
| sdks/python/tests/schemas/test_config.py | Tests for config dataclasses and factory functions. |
| sdks/python/tests/schemas/test_common_inputs.py | Tests for common input fields and validation. |
| sdks/python/tests/schemas/init.py | Test package marker for schemas tests. |
| sdks/python/tests/providers/test_langchain.py | Tests for LangChain provider factory and token usage extraction. |
| sdks/python/tests/providers/init.py | Test package marker for providers tests. |
| sdks/python/tests/evaluators/init.py | Test package marker for evaluators tests. |
| sdks/python/tests/conftest.py | Shared pytest fixtures for schemas and config. |
| sdks/python/tests/init.py | Test package marker for SDK tests. |
| sdks/python/src/learning_commons_evaluators/settings/load_settings.py | TOML settings loading/parsing utilities and result wrapper. |
| sdks/python/src/learning_commons_evaluators/settings/init.py | Settings package documentation and purpose. |
| sdks/python/src/learning_commons_evaluators/schemas/text_complexity.py | Shared schemas for text complexity-related evaluators. |
| sdks/python/src/learning_commons_evaluators/schemas/metadata.py | Evaluation metadata models, enums, token usage, step metadata. |
| sdks/python/src/learning_commons_evaluators/schemas/input_specs.py | Input spec models + registry + discriminated union. |
| sdks/python/src/learning_commons_evaluators/schemas/evaluator.py | Core evaluator input/output schema abstractions and validation helpers. |
| sdks/python/src/learning_commons_evaluators/schemas/errors.py | SDK error hierarchy and provider-error mapping. |
| sdks/python/src/learning_commons_evaluators/schemas/config.py | Provider configs, evaluator config, prompt settings, and factories. |
| sdks/python/src/learning_commons_evaluators/schemas/common_inputs.py | Concrete input field types (text, grade) with validation + safe metadata. |
| sdks/python/src/learning_commons_evaluators/schemas/init.py | Schemas subpackage exports. |
| sdks/python/src/learning_commons_evaluators/py.typed | Marks package as typed for type checkers. |
| sdks/python/src/learning_commons_evaluators/providers/langchain.py | LangChain chat model factory + token usage extraction. |
| sdks/python/src/learning_commons_evaluators/providers/init.py | Provider subpackage exports. |
| sdks/python/src/learning_commons_evaluators/logger.py | Library-friendly logging utilities and helpers. |
| sdks/python/src/learning_commons_evaluators/evaluators/base.py | Base evaluator implementation (validation, logging, step execution, prompt chain steps). |
| sdks/python/src/learning_commons_evaluators/evaluators/init.py | Evaluators subpackage exports. |
| sdks/python/src/learning_commons_evaluators/errors.py | Package-level error re-exports. |
| sdks/python/src/learning_commons_evaluators/config.py | Package-level config re-exports. |
| sdks/python/src/learning_commons_evaluators/_version.py | Centralized version/description lookup. |
| sdks/python/src/learning_commons_evaluators/init.py | Top-level public API exports for the SDK. |
| sdks/python/pyproject.toml | Packaging metadata, deps, Ruff/Mypy config, pytest settings. |
| sdks/python/README.md | SDK documentation, usage examples, dev workflow notes. |
| sdks/python/Makefile | Local/CI commands for lint/format/typecheck/tests. |
| sdks/python/.gitignore | Python SDK local ignores (venv, build, cache). |
| .github/workflows/test-sdk-python.yml | CI workflow to run Python SDK verification. |
| .gitattributes | Marks generated settings/contract files as generated for GitHub diff UX. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adnanrhussain
requested changes
May 4, 2026
…anch when I split the PR using AI
adnanrhussain
approved these changes
May 12, 2026
Contributor
adnanrhussain
left a comment
There was a problem hiding this comment.
lgtm. thank you for iterating
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Jira:
Scaffold for evaluators for the Python sdk
Test Plan