Read-only mirror of https://github.com/DCC-BS/dataspot — Basel-Stadt. Issues & pull requests at the source.
  • Python 99.1%
  • Shell 0.5%
  • Dockerfile 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Renato Farruggio 284aea5ef1 Add i14y_dataset_landingPage to OGD dataset sync
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 13:02:15 +02:00
.github/workflows Merge pull request #36 from DCC-BS/renovate/docker-metadata-action-6.x 2026-08-12 17:27:42 +02:00
Annotation YAMLs Add i14y_kontaktstelle_sk_id to OGD dataset sync 2026-08-22 14:26:58 +02:00
connectors Revert "chore(deps): update eclipse-temurin docker tag to v26" 2026-08-12 17:40:42 +02:00
docs Move Annotations YAMLs folder to repo root 2025-08-23 18:29:25 +02:00
scripts Add i14y_dataset_landingPage to OGD dataset sync 2026-08-25 13:02:15 +02:00
src Add i14y_dataset_landingPage to OGD dataset sync 2026-08-25 13:02:15 +02:00
tests Adapt integration tests accordingly - not adding validation of correctly adding short title and abbreviation for now 2026-03-25 00:37:01 +01:00
.cursorignore Update .cursorignore to include deprecated files 2025-05-16 16:50:14 +02:00
.gitignore Add config.py to being tracked again to avoid airflow errors 2025-06-29 11:03:27 +02:00
.python-version Add basic authentication with OAuth 2.0 2025-01-16 11:06:00 +01:00
config.py Update ogd_i14y_kontaktstelle_sk_id to 1012 - DCC 2026-08-24 13:33:31 +02:00
Dockerfile Update Dockerfile 2025-06-05 09:27:23 +02:00
pytest.ini Add pytest.ini to display logging output 2026-03-17 00:40:37 +01:00
README.md [BREAKING CHANGES]: Update dataspot_auth.py to now use Service User authentication instead of username-password authentication 2025-09-17 18:12:40 +02:00
README_FOR_DEVS.md Remove 'identifikation' field 2025-06-11 10:08:46 +02:00
requirements.txt Update requirements.txt 2026-08-12 17:04:34 +02:00
settings.json Implement new method: teardown_dnk 2025-01-30 17:31:34 +01:00

README.md


Setup

Add a .env file in the root folder with the following content:

Email Configuration

DATASPOT_EMAIL_RECEIVERS_TECHNICAL_ONLY=["petra.muster@bs.ch", "peter.muster@bs.ch"]
DATASPOT_EMAIL_RECEIVERS=["petra.muster@bs.ch", "peter.muster@bs.ch"]
DATASPOT_EMAIL_SERVER=
DATASPOT_EMAIL_SENDER=

Authentication Configuration

For machine-to-machine authentication using Azure AD/Entra ID:

# Azure AD/Entra ID configuration
DATASPOT_TENANT_ID=your-azure-tenant-id
DATASPOT_CLIENT_ID=your-entra-app-client-id
DATASPOT_CLIENT_SECRET=your-entra-app-client-secret
DATASPOT_EXPOSED_CLIENT_ID=5d25a...612

# Dataspot service user access key
DATASPOT_SERVICE_USER_ACCESS_KEY=your-service-user-access-key

Legacy Username/Password Authentication (Deprecated for DataspotAuth)

The following environment variables can be deleted, if they still exist. They are from a legacy system.

DATASPOT_EDITOR_USERNAME
DATASPOT_EDITOR_PASSWORD
DATASPOT_ADMIN_USERNAME
DATASPOT_ADMIN_PASSWORD

DATASPOT_CLIENT_ID
DATASPOT_AUTHENTICATION_TOKEN_URL
DATASPOT_API_BASE_URL

Note: The authentication system has been updated to use M2M authentication. The legacy username/password authentication may be deprecated in the future.


Managing (Data Owner) Posts

The following gif shows everything needed to create a new post, and link the correct person. Note that we don't actually need to create the person or user, as this happens daily automatically. Setting up a new data owner


Integrating code from a dev (or feature) environment into prod [Work-In-Progress]

When integrating a dev into prod, first we need to clone the dev into an int database.

Then:

  1. Export DNK from dev as xlsx and import it again (dry run is enough).
  2. If we don't fix warnings or errors that occur, then they will appear later again.
  3. Integrate yaml from dev into int
  4. Run job "Regelverletzungen prüfen"
  5. Export DNK as xlsx and import it again (dry run is enough)
  6. Export and reimport other models that might be affected aswell
  7. Merge dev into main and delete dev branch

If everything worked without errors, we can apply the int yaml into the prod yaml and reapply the changes made to the int to the prod.

After that, delete the dev branch on github, in dataspot, and also its corresponding Annotations.yaml. Also delete the int environment in dataspot.