Use reference URLs for resource visuals - #7
Merged
Conversation
ewlarson
force-pushed
the
feature/reference-visuals-from-dct-references
branch
from
June 12, 2026 13:52
7290bd2 to
44d3405
Compare
ewlarson
force-pushed
the
feature/reference-visuals-from-dct-references
branch
from
June 12, 2026 14:08
44d3405 to
185af60
Compare
ewlarson
marked this pull request as ready for review
June 12, 2026 14:15
ewlarson
added a commit
that referenced
this pull request
Aug 21, 2026
…t-references Use reference URLs for resource visuals
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
dct_references_shttp://schema.org/thumbnailUrl/https://schema.org/thumbnailUrlas a fallback thumbnail source only when no distribution-derived thumbnail source is present.hasMapvalues first, then legacydct_references_shttp://schema.org/hasMap/https://schema.org/hasMap, before falling through to generated static-map or placeholder/default behavior.Validation
BTAA_SKIP_TEST_DB=1 python -m pytest backend/tests/services/test_static_map_service.py::test_external_static_map_url_reads_schema_has_map_from_dct_references_string backend/tests/services/test_static_map_service.py::test_external_static_map_url_accepts_https_schema_has_map_dict_value backend/tests/services/test_static_map_service.py::test_external_static_map_url_prefers_distribution_has_map_over_dct_references backend/tests/services/test_static_map_service.py::test_external_static_map_url_ignores_non_http_has_map_values backend/tests/services/test_image_service.py::TestImageServiceThumbnailSourceURL::test_get_thumbnail_source_url_prefers_distribution_thumbnail_over_dct_references backend/tests/services/test_image_service.py::TestImageServiceThumbnailURL::test_get_thumbnail_source_url_checks_dct_references_when_distributions_exist backend/tests/api/v1/test_static_map_endpoints.py::TestResourceStaticMapEndpoint::test_resource_static_map_uses_schema_has_map_before_generated_alias backend/tests/api/v1/test_static_map_endpoints.py::TestResourceStaticMapEndpoint::test_resource_static_map_latest_alias_redirects_when_no_schema_has_map backend/tests/api/v1/test_static_map_endpoints.py::TestResourceStaticMapEndpoint::test_resource_static_map_no_cache_uses_schema_has_map backend/tests/api/v1/test_resource_presenter.py::test_resource_presenter_static_map_uses_schema_has_map_without_geometry backend/tests/api/v1/test_resource_presenter.py::test_resource_presenter_static_map_prefers_distribution_has_map_over_legacy_reference backend/tests/api/v1/test_utils.py::TestHotVisualAssetUrls::test_reference_static_map_url_uses_schema_has_map_without_geometry backend/tests/api/v1/test_utils.py::TestHotVisualAssetUrls::test_reference_static_map_url_prefers_distribution_has_map_over_legacy_referencepython -m ruff check backend/app/services/static_map_service.py backend/app/services/image_service.py backend/app/api/v1/endpoint_modules/resources/static_map.py backend/app/api/v1/utils.py backend/app/api/v1/presenters/resource.py backend/tests/services/test_static_map_service.py backend/tests/services/test_image_service.py backend/tests/api/v1/test_static_map_endpoints.py backend/tests/api/v1/test_resource_presenter.py backend/tests/api/v1/test_utils.pypython -m py_compile backend/app/services/static_map_service.py backend/app/services/image_service.py backend/app/api/v1/endpoint_modules/resources/static_map.py backend/app/api/v1/utils.py backend/app/api/v1/presenters/resource.pygit diff --check -- backend/app/services/static_map_service.py backend/app/services/image_service.py backend/app/api/v1/endpoint_modules/resources/static_map.py backend/app/api/v1/utils.py backend/app/api/v1/presenters/resource.py backend/tests/services/test_static_map_service.py backend/tests/services/test_image_service.py backend/tests/api/v1/test_static_map_endpoints.py backend/tests/api/v1/test_resource_presenter.py backend/tests/api/v1/test_utils.pyNote: the broader focused suite reached
164 passedand then failed 5 existing image-service tests because sandboxed Redis access tolocalhost:6380was denied withOperation not permitted; the new static-map endpoint/presenter/util tests passed in that run.