Skip to content

Add catalog interface tests and InMemoryCatalog example#30

Merged
rustyconover merged 2 commits into
mainfrom
feature/catalog-tests
Jan 6, 2026
Merged

Add catalog interface tests and InMemoryCatalog example#30
rustyconover merged 2 commits into
mainfrom
feature/catalog-tests

Conversation

@rustyconover

Copy link
Copy Markdown
Contributor

Summary

  • Add comprehensive test suite for catalog interface
  • Add InMemoryCatalog example implementation with entry point

Test Files (tests/catalog/)

  • test_serialization.py: Round-trip tests for all catalog dataclasses (CatalogAttachResult, SchemaInfo, TableInfo, ViewInfo, FunctionInfo, ScanFunctionResult)
  • test_catalog_interface.py: Tests for CatalogInterface ABC, default implementations, and ReadOnlyCatalogInterface DDL rejection
  • test_integration.py: End-to-end tests using InMemoryCatalog

InMemoryCatalog (vgi/examples/catalog.py)

  • In-memory catalog implementation for testing
  • Uses Python dictionaries for storage
  • Supports DDL operations (create/drop/rename for schemas, tables, views)
  • UUID-based attach_id generation
  • Catalog versioning incremented on modifications
  • Entry point: vgi-example-catalog-worker

Test Coverage

  • 85 new tests for catalog functionality
  • All 745 tests pass

Test plan

  • All 745 tests pass
  • mypy passes with no issues
  • ruff check and format pass

🤖 Generated with Claude Code

rustyconover and others added 2 commits January 5, 2026 20:11
This PR adds comprehensive tests for the catalog interface and includes
the InMemoryCatalog example implementation:

Tests (tests/catalog/):
- test_serialization.py: Round-trip tests for all catalog dataclasses
- test_catalog_interface.py: Tests for CatalogInterface ABC and
  ReadOnlyCatalogInterface DDL rejection
- test_integration.py: End-to-end tests using InMemoryCatalog for
  catalog operations (attach/detach, schemas, tables, views, versioning)

InMemoryCatalog (vgi/examples/catalog.py):
- In-memory catalog implementation for testing
- Supports DDL operations (create/drop/rename for schemas, tables, views)
- UUID-based attach_id generation
- Catalog versioning on modifications
- Entry point: vgi-example-catalog-worker

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rustyconover rustyconover merged commit 21ab151 into main Jan 6, 2026
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.

1 participant