Skip to content

Migrate to oa-configurator 1.0 - #26

Draft
nicoloesch wants to merge 3 commits into
mainfrom
refactor-oa-config
Draft

Migrate to oa-configurator 1.0#26
nicoloesch wants to merge 3 commits into
mainfrom
refactor-oa-config

Conversation

@nicoloesch

@nicoloesch nicoloesch commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Depends on: oa-configurator. , must merge and publish first. This PR bumps pyproject.toml's oa-configurator pin from ==0.1.2 to whatever the published 1.0 version is (currently a # TODO marker in the diff, deliberately left unbumped pending publish).

Summary

  • Migrate OrmLoaderConfig off the removed ResourceRef/ResourceSpec/test_resources shape: no PackageConfigBase.get_engine() scaffolding needed since orm-loader owns no production database resources.
  • Adds orm-loader's first-ever RefTo field: test_orm_db: Annotated[str | None, RefTo(DatabaseConfig, is_test=True)] = None. Replaces the old TEST_DB ClassVar, which named a test database with nothing backing it.
  • tests/conftest.py: resolve_test_resource(OrmLoaderConfig.TEST_DB)resolve_test_database(OrmLoaderConfig, "test_orm_db") (explicit field name, no auto-discovery).
  • tests/loaders/test_pg_loader.py: @pytest.mark.requires_resource(OrmLoaderConfig.TEST_DB)@pytest.mark.requires_database("test_orm_db") (17 call sites).
    • requires_database takes a plain string; pytest markers are collection-time-evaluated, so a field reference isn't possible there.
    • A stale/renamed string fails loudly via resolve_database, not silently. See oa-configurator's own PR, "Test-database wiring," for the full reasoning.
  • pyproject.toml: added # TODO: bump to >=1.0.0,<2.0.0 once oa-configurator 1.0 is published markers on both the main and dev oa-configurator pins.

Relationship to open PRs and issues

@nicoloesch nicoloesch added the breaking Incompatible API change. MAJOR: x+1.y.z label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Incompatible API change. MAJOR: x+1.y.z

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Relax oa-configurator pin to a semver range

1 participant