Read-only mirror of https://github.com/opendatabs/data.bs.ch_llms.txt — Kanton Basel-Stadt. Issues & pull requests at the source.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-12 16:26:49 +01:00
.github/workflows Intial commit 2026-03-12 15:16:13 +01:00
llms Update dependencies in pyproject.toml, revise README for API usage, and regenerate dataset documentation with updated timestamps and record counts. 2026-03-12 16:26:49 +01:00
scripts Update dependencies in pyproject.toml, revise README for API usage, and regenerate dataset documentation with updated timestamps and record counts. 2026-03-12 16:26:49 +01:00
.python-version Intial commit 2026-03-12 15:16:13 +01:00
LICENSE Create LICENSE 2026-03-12 15:17:13 +01:00
llms.txt Intial commit 2026-03-12 15:16:13 +01:00
pyproject.toml Update dependencies in pyproject.toml, revise README for API usage, and regenerate dataset documentation with updated timestamps and record counts. 2026-03-12 16:26:49 +01:00
README.md Update dependencies in pyproject.toml, revise README for API usage, and regenerate dataset documentation with updated timestamps and record counts. 2026-03-12 16:26:49 +01:00
uv.lock Update dependencies in pyproject.toml, revise README for API usage, and regenerate dataset documentation with updated timestamps and record counts. 2026-03-12 16:26:49 +01:00

data.bs.ch llms.txt toolkit

Maintainer toolkit for generating and validating LLM-facing docs for data.bs.ch.

What this repository does

  • Publishes a concise root llms.txt router.
  • Generates dataset indexes for LLM navigation:
    • llms/datasets/index.md
    • llms/datasets/by-theme/index.md
    • llms/datasets/by-theme/*.md
  • Validates required structure and links before publishing.

Architecture

  • llms.txt: root routing manifest for LLMs.
  • llms/*.md: hand-authored guides.
  • scripts/generate_dataset_docs.py: builds dataset index pages.
  • scripts/validate_llms_docs.py: checks required files/sections and link integrity.
  • .github/workflows/validate-llms-docs.yml: CI validation workflow.
  • .github/workflows/refresh-llms-datasets.yml: scheduled generation + PR workflow.

Data source strategy

scripts/generate_dataset_docs.py uses the public Explore API only:

  • https://data.bs.ch/api/explore/v2.1/catalog/datasets

Only public datasets are indexed.

Prerequisites

  • uv installed
  • Python 3.12+ (see .python-version)

Setup (uv)

uv sync

Common commands (uv)

Generate dataset docs:

uv run python scripts/generate_dataset_docs.py

Validate docs:

uv run python scripts/validate_llms_docs.py

CI behavior

  • Validation workflow (validate-llms-docs.yml):
    • uv sync --frozen
    • generate docs
    • validate docs and links
  • Refresh workflow (refresh-llms-datasets.yml):
    • scheduled daily
    • regenerates dataset docs
    • opens a PR with generated changes

Publish/deploy checklist

  1. Ensure root file is reachable at /llms.txt.
  2. Ensure linked docs are reachable at:
    • /llms/getting-started.md
    • /llms/odsql-cheatsheet.md
    • /llms/query-cookbook.md
    • /llms/datasets/index.md
  3. Run local generate + validate commands.
  4. Confirm CI passes.
  5. Spot-check a few generated theme pages and dataset rows.

Troubleshooting

  • Missing required root links in validator
    • Ensure llms.txt includes absolute URLs for all critical docs.
  • Broken local links
    • Run validator and fix target paths in markdown.
  • Dataset count changes unexpectedly
    • Verify portal availability and Explore API connectivity.