diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c6eb4ff..8976a75 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Report a CivicData Bridge defect +about: Report a Townlight Data defect title: "[Bug]: " labels: bug --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index d7307b9..6c1a30f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,6 +1,6 @@ --- name: Feature request -about: Suggest a CivicData Bridge improvement +about: Suggest a Townlight Data improvement title: "[Feature]: " labels: enhancement --- diff --git a/AGENTS.md b/AGENTS.md index 145bd2d..246d218 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,8 @@ -# CivicData Bridge Agent Instructions + -CivicData Bridge prepares municipal datasets for open-data review. Keep v0.1.1 honest: it drafts metadata and checklists, but it does not publish to CKAN, host dashboards, store a data warehouse, or make autonomous redaction/exemption decisions. +# Townlight Data Agent Instructions + +Townlight Data prepares municipal datasets for open-data review. Keep v0.1.1 honest: it drafts metadata and checklists, but it does not publish to CKAN, host dashboards, store a data warehouse, or make autonomous redaction/exemption decisions. ## Required verification @@ -16,7 +18,7 @@ bash scripts/verify-release.sh ## Dependency boundary -CivicData Bridge may depend on `civiccore==0.3.0`. CivicCore must never import CivicData Bridge. Do not import from CivicCore placeholder packages. +Townlight Data may depend on `civiccore==0.3.0`. Townlight Core must never import Townlight Data Bridge. Do not import from Townlight Core placeholder packages. ## UX and documentation diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d6e3859..7746aed 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,3 @@ # Code of Conduct -CivicData Bridge follows the CivicSuite community expectation: be respectful, constructive, and focused on helping municipalities and residents. Harassment, discriminatory conduct, and bad-faith participation are not welcome. +Townlight Data follows the Townlight community expectation: be respectful, constructive, and focused on helping municipalities and residents. Harassment, discriminatory conduct, and bad-faith participation are not welcome. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2fdc299..2db7ea5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Thank you for helping improve CivicData Bridge. Keep contributions small, tested, documented, and honest about shipped versus planned behavior. +Thank you for helping improve Townlight Data Bridge. Keep contributions small, tested, documented, and honest about shipped versus planned behavior. Before opening a PR, run: diff --git a/README.md b/README.md index 0caf2d5..c3cfd6a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# CivicData Bridge + -CivicData Bridge is the CivicSuite open-data preparation module. Version 0.1.2 ships the local package, FastAPI runtime, deterministic helper functions, optional database-backed publication workpapers, bearer-token protection for persisted retrieval, tests, release gates, public documentation, and browser-verified sample UI for preparing municipal datasets before human-approved publication. +# Townlight Data + +Townlight Data is the Townlight open-data preparation module. Version 0.1.2 ships the local package, FastAPI runtime, deterministic helper functions, optional database-backed publication workpapers, bearer-token protection for persisted retrieval, tests, release gates, public documentation, and browser-verified sample UI for preparing municipal datasets before human-approved publication. ## Shipping in v0.1.2 @@ -20,12 +22,12 @@ CivicData Bridge is the CivicSuite open-data preparation module. Version 0.1.2 s - BI dashboards or dashboard hosting. - Data warehouse storage or long-term operational data storage beyond archive-bundle planning. - Autonomous redaction or automatic exemption decisions. -- External connector runtime, approval queues, or CivicRecords exemption-engine integration. +- External connector runtime, approval queues, or Townlight Records exemption-engine integration. - Staff SSO and role-based publication approvals. v0.1.2 protects persisted retrieval only; broader workflow auth comes later. ## Install and run locally -CivicData Bridge v0.1.2 is pinned to `civiccore==0.4.0`. +Townlight Data v0.1.2 is pinned to `civiccore==0.4.0`. ```bash python -m venv .venv @@ -36,7 +38,7 @@ python -m uvicorn civicdata.main:app --host 127.0.0.1 --port 8137 Open `http://127.0.0.1:8137/civicdata` for the browser sample and `http://127.0.0.1:8137/docs` for FastAPI docs. -Set `CIVICDATA_PUBLICATION_DB_URL` to persist CKAN package drafts and publication plans. Set `CIVICDATA_AUTH_TOKEN_ROLES` to a JSON token-to-role map before exposing persisted retrieval. Without the database variable, CivicData Bridge remains deterministic and stateless. Without the auth variable, persisted retrieval endpoints return actionable `503` guidance. With auth configured, anonymous callers receive `401` and callers without an allowed role receive `403`. +Set `CIVICDATA_PUBLICATION_DB_URL` to persist CKAN package drafts and publication plans. Set `CIVICDATA_AUTH_TOKEN_ROLES` to a JSON token-to-role map before exposing persisted retrieval. Without the database variable, Townlight Data remains deterministic and stateless. Without the auth variable, persisted retrieval endpoints return actionable `503` guidance. With auth configured, anonymous callers receive `401` and callers without an allowed role receive `403`. ## API surface @@ -64,4 +66,4 @@ bash scripts/verify-release.sh ## Licensing -Code: AGPL-3.0-only, with the TownLight Public Institution Exception for qualifying deployments. See [LICENSE](LICENSE) and [LICENSE-EXCEPTION.md](LICENSE-EXCEPTION.md). Documentation is CC BY 4.0 unless otherwise noted. CivicData Bridge is designed for local municipal operation and does not require outbound runtime calls in the default profile. +Code: AGPL-3.0-only, with the TownLight Public Institution Exception for qualifying deployments. See [LICENSE](LICENSE) and [LICENSE-EXCEPTION.md](LICENSE-EXCEPTION.md). Documentation is CC BY 4.0 unless otherwise noted. Townlight Data is designed for local municipal operation and does not require outbound runtime calls in the default profile. diff --git a/README.txt b/README.txt index fce0d09..78f6b3f 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,6 @@ -CivicData Bridge v0.1.2 +Townlight Data v0.1.2 -CivicData Bridge prepares municipal datasets for open-data review. It ships dataset normalization, data-dictionary drafts, CKAN package metadata drafts, optional database-backed CKAN package/publication-plan workpapers, bearer-token protection for persisted retrieval, PII/exemption preflight, archive-bundle checklists, publication planning, FastAPI endpoints, tests, docs, and browser QA evidence. +Townlight Data prepares municipal datasets for open-data review. It ships dataset normalization, data-dictionary drafts, CKAN package metadata drafts, optional database-backed CKAN package/publication-plan workpapers, bearer-token protection for persisted retrieval, PII/exemption preflight, archive-bundle checklists, publication planning, FastAPI endpoints, tests, docs, and browser QA evidence. It does not ship live CKAN publishing, BI dashboards, data warehouse storage, autonomous redaction, or external connector runtime. @@ -8,7 +8,7 @@ Run locally: python -m pip install -e ".[dev]" python -m uvicorn civicdata.main:app --host 127.0.0.1 --port 8137 -Set CIVICDATA_PUBLICATION_DB_URL to persist CKAN package drafts and publication plans. Set CIVICDATA_AUTH_TOKEN_ROLES to a JSON token-to-role map before exposing persisted retrieval. Without the database variable, CivicData Bridge remains deterministic and stateless. Without the auth variable, persisted retrieval endpoints return actionable 503 guidance. With auth configured, anonymous callers receive 401 and unauthorized roles receive 403. +Set CIVICDATA_PUBLICATION_DB_URL to persist CKAN package drafts and publication plans. Set CIVICDATA_AUTH_TOKEN_ROLES to a JSON token-to-role map before exposing persisted retrieval. Without the database variable, Townlight Data remains deterministic and stateless. Without the auth variable, persisted retrieval endpoints return actionable 503 guidance. With auth configured, anonymous callers receive 401 and unauthorized roles receive 403. Important routes: /health diff --git a/SECURITY.md b/SECURITY.md index e7030ad..4098563 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,4 +2,4 @@ Report security concerns privately to the maintainers before public disclosure. -CivicData Bridge handles metadata about municipal datasets. Do not place production secrets, raw PII, confidential records, or exempt records in issues, examples, screenshots, or test fixtures. +Townlight Data handles metadata about municipal datasets. Do not place production secrets, raw PII, confidential records, or exempt records in issues, examples, screenshots, or test fixtures. diff --git a/SUPPORT.md b/SUPPORT.md index 3c2b29c..f26067a 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -1,3 +1,3 @@ # Support -For CivicData Bridge support, open a GitHub discussion or issue with the module version, operating system, command run, expected result, actual result, and any relevant logs with secrets removed. +For Townlight Data support, open a GitHub discussion or issue with the module version, operating system, command run, expected result, actual result, and any relevant logs with secrets removed. diff --git a/USER-MANUAL.md b/USER-MANUAL.md index 3b5b8ac..c7a6e24 100644 --- a/USER-MANUAL.md +++ b/USER-MANUAL.md @@ -1,8 +1,10 @@ -# CivicData Bridge User Manual + + +# Townlight Data User Manual ## Non-technical staff guide -CivicData Bridge helps a city prepare datasets before they are published to an open-data portal. It is a preparation and review tool with optional saved CKAN package/publication-plan workpapers, not an automatic publishing robot. +Townlight Data helps a city prepare datasets before they are published to an open-data portal. It is a preparation and review tool with optional saved CKAN package/publication-plan workpapers, not an automatic publishing robot. ### What staff can do today @@ -20,7 +22,7 @@ Every dataset still needs staff approval before publication. Staff must confirm ### What v0.1.2 does not do -CivicData Bridge does not publish directly to CKAN, does not host dashboards, does not store a data warehouse, does not make legal exemption decisions, and does not redact records automatically. +Townlight Data does not publish directly to CKAN, does not host dashboards, does not store a data warehouse, does not make legal exemption decisions, and does not redact records automatically. ## IT and technical guide @@ -50,7 +52,7 @@ The public endpoints are listed in `README.md`. All v0.1.2 endpoints are determi ### Dependency contract -CivicData Bridge depends on `civiccore==0.4.0`. CivicCore must not import CivicData Bridge. +Townlight Data depends on `civiccore==0.4.0`. Townlight Core must not import Townlight Data Bridge. ### Verification diff --git a/USER-MANUAL.txt b/USER-MANUAL.txt index 7363f78..c39c1a9 100644 --- a/USER-MANUAL.txt +++ b/USER-MANUAL.txt @@ -1,6 +1,6 @@ -CivicData Bridge User Manual +Townlight Data User Manual -For staff: CivicData Bridge prepares municipal datasets for open-data review. It normalizes fields, drafts data dictionaries, prepares CKAN package metadata, flags possible PII/exempt fields, creates archive/publication checklists, and optionally retrieves saved CKAN package/publication-plan workpapers. +For staff: Townlight Data prepares municipal datasets for open-data review. It normalizes fields, drafts data dictionaries, prepares CKAN package metadata, flags possible PII/exempt fields, creates archive/publication checklists, and optionally retrieves saved CKAN package/publication-plan workpapers. Staff must approve every dataset before publication. v0.1.2 does not publish to CKAN, host dashboards, store a data warehouse, redact automatically, or make exemption decisions. diff --git a/civicdata/__init__.py b/civicdata/__init__.py index 8a16610..e0060f7 100644 --- a/civicdata/__init__.py +++ b/civicdata/__init__.py @@ -1,3 +1,3 @@ -"""CivicData Bridge v0.1.2 public package.""" +"""Townlight Data v0.1.2 public package.""" __version__ = "0.1.2" diff --git a/civicdata/dataset_normalization.py b/civicdata/dataset_normalization.py index fd40bae..50ba0f4 100644 --- a/civicdata/dataset_normalization.py +++ b/civicdata/dataset_normalization.py @@ -1,4 +1,4 @@ -"""Dataset normalization helpers for CivicData Bridge v0.1.1.""" +"""Dataset normalization helpers for Townlight Data v0.1.1.""" from dataclasses import dataclass import re diff --git a/civicdata/main.py b/civicdata/main.py index 46e0b8b..5d1a9f3 100644 --- a/civicdata/main.py +++ b/civicdata/main.py @@ -1,4 +1,4 @@ -"""FastAPI runtime foundation for CivicData Bridge.""" +"""FastAPI runtime foundation for Townlight Data.""" import os @@ -25,9 +25,9 @@ app = FastAPI( - title="CivicData Bridge", + title='Townlight Data', version=__version__, - description="Open-data normalization, CKAN package drafts, archive bundles, and redaction-review support for CivicSuite.", + description='Open-data normalization, CKAN package drafts, archive bundles, and redaction-review support for Townlight.', ) _publication_repository: PublicationWorkpaperRepository | None = None @@ -89,7 +89,7 @@ def root() -> dict[str, str]: "version": __version__, "status": "open-data foundation plus publication workpaper persistence", "message": ( - "CivicData Bridge package, API foundation, dataset normalization, data-dictionary drafts, " + "Townlight Data package, API foundation, dataset normalization, data-dictionary drafts, " "CKAN package metadata drafts, PII/exemption review preflight, archive-bundle checklists, " "publication planning, optional database-backed CKAN package/publication-plan workpapers, and " "public UI foundation are online; live CKAN publishing, BI dashboards, data warehouse storage, " @@ -166,7 +166,7 @@ def _require_publication_reader( ) -> AuthenticatedPrincipal: return authorize_bearer_roles( credentials, - service_name="CivicData Bridge", + service_name='Townlight Data', feature_name="persisted publication workpaper retrieval", token_roles_env_var="CIVICDATA_AUTH_TOKEN_ROLES", allowed_roles={"workpaper_reader", "data_admin"}, @@ -182,7 +182,7 @@ def get_ckan_package( raise HTTPException( status_code=503, detail={ - "message": "CivicData persisted publication retrieval auth is not configured.", + "message": "Townlight Data persisted publication retrieval auth is not configured.", "fix": ( "Set CIVICDATA_AUTH_TOKEN_ROLES before exposing persisted CKAN package retrieval." ), @@ -244,7 +244,7 @@ def get_publication_plan( raise HTTPException( status_code=503, detail={ - "message": "CivicData publication workpaper persistence is not configured.", + "message": "Townlight Data publication workpaper persistence is not configured.", "fix": "Set CIVICDATA_PUBLICATION_DB_URL to retrieve persisted publication plans.", }, ) diff --git a/civicdata/public_ui.py b/civicdata/public_ui.py index 79901f0..a17f8fd 100644 --- a/civicdata/public_ui.py +++ b/civicdata/public_ui.py @@ -1,4 +1,4 @@ -"""Accessible public sample UI for CivicData Bridge.""" +"""Accessible public sample UI for Townlight Data.""" def render_public_lookup_page() -> str: @@ -10,7 +10,7 @@ def render_public_lookup_page() -> str: -CivicData Bridge - open data preparation +Townlight Data - open data preparation -

CivicSuite module

CivicData Bridge

Open-data preparation for municipalities: normalize fields, draft dictionaries, prepare CKAN metadata, persist optional publication workpapers, protect persisted retrieval with bearer roles, flag redaction review, and assemble retention-aware archive checklists.

v0.1.2 shipping

-

For staff

Use CivicData Bridge to prepare datasets before publication. Every dataset still needs human review, license confirmation, redaction or exemption clearance, and retention checks.

For IT

Install locally with python -m pip install -e ".[dev]", run python -m uvicorn civicdata.main:app, set CIVICDATA_PUBLICATION_DB_URL for optional persistence, and set CIVICDATA_AUTH_TOKEN_ROLES before exposing persisted retrieval.

Boundaries

No live CKAN publication, BI dashboard, data warehouse, autonomous redaction, or connector runtime ships in v0.1.2.

Dependency

Pinned to civiccore==0.4.0. CivicCore remains dependency-only; it never imports CivicData Bridge.

+

Townlight module

Townlight Data

Open-data preparation for municipalities: normalize fields, draft dictionaries, prepare CKAN metadata, persist optional publication workpapers, protect persisted retrieval with bearer roles, flag redaction review, and assemble retention-aware archive checklists.

v0.1.2 shipping

+

For staff

Use Townlight Data to prepare datasets before publication. Every dataset still needs human review, license confirmation, redaction or exemption clearance, and retention checks.

For IT

Install locally with python -m pip install -e ".[dev]", run python -m uvicorn civicdata.main:app, set CIVICDATA_PUBLICATION_DB_URL for optional persistence, and set CIVICDATA_AUTH_TOKEN_ROLES before exposing persisted retrieval.

Boundaries

No live CKAN publication, BI dashboard, data warehouse, autonomous redaction, or connector runtime ships in v0.1.2.

Dependency

Pinned to civiccore==0.4.0. Townlight Core remains dependency-only; it never imports Townlight Data Bridge.

diff --git a/pyproject.toml b/pyproject.toml index 8c6e1b2..328f432 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "hatchling.build" [project] name = "civicdata" version = "0.1.2" -description = "CivicData Bridge foundation for open-data normalization, CKAN package drafts, archive bundles, and redaction review." +description = "Townlight Data foundation for open-data normalization, CKAN package drafts, archive bundles, and redaction review." readme = "README.md" requires-python = ">=3.11" license = { text = "AGPL-3.0-only" } diff --git a/tests/test_production_depth_publication_persistence.py b/tests/test_production_depth_publication_persistence.py index c9a5e7a..281b3eb 100644 --- a/tests/test_production_depth_publication_persistence.py +++ b/tests/test_production_depth_publication_persistence.py @@ -104,7 +104,7 @@ def test_get_ckan_package_without_auth_config_returns_actionable_503(monkeypatch assert response.status_code == 503 detail = response.json()["detail"] - assert detail["message"] == "CivicData Bridge persisted publication workpaper retrieval auth is not configured." + assert detail["message"] == "Townlight Data persisted publication workpaper retrieval auth is not configured." assert "Set CIVICDATA_AUTH_TOKEN_ROLES" in detail["fix"] diff --git a/tests/test_runtime_foundation.py b/tests/test_runtime_foundation.py index b82ccea..d4fa584 100644 --- a/tests/test_runtime_foundation.py +++ b/tests/test_runtime_foundation.py @@ -31,7 +31,7 @@ def test_public_ui_contains_version_boundaries_and_dependency(): response = client.get("/civicdata") assert response.status_code == 200 text = response.text - assert "CivicData Bridge v0.1.2" in text + assert "Townlight Data v0.1.2" in text assert "No live CKAN publication" in text assert "civiccore==0.4.0" in text