Skip to content

Extract resource presenter#255

Merged
ewlarson merged 1 commit into
developfrom
feature/resource-presenter
May 23, 2026
Merged

Extract resource presenter#255
ewlarson merged 1 commit into
developfrom
feature/resource-presenter

Conversation

@ewlarson
Copy link
Copy Markdown
Contributor

Summary

  • Add a ResourcePresenter and ResourceHydrationContext for resource JSON:API serialization and enrichments.
  • Keep existing app.api.v1.utils entry points as compatibility wrappers around the presenter.
  • Add contract-style tests for full/detail, search-result hydration, and homepage resource profiles.

Validation

  • BTAA_SKIP_TEST_DB=1 venv/bin/python -m pytest tests/api/v1/test_resource_presenter.py tests/api/v1/test_utils.py (58 passed)
  • venv/bin/ruff check app/api/v1/presenters app/api/v1/utils.py tests/api/v1/test_resource_presenter.py
  • git diff --check

Notes

  • A normal DB-backed focused run failed during local test DB setup because distribution_types.name=wmts already exists in the local test database.
  • Endpoint compatibility tests with DB bootstrap skipped reached 37 passed / 3 skipped before tests using async_client attempted sandbox-blocked Postgres connections.

Comment thread backend/app/api/v1/presenters/resource.py Fixed
@ewlarson ewlarson force-pushed the feature/resource-presenter branch from 6c2a41d to aa0dee6 Compare May 22, 2026 23:56
@ewlarson ewlarson force-pushed the feature/resource-presenter branch from aa0dee6 to c8da719 Compare May 22, 2026 23:58
@ewlarson ewlarson marked this pull request as ready for review May 23, 2026 00:06
@ewlarson ewlarson merged commit 3729294 into develop May 23, 2026
12 checks passed
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