Skip to content

feat(python-sdk): python SDK scaffold#37

Merged
czi-fsisenda merged 16 commits into
mainfrom
fsisenda/sdk_python_scaffold
May 14, 2026
Merged

feat(python-sdk): python SDK scaffold#37
czi-fsisenda merged 16 commits into
mainfrom
fsisenda/sdk_python_scaffold

Conversation

@czi-fsisenda
Copy link
Copy Markdown
Contributor

Summary

Jira:

Scaffold for evaluators for the Python sdk

  • package setup
  • abstract base class for all evaluators and supporting types
  • using langchain to call LLMs
  • abstracts: input validation, logging, metadata, etc
  • unit tests

Test Plan

  • Wrote automated tests
  • Manually tested my changes, and here are the details:

@czi-fsisenda czi-fsisenda changed the title feat: python SDK scaffold feat(python-sdk): python SDK scaffold Apr 30, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread sdks/python/src/learning_commons_evaluators/settings/load_settings.py Outdated
Comment thread sdks/python/src/learning_commons_evaluators/settings/load_settings.py Outdated
Comment thread sdks/python/src/learning_commons_evaluators/evaluators/base.py Outdated
Comment thread sdks/python/src/learning_commons_evaluators/evaluators/base.py Outdated
Comment thread sdks/python/Makefile Outdated
Comment thread sdks/python/README.md
Comment thread sdks/python/README.md
Comment thread sdks/python/src/learning_commons_evaluators/evaluators/base.py
Comment thread sdks/python/src/learning_commons_evaluators/schemas/config.py Outdated
Comment thread sdks/python/src/learning_commons_evaluators/schemas/config.py Outdated
Comment thread sdks/python/src/learning_commons_evaluators/schemas/config.py
Comment thread sdks/python/src/learning_commons_evaluators/schemas/config.py
Comment thread sdks/python/src/learning_commons_evaluators/schemas/errors.py
Comment thread sdks/python/src/learning_commons_evaluators/evaluators/base.py
Comment thread sdks/python/src/learning_commons_evaluators/schemas/metadata.py
Comment thread sdks/python/src/learning_commons_evaluators/schemas/metadata.py
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 44 out of 45 changed files in this pull request and generated 5 comments.

Comment thread sdks/python/tests/schemas/test_input_specs.py
Comment thread sdks/python/src/learning_commons_evaluators/evaluators/base.py
Comment thread sdks/python/src/learning_commons_evaluators/schemas/evaluator.py Outdated
Comment thread sdks/python/src/learning_commons_evaluators/logger.py Outdated
Comment thread sdks/python/src/learning_commons_evaluators/settings/load_settings.py Outdated
Copy link
Copy Markdown
Contributor

@adnanrhussain adnanrhussain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. thank you for iterating

@czi-fsisenda czi-fsisenda merged commit 0e49a5d into main May 14, 2026
9 checks passed
@czi-fsisenda czi-fsisenda deleted the fsisenda/sdk_python_scaffold branch May 14, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants