Skip to content

[ENHANCEMENT] Add title fields to STAC catalogs/collections#62

Merged
John McCall (lowlydba) merged 6 commits into
mainfrom
50-bug-best-practice---links-in-catalogscollections-should-include-a-title-field
May 14, 2026
Merged

[ENHANCEMENT] Add title fields to STAC catalogs/collections#62
John McCall (lowlydba) merged 6 commits into
mainfrom
50-bug-best-practice---links-in-catalogscollections-should-include-a-title-field

Conversation

@lowlydba

@lowlydba John McCall (lowlydba) commented May 13, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Set title attributes on STAC Catalog and Collection objects so generated child links include a title.
  • Pass the title when adding child collections to ensure link.title is populated.
  • Add a unit test to verify theme and child collection titles are present, and add a title to the overture releases catalog in the CLI.

Validation

Before, when run on main, we see this in the stac-check output:

 Asset 1: tests/data/catalog.json

CATALOG Passed: True

Schemas checked: 
    https://schemas.stacspec.org/v1.1.0/catalog-spec/json-schema/catalog.json



 STAC Best Practices: 

Links in catalogs and collections should always have a 'title' field

And now, this is no longer flagged by stac-check in CI. Our staging build of the catalog also shows that title is populated now in all uses of link (prior was just some):

# https://staging.overturemaps.org/stac/pr/62/catalog.json
{
  "type": "Catalog",
  "id": "Overture Releases",
  "stac_version": "1.1.0",
  "description": "All Overture Releases",
  "links": [
    {
      "rel": "root",
      "href": "./catalog.json",
      "type": "application/json",
+     "title": "Overture Releases"
    },
    {
      "rel": "child",
      "href": "./2026-04-15.0/catalog.json",
      "type": "application/json",
      "title": "Latest Overture Release",
      "latest": true
    },
    {
      "rel": "child",
      "href": "./2026-03-18.0/catalog.json",
      "type": "application/json",
      "title": "2026-03-18.0 Overture Release"
    }
  ],

Set title attributes on STAC Catalog and Collection objects so generated child links include a title. Pass the title when adding child collections to ensure link.title is populated. Add a unit test to verify theme and child collection titles are present, and add a title to the overture releases catalog in the CLI.

Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown

🗺️ OMF STAC preview is live!

📦 Catalog https://staging.overturemaps.org/stac/pr/62/catalog.json
🕐 Updated May 13, 2026 20:40 UTC
📝 Commit 71f9627

Note

♻️ This preview updates automatically with each push to this PR.

Set the title field on the root Catalog in tests to match the CLI structure and ensure the catalog has a title during test setup.

Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds title fields to STAC Catalog/Collection objects and child links so generated catalogs comply with the STAC best practice flagged by stac-check.

Changes:

  • Set title on theme Catalog, type Collection, and the root "Overture Releases" catalog (in both CLI and test setup).
  • Pass title=type_name when calling theme_catalog.add_child(...) so child links have a populated title.
  • Add a unit test verifying titles are present on the theme catalog, child collection, and child links.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/overture_stac/overture_stac.py Adds title to theme catalog and type collection; passes title when adding child.
src/overture_stac/cli.py Adds title="Overture Releases" to the root catalog.
tests/setup_test_catalog.py Mirrors the root-catalog title change for the test catalog.
tests/test_process_theme_worker.py Adds test_child_links_have_titles; inadvertently removes the TestBuildReleaseCatalog class declaration.
uv.lock Bumps overture-stac version to 1.0.7.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_process_theme_worker.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: John McCall <john@lowlydba.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@lowlydba John McCall (lowlydba) merged commit 27163a0 into main May 14, 2026
15 checks passed
@lowlydba John McCall (lowlydba) deleted the 50-bug-best-practice---links-in-catalogscollections-should-include-a-title-field branch May 14, 2026 13:27
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.

[BUG] Best Practice - Links in catalogs/collections should include a title field

3 participants