Skip to content

feat: per-resource license, license_url, source, source_url in table metadata#8

Open
houfu wants to merge 1 commit into
mainfrom
feat/per-resource-license-fields
Open

feat: per-resource license, license_url, source, source_url in table metadata#8
houfu wants to merge 1 commit into
mainfrom
feat/per-resource-license-fields

Conversation

@houfu
Copy link
Copy Markdown
Collaborator

@houfu houfu commented May 14, 2026

Summary

  • Adds license, license_url, source, and source_url to the datasette_fields allowlist in ZeekerProject.to_datasette_metadata()
  • These fields are already supported by Datasette at the table level but were silently dropped during metadata generation
  • Adds tests covering both the field pass-through and the case where no license fields are set

Motivation

Multi-source projects (e.g. sg-gov-newsrooms with 8 agencies each under different Terms of Use) need per-table licensing. The project-level license_url can only name one agency's ToU. With this change, any resource in zeeker.toml can set its own license and license_url and they will appear in the generated Datasette metadata.

Test plan

  • uv run pytest packages/zeeker/tests/test_project.py::TestZeekerProjectToDatasette — two new tests, both should pass
  • Existing test suite passes unchanged

🤖 Generated with Claude Code

…source table metadata

Multi-source projects (e.g. a db collecting from 8 different agencies) need
per-table licensing — the project-level license can only hold one value.
Datasette's metadata format supports these fields at the table level;
zeeker's datasette_fields allowlist simply didn't include them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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