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.
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 4d3967d..c90bf47 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -46,15 +46,23 @@ jobs: verify: needs: changes if: needs.changes.outputs.code == 'true' - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v5 - uses: actions/setup-python@v6 with: python-version: '3.11' - - name: Install CivicCore release wheel - run: python -m pip install https://github.com/CivicSuite/civiccore/releases/download/v0.4.0/civiccore-0.4.0-py3-none-any.whl + - name: Checkout townlight/core + uses: actions/checkout@v5 + with: + repository: townlight/core + ref: 2f6ba9be4a95e3772dc47a3682ac780c5283b626 + path: townlight-core-source + persist-credentials: false + - name: Install townlight core + run: python -m pip install --no-deps ./townlight-core-source - name: Install package run: python -m pip install -e ".[dev]" - name: Run release gate + shell: bash run: bash scripts/verify-release.sh diff --git a/README.md b/README.md index c02f437..1683eb8 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,16 @@ -> **Parked foundation — outside the released Windows suite.** This repository contains exploratory/support code, not a completed Townlight product. It is not installed or supported by Windows 1.8.1.1. Historical examples, package names and dependency pins below describe this foundation and must not be used as current suite installation instructions. Use the [released Windows suite, current modules and acceptance limits](https://townlight.github.io/versions.html). +> Townlight Data 0.2.0 targets the next Windows candidate. Windows 1.9.2.1 does not include Data. # 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. +Townlight Data is the Townlight open-data preparation module. Version 0.2.0 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 +## Windows staff workflow + +In Townlight Data 0.2.0 candidate on Windows Suite full profile, existing Contracts grants let staff select signed agreements and preview only contract ID, title, vendor, start/expiration. An admin explicitly confirms the actual SHA-256 preview before an unattended queue sends to the configured resident Portal. Status states cover selection, hash confirmation, queueing, acknowledgement, correction, and withdrawal. No public link appears until the receiving portal acknowledges. Public outputs include CSV, JSON, and dictionary. Corrections proceed through a new review; withdrawal removes anonymous downloads when delivered. Legacy standalone workpaper APIs remain separate. + +## Standalone workpapers - Dataset field normalization for CKAN-friendly names, date/time hints, and geospatial-review notes. - Data-dictionary draft generation from source schema metadata. @@ -25,17 +29,17 @@ Townlight Data is the Townlight open-data preparation module. Version 0.1.2 ship - 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 Townlight Records exemption-engine integration. -- Staff SSO and role-based publication approvals. v0.1.2 protects persisted retrieval only; broader workflow auth comes later. +- Staff SSO and role-based publication approvals. v0.2.0 protects persisted retrieval only; broader workflow auth comes later. ## Install and run locally -Townlight Data v0.1.2 is pinned to `civiccore==0.4.0`. +Townlight Data v0.2.0 is pinned to `townlight-core==1.3.0.dev2`. ```bash python -m venv .venv . .venv/Scripts/activate # Windows PowerShell: .venv\Scripts\Activate.ps1 python -m pip install -e ".[dev]" -python -m uvicorn civicdata.main:app --host 127.0.0.1 --port 8137 +python -m uvicorn townlight_data.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. diff --git a/README.txt b/README.txt index 978001b..8f09e81 100644 --- a/README.txt +++ b/README.txt @@ -1,10 +1,10 @@ - Parked foundation — outside the released Windows suite. This repository contains exploratory/support code, not a completed Townlight product. It is not installed or supported by Windows 1.8.1.1. Historical examples, package names and dependency pins below describe this foundation and must not be used as current suite installation instructions. Use the released Windows suite, current modules and acceptance limits. +Townlight Data 0.2.0 targets the next Windows candidate. Windows 1.9.2.1 does not include Data. 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. +Townlight Data is the Townlight open-data preparation module. Version 0.2.0 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 +Shipping in v0.2.0 - Dataset field normalization for CKAN-friendly names, date/time hints, and geospatial-review notes. - Data-dictionary draft generation from source schema metadata. @@ -23,16 +23,16 @@ Not shipped yet - 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 Townlight Records exemption-engine integration. -- Staff SSO and role-based publication approvals. v0.1.2 protects persisted retrieval only; broader workflow auth comes later. +- Staff SSO and role-based publication approvals. v0.2.0 protects persisted retrieval only; broader workflow auth comes later. Install and run locally -Townlight Data v0.1.2 is pinned to civiccore==0.4.0. +Townlight Data v0.2.0 is pinned to townlight-core==1.3.0.dev2. python -m venv .venv . .venv/Scripts/activate # Windows PowerShell: .venv\Scripts\Activate.ps1 python -m pip install -e ".[dev]" - python -m uvicorn civicdata.main:app --host 127.0.0.1 --port 8137 + python -m uvicorn townlight_data.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. @@ -63,3 +63,7 @@ Verification Licensing Code: AGPL-3.0-only, with the TownLight Public Institution Exception for qualifying deployments. See LICENSE and 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. + +Windows staff workflow + +In Townlight Data 0.2.0 candidate on Windows Suite full profile, existing Contracts grants let staff select signed agreements and preview only contract ID, title, vendor, start/expiration. An admin explicitly confirms the actual SHA-256 preview before an unattended queue sends to the configured resident Portal. Status states cover selection, hash confirmation, queueing, acknowledgement, correction, and withdrawal. No public link appears until the receiving portal acknowledges. Public outputs include CSV, JSON, and dictionary. Corrections proceed through a new review; withdrawal removes anonymous downloads when delivered. Legacy standalone workpaper APIs remain separate. diff --git a/USER-MANUAL.md b/USER-MANUAL.md index c7a6e24..59da5b2 100644 --- a/USER-MANUAL.md +++ b/USER-MANUAL.md @@ -20,7 +20,7 @@ Townlight Data helps a city prepare datasets before they are published to an ope Every dataset still needs staff approval before publication. Staff must confirm the source-system owner, redaction/exemption status, open-data license, retention schedule, and publication target. -### What v0.1.2 does not do +### What v0.2.0 does not do 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. @@ -28,7 +28,7 @@ Townlight Data does not publish directly to CKAN, does not host dashboards, does ### Runtime -Install with `python -m pip install -e ".[dev]"` and run with `python -m uvicorn civicdata.main:app --host 127.0.0.1 --port 8137`. +Install with `python -m pip install -e ".[dev]"` and run with `python -m uvicorn townlight_data.main:app --host 127.0.0.1 --port 8137`. Set `CIVICDATA_PUBLICATION_DB_URL` to enable SQLAlchemy-backed CKAN package draft and publication-plan records. Set `CIVICDATA_AUTH_TOKEN_ROLES` to a JSON token-to-role map before exposing persisted retrieval. Leave the database variable unset for deterministic stateless operation. @@ -48,12 +48,16 @@ flowchart LR ### Endpoints -The public endpoints are listed in `README.md`. All v0.1.2 endpoints are deterministic and local. They do not perform live connector calls or publish data to external services. Retrieval endpoints require both `CIVICDATA_PUBLICATION_DB_URL` and `CIVICDATA_AUTH_TOKEN_ROLES`. +The public endpoints are listed in `README.md`. All v0.2.0 endpoints are deterministic and local. They do not perform live connector calls or publish data to external services. Retrieval endpoints require both `CIVICDATA_PUBLICATION_DB_URL` and `CIVICDATA_AUTH_TOKEN_ROLES`. ### Dependency contract -Townlight Data depends on `civiccore==0.4.0`. Townlight Core must not import Townlight Data Bridge. +Townlight Data depends on `townlight-core==1.3.0.dev2`. Townlight Core must not import Townlight Data Bridge. ### Verification Run `bash scripts/verify-release.sh` before release. The script checks docs, tests, Ruff, build artifacts, and package metadata. + +## Windows staff workflow + +In Townlight Data 0.2.0 candidate on Windows Suite full profile, existing Contracts grants let staff select signed agreements and preview only contract ID, title, vendor, start/expiration. An admin explicitly confirms the actual SHA-256 preview before an unattended queue sends to the configured resident Portal. Status states cover selection, hash confirmation, queueing, acknowledgement, correction, and withdrawal. No public link appears until the receiving portal acknowledges. Public outputs include CSV, JSON, and dictionary. Corrections proceed through a new review; withdrawal removes anonymous downloads when delivered. Legacy standalone workpaper APIs remain separate. diff --git a/USER-MANUAL.txt b/USER-MANUAL.txt index c39c1a9..985cc59 100644 --- a/USER-MANUAL.txt +++ b/USER-MANUAL.txt @@ -2,6 +2,10 @@ Townlight Data User Manual 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. +Staff must approve every dataset before publication. v0.2.0 does not publish to CKAN, host dashboards, store a data warehouse, redact automatically, or make exemption decisions. -For IT: install with python -m pip install -e ".[dev]" and run with python -m uvicorn civicdata.main:app --host 127.0.0.1 --port 8137. The package depends on civiccore==0.4.0 and runs locally. Set CIVICDATA_PUBLICATION_DB_URL to enable SQLAlchemy-backed CKAN package draft and publication-plan records. Set CIVICDATA_AUTH_TOKEN_ROLES to a JSON token-to-role map before exposing persisted retrieval. Leave the database variable unset for deterministic stateless operation. +For IT: install with python -m pip install -e ".[dev]" and run with python -m uvicorn townlight_data.main:app --host 127.0.0.1 --port 8137. The package depends on townlight-core==1.3.0.dev2 and runs locally. Set CIVICDATA_PUBLICATION_DB_URL to enable SQLAlchemy-backed CKAN package draft and publication-plan records. Set CIVICDATA_AUTH_TOKEN_ROLES to a JSON token-to-role map before exposing persisted retrieval. Leave the database variable unset for deterministic stateless operation. + +Windows staff workflow + +In Townlight Data 0.2.0 candidate on Windows Suite full profile, existing Contracts grants let staff select signed agreements and preview only contract ID, title, vendor, start/expiration. An admin explicitly confirms the actual SHA-256 preview before an unattended queue sends to the configured resident Portal. Status states cover selection, hash confirmation, queueing, acknowledgement, correction, and withdrawal. No public link appears until the receiving portal acknowledges. Public outputs include CSV, JSON, and dictionary. Corrections proceed through a new review; withdrawal removes anonymous downloads when delivered. Legacy standalone workpaper APIs remain separate. diff --git a/civicdata/__init__.py b/civicdata/__init__.py deleted file mode 100644 index e0060f7..0000000 --- a/civicdata/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Townlight Data v0.1.2 public package.""" - -__version__ = "0.1.2" diff --git a/docs/index.html b/docs/index.html index 9553a3b..50b0908 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,14 +3,14 @@
-Townlight module
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
Use Townlight Data to prepare datasets before publication. Every dataset still needs human review, license confirmation, redaction or exemption clearance, and retention checks.
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.
No live CKAN publication, BI dashboard, data warehouse, autonomous redaction, or connector runtime ships in v0.1.2.
Pinned to civiccore==0.4.0. Townlight Core remains dependency-only; it never imports Townlight Data Bridge.
Townlight module
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.
0.2.0 Windows candidate
Use Townlight Data to prepare datasets before publication. Every dataset still needs human review, license confirmation, redaction or exemption clearance, and retention checks.
Install locally with python -m pip install -e ".[dev]", run python -m uvicorn townlight_data.main:app, set CIVICDATA_PUBLICATION_DB_URL for optional persistence, and set CIVICDATA_AUTH_TOKEN_ROLES before exposing persisted retrieval.
No live CKAN publication, BI dashboard, data warehouse, autonomous redaction, or connector runtime ships in v0.2.0.
Pinned to townlight-core==1.3.0.dev2. Townlight Core remains dependency-only; it never imports Townlight Data Bridge.