diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index de3d678d..1992a58b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,5 +28,9 @@ repos: - repo: https://github.com/jorisroovers/gitlint rev: v0.19.1 hooks: - - id: gitlint - stages: [commit-msg] + - id: gitlint + stages: [commit-msg] + - repo: https://github.com/thlorenz/doctoc + rev: v2.2.0 + hooks: + - id: doctoc diff --git a/CHANGELOG.md b/CHANGELOG.md index 7af892c7..428c8fea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ + diff --git a/README.md b/README.md index aabdc476..341bfd2c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,33 @@ [![status](https://travis-ci.com/City-of-Helsinki/kukkuu.svg)](https://github.com/City-of-Helsinki/kukkuu) + + + +- [Environments](#environments) +- [Development with Docker](#development-with-docker) +- [Development without Docker](#development-without-docker) + - [Installing Python requirements](#installing-python-requirements) + - [Database](#database) + - [Notification import](#notification-import) + - [Cron jobs](#cron-jobs) + - [Reminder notifications](#reminder-notifications) + - [Feedback notifications](#feedback-notifications) + - [Queued email sending](#queued-email-sending) + - [SMS notifications](#sms-notifications) + - [Daily running, Debugging](#daily-running-debugging) +- [Authorization](#authorization) +- [GDPR API data export](#gdpr-api-data-export) +- [GraphQL API Documentation](#graphql-api-documentation) +- [Report API](#report-api) +- [QR-code ticket verification](#qr-code-ticket-verification) +- [Keeping Python requirements up to date](#keeping-python-requirements-up-to-date) +- [Code linting & formatting](#code-linting--formatting) + - [Pre-commit hooks](#pre-commit-hooks) +- [Issues board](#issues-board) + + + ## Environments Production environment: @@ -192,15 +219,18 @@ Basic `ruff` commands: - Format: `ruff format` Basically: - - Ruff linter (i.e. `ruff check --fix`) does what `flake8` and `isort` did before. - - Ruff formatter (i.e. `ruff format`) does what `black` did before. + +- Ruff linter (i.e. `ruff check --fix`) does what `flake8` and `isort` did before. +- Ruff formatter (i.e. `ruff format`) does what `black` did before. Integrations for `ruff` are available for many editors: - - https://docs.astral.sh/ruff/integrations/ + +- https://docs.astral.sh/ruff/integrations/ ### Pre-commit hooks You can use [`pre-commit`](https://pre-commit.com/) to lint and format your code before committing: + 1. Install `pre-commit` (there are many ways to do but let's use pip as an example): - `pip install pre-commit` 2. Set up git hooks from `.pre-commit-config.yaml`, run this command from project root: diff --git a/docs/setup-keycloak.md b/docs/setup-keycloak.md index 97fada27..e67cc426 100644 --- a/docs/setup-keycloak.md +++ b/docs/setup-keycloak.md @@ -1,3 +1,12 @@ + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Setup Keycloak](#setup-keycloak) + - [Use the public test Keycloak](#use-the-public-test-keycloak) + + + # Setup Keycloak ## Use the public test Keycloak diff --git a/docs/setup-tunnistamo.md b/docs/setup-tunnistamo.md index 66118d73..10ff5a2c 100644 --- a/docs/setup-tunnistamo.md +++ b/docs/setup-tunnistamo.md @@ -1,3 +1,13 @@ + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Setup Tunnistamo](#setup-tunnistamo) + - [Use a local Tunnistamo](#use-a-local-tunnistamo) + - [Use the public test Tunnistamo](#use-the-public-test-tunnistamo) + + + # Setup Tunnistamo ## Use a local Tunnistamo diff --git a/gdpr/README.md b/gdpr/README.md index 8f6594b8..bbb53799 100644 --- a/gdpr/README.md +++ b/gdpr/README.md @@ -1,3 +1,13 @@ + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [How to integrate the Culture Kids to Helsinki-Profile GDPR API](#how-to-integrate-the-culture-kids-to-helsinki-profile-gdpr-api) +- [GDPR API data export](#gdpr-api-data-export) +- [Kukkuu GDPR API tester](#kukkuu-gdpr-api-tester) + + + # How to integrate the Culture Kids to Helsinki-Profile GDPR API As background information and instructions for integrating the service with Helsinki-Profile, see the documentation for [How to integrate to Helsinki-Profile through Tunnistamo](./docs/how-to-integrate-to-Helsinki-profile-with-Tunnistamo.md). diff --git a/gdpr/docs/how-to-integrate-to-Helsinki-profile-with-Tunnistamo.md b/gdpr/docs/how-to-integrate-to-Helsinki-profile-with-Tunnistamo.md index 54a77607..cd5d429e 100644 --- a/gdpr/docs/how-to-integrate-to-Helsinki-profile-with-Tunnistamo.md +++ b/gdpr/docs/how-to-integrate-to-Helsinki-profile-with-Tunnistamo.md @@ -1,3 +1,18 @@ + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Integrate the Culture Kids service to the Helsinki-Profile](#integrate-the-culture-kids-service-to-the-helsinki-profile) + - [1. Download and install all the needed services](#1-download-and-install-all-the-needed-services) + - [2. Setup the clients and their scopes in Tunnistamo](#2-setup-the-clients-and-their-scopes-in-tunnistamo) + - [Communication between the Culture kids apps and the Tunnistamo](#communication-between-the-culture-kids-apps-and-the-tunnistamo) + - [Communication between the Helsinki-profile and the Tunnistamo](#communication-between-the-helsinki-profile-and-the-tunnistamo) + - [Communication from Helsinki-profile to the Culture Kids through Tunnistamo](#communication-from-helsinki-profile-to-the-culture-kids-through-tunnistamo) + - [3. Setup the Helsinki-Profile](#3-setup-the-helsinki-profile) + - [4. Test that all the communication works](#4-test-that-all-the-communication-works) + + + # Integrate the Culture Kids service to the Helsinki-Profile ## 1. Download and install all the needed services diff --git a/gdpr/docs/kukkuu-profile-through-tunnistamo.md b/gdpr/docs/kukkuu-profile-through-tunnistamo.md index 276aebb1..a129bfa6 100644 --- a/gdpr/docs/kukkuu-profile-through-tunnistamo.md +++ b/gdpr/docs/kukkuu-profile-through-tunnistamo.md @@ -1,3 +1,14 @@ + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Culture Kids with Helsinki-Profile GDPR API through Tunnistamo](#culture-kids-with-helsinki-profile-gdpr-api-through-tunnistamo) + - [OIDC API scopes](#oidc-api-scopes) + - [Kukkuu GDPR Query API Scope Specifier](#kukkuu-gdpr-query-api-scope-specifier) + - [Kukkuu GDPR Delete API Scope Specifier](#kukkuu-gdpr-delete-api-scope-specifier) + + + # Culture Kids with Helsinki-Profile GDPR API through Tunnistamo ## OIDC API scopes diff --git a/gdpr/docs/setup-helsinki-profile.md b/gdpr/docs/setup-helsinki-profile.md index 787af3c1..47a86b04 100644 --- a/gdpr/docs/setup-helsinki-profile.md +++ b/gdpr/docs/setup-helsinki-profile.md @@ -1,3 +1,13 @@ + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Setup the Helsinki-Profile for internal use and for UI](#setup-the-helsinki-profile-for-internal-use-and-for-ui) + - [Configure the internal service (for Helsinki-Profile-UI and internal Graphql-UI)](#configure-the-internal-service-for-helsinki-profile-ui-and-internal-graphql-ui) + - [Configure the Culture kids service](#configure-the-culture-kids-service) + + + # Setup the Helsinki-Profile for internal use and for UI In order to get the Helsinki-Profile UI to work with API, The Helsinki-Profile services needs to be set so that they match with the Tunnistamo client ids. Also, the Helsinki-Profile API itself needs an internal service. diff --git a/gdpr/docs/tunnistamo-kukkuu-configuration.md b/gdpr/docs/tunnistamo-kukkuu-configuration.md index 772e1bb1..b0f7503a 100644 --- a/gdpr/docs/tunnistamo-kukkuu-configuration.md +++ b/gdpr/docs/tunnistamo-kukkuu-configuration.md @@ -1,3 +1,19 @@ + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Culture Kids with Tunnistamo](#culture-kids-with-tunnistamo) + - [OIDC provider clients](#oidc-provider-clients) + - [Kukkuu API](#kukkuu-api) + - [Kukkuu UI](#kukkuu-ui) + - [Kukkuu Admin UI](#kukkuu-admin-ui) + - [OIDC API](#oidc-api) + - [Kukkuu API](#kukkuu-api-1) + - [OIDC API scopes](#oidc-api-scopes) + - [Kukkuu API Scope](#kukkuu-api-scope) + + + # Culture Kids with Tunnistamo ## OIDC provider clients diff --git a/gdpr/docs/tunnistamo-profile-configuration.md b/gdpr/docs/tunnistamo-profile-configuration.md index bdf73e0b..78d84a02 100644 --- a/gdpr/docs/tunnistamo-profile-configuration.md +++ b/gdpr/docs/tunnistamo-profile-configuration.md @@ -1,3 +1,18 @@ + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Helsinki-Profile with Tunnistamo](#helsinki-profile-with-tunnistamo) + - [OIDC provider clients](#oidc-provider-clients) + - [Helsinki-Profile API](#helsinki-profile-api) + - [Helsinki-Profile UI](#helsinki-profile-ui) + - [OIDC API](#oidc-api) + - [Helsinki-profile API](#helsinki-profile-api) + - [OIDC API scopes](#oidc-api-scopes) + - [Helsinki-profile API Scope](#helsinki-profile-api-scope) + + + # Helsinki-Profile with Tunnistamo ## OIDC provider clients diff --git a/subscriptions/README.md b/subscriptions/README.md index 746a16c1..53124920 100644 --- a/subscriptions/README.md +++ b/subscriptions/README.md @@ -1,3 +1,14 @@ + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Subscriptions app](#subscriptions-app) + - [Free spot notifications](#free-spot-notifications) + - [Authenticated users](#authenticated-users) + - [Authorization with a token](#authorization-with-a-token) + + + ### Subscriptions app #### Free spot notifications diff --git a/users/README.md b/users/README.md index e7b9d3d4..197afce7 100644 --- a/users/README.md +++ b/users/README.md @@ -1,3 +1,20 @@ + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Users app](#users-app) + - [Models](#models) + - [User](#user) + - [Guardian](#guardian) + - [GraphQL Schema](#graphql-schema) + - [Guardians](#guardians) + - [My profile](#my-profile) + - [Update the email](#update-the-email) + - [Manage communication subscriptions](#manage-communication-subscriptions) + - [My admin profile](#my-admin-profile) + + + ### Users app #### Models