Skip to content

Commit

Permalink
Merge branch 'master' into feature/267-enforce-uniqueness-of-partij
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmursa-dev committed Feb 14, 2025
2 parents efa1432 + 0bbdd20 commit 6ed877d
Show file tree
Hide file tree
Showing 44 changed files with 2,107 additions and 505 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[bumpversion]
commit = False
tag = False
current_version = 2.4.0
current_version = 2.5.0

[bumpversion:file:README.rst]

Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Probleem melden / Bug report
description: Meldt een probleem om ons te helpen verbeteren / Create a report to help us improve
title: "Title here"
type: "Bug"
labels: ["bug", "triage"]
projects: ["maykinmedia/15"]
assignees: []
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Verzoek tot verbetering / Feature request
description: Stel een idee voor om het product beter te maken / Suggest an idea for this product
title: "Title here"
type: "Feature"
labels: ["enhancement", "triage"]
projects: ["maykinmedia/15"]
assignees: []
Expand Down
38 changes: 38 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@
Change history
==============

2.5.0
=====
*January, 28, 2025*

**New features**

* Add support for setup configuration
* [#293] Configuring access tokens
* [#294] Admin authentication via OIDC

**Bugfixes/QoL**:

* Add UUID to Klantinteracties admin search fields and fieldsets
* [#254] Fix incorrect URLs being returned in API responses for ``Persoon``, ``Bijlage`` and ``CategorieRelatie``
* [#265] Fix ``adres__icontains`` for GET requests on ``digitaleadressen`` endpoint
* [#272] Make ``digitaalAdres.omschrijving`` not required
* [#252] Make ``Persoon.overlijdensdatum`` optional via admin interface
* Point help text for ``DigitaalAdres.is_standaard_adres`` to correctly cased field name
* [maykinmedia/charts#148] Add timeouts to celery tasks


**Project maintenance**

* [#66] Update zgw-consumers to 0.35.1
* [#66] Update commonground-api-common to 2.1.2
* [#66] Update notifications-api-common to 0.3.1
* Update open-api-framework to 0.9.2
* [maykinmedia/open-api-framework#92] Make sure documentation is built in CI
* [maykinmedia/open-api-framework#92] Fix pushing of Docker latest tag
* Fix code-analysis workflow
* [maykinmedia/open-api-framework#81] Switch from pip-compile to UV
* [maykinmedia/open-api-framework#93] Security updates for third party libraries

**Documentation**

* Add documentation for OpenKlant v2 semantic information model


2.4.0
=====
*November, 26, 2024*
Expand Down
14 changes: 8 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Klant
==========

:Version: 2.4.0
:Version: 2.5.0
:Source: https://github.com/maykinmedia/open-klant
:Keywords: klanten, klantinteracties, contactmomenten, api, common ground
:License: EUPL
Expand Down Expand Up @@ -39,15 +39,17 @@ Open Klant versie API versie Release datum API specificatie
================== ============== ============= ================
master/latest n/a n/a `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/master/src/openklant/components/klantinteracties/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/master/src/openklant/components/klantinteracties/openapi.yaml>`_,
(`diff <https://github.com/maykinmedia/open-klant/compare/2.4.0..master>`_)
2.4.0 0.0.3+ 2024-11-22 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.4.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
(`diff <https://github.com/maykinmedia/open-klant/compare/2.5.0..master>`_)
2.5.0 0.0.4 2025-01-28 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.5.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.5.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
(`diff <https://github.com/maykinmedia/open-klant/compare/2.4.0..2.5.0>`_)
2.4.0 0.0.3 2024-11-22 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.4.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.4.0/src/openklant/components/klantinteracties/openapi.yaml>`_,

(`diff <https://github.com/maykinmedia/open-klant/compare/2.3.0..2.4.0>`_)
2.3.0 0.0.3+ 2024-09-05 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.3.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
2.3.0 0.0.3 2024-09-05 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.3.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.3.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
(`diff <https://github.com/maykinmedia/open-klant/compare/2.1.0..2.3.0>`_)
2.1.0 0.0.3+ 2024-07-16 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.1.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
2.1.0 0.0.3 2024-07-16 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.1.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.1.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
(`diff <https://github.com/maykinmedia/open-klant/compare/2.0.0..2.1.0>`_)
2.0.0 0.0.3 2024-03-15 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-klant/2.0.0/src/openklant/components/klantinteracties/openapi.yaml>`_,
Expand Down
4 changes: 2 additions & 2 deletions bin/celery_worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -e
LOGLEVEL=${CELERY_LOGLEVEL:-INFO}
CONCURRENCY=${CELERY_WORKER_CONCURRENCY:-1}

QUEUE=${1:-${CELERY_WORKER_QUEUE:=celery}}
WORKER_NAME=${2:-${CELERY_WORKER_NAME:="${QUEUE}"@%n}}
QUEUE=${CELERY_WORKER_QUEUE:=celery}
WORKER_NAME=${CELERY_WORKER_NAME:="${QUEUE}"@%n}

echo "Starting celery worker $WORKER_NAME with queue $QUEUE"
exec celery --workdir src --app openklant.celery worker \
Expand Down
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import sys

import django
from django.utils.translation import activate

sys.path.insert(0, os.path.abspath("../src"))
os.environ["LOG_REQUESTS"] = "false"
Expand Down Expand Up @@ -39,6 +40,9 @@
"sphinx.ext.autodoc",
"sphinx.ext.todo",
"sphinx.ext.intersphinx",
"sphinx.ext.autodoc",
"django_setup_configuration.documentation.setup_config_example",
"django_setup_configuration.documentation.setup_config_usage",
# "sphinx_tabs.tabs",
# "recommonmark",
# "sphinx_markdown_tables",
Expand All @@ -54,6 +58,10 @@
# Usually you set "language" from the command line for these cases.
language = "en"

# Also set the language to English for Django, to make sure that any translatable text
# is also shown in English (for instance the help texts for setup configuration examples)
activate("en")

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
Expand Down
82 changes: 1 addition & 81 deletions docs/installation/setup_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,84 +4,4 @@
Open Klant configuration (CLI)
==============================

After deploying Open Klant, it needs to be configured to be fully functional.
The django management command ``setup_configuration`` assist with this configuration.
You can get the full command documentation with:

.. code-block:: bash
python ./src/manage.py setup_configuration --help
.. warning:: This command is declarative - if configuration is manually changed after
running the command and you then run the exact same command again, the manual
changes will be reverted.

Preparation
===========

The command executes the list of pluggable configuration steps, and each step
requires specific configuration information, that should be prepared.
Here is the description of all available configuration steps and the configuration
format, used by each step.

Token configuration
----------------------

Create a (single) YAML configuration file with your settings:

.. code-block:: yaml
tokenauth_config_enable: true
tokenauth:
items:
- identifier: token-1
token: ba9d233e95e04c4a8a661a27daffe7c9bd019067
contact_person: Person 1
email: person-1@example.com
organization: Organization XYZ # optional
application: Application XYZ # optional
administration: Administration XYZ # optional
- identifier: token-2
token: 7b2b212d9f16d171a70a1d927cdcfbd5ca7a4799
contact_person: Person 2
email: person-2@example.com
Mozilla-django-oidc-db
----------------------

Create or update the (single) YAML configuration file with your settings:

.. code-block:: yaml
...
oidc_db_config_enable: true
oidc_db_config_admin_auth:
items:
- identifier: admin-oidc
oidc_rp_client_id: client-id
oidc_rp_client_secret: secret
endpoint_config:
oidc_op_discovery_endpoint: https://keycloak.local/protocol/openid-connect/
...
More details about configuring mozilla-django-oidc-db through ``setup_configuration``
can be found at the _`documentation`: https://mozilla-django-oidc-db.readthedocs.io/en/latest/setup_configuration.html.

Execution
=========

Open Klant configuration
------------------------

With the full command invocation, everything is configured at once. Each configuration step
is idempotent, so any manual changes made via the admin interface will be updated if the command
is run afterwards.

.. code-block:: bash
python ./src/manage.py setup_configuration --yaml-file /path/to/config.yaml
.. note:: Due to a cache-bug in the underlying framework, you need to restart all
replicas for part of this change to take effect everywhere.
.. setup-config-usage::
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openklant",
"version": "2.4.0",
"version": "2.5.0",
"description": "openklant project",
"main": "src/static/openklant/js/openklant.js",
"directories": {
Expand Down
2 changes: 2 additions & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ open-api-framework

django-setup-configuration
mozilla-django-oidc-db[setup-configuration]

django-localflavor
15 changes: 13 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ django==4.2.17
# django-filter
# django-formtools
# django-jsonform
# django-localflavor
# django-log-outgoing-requests
# django-markup
# django-otp
Expand Down Expand Up @@ -126,6 +127,8 @@ django-jsonform==2.22.0
# via
# mozilla-django-oidc-db
# open-api-framework
django-localflavor==4.0
# via -r requirements/base.in
django-log-outgoing-requests==0.6.1
# via open-api-framework
django-markup==1.8.1
Expand All @@ -148,7 +151,7 @@ django-sendfile2==0.7.1
# via django-privates
django-sessionprofile==3.0.0
# via open-api-framework
django-setup-configuration==0.4.0
django-setup-configuration==0.7.1
# via
# -r requirements/base.in
# mozilla-django-oidc-db
Expand Down Expand Up @@ -181,6 +184,8 @@ djangorestframework-gis==1.0
# via open-api-framework
djangorestframework-inclusions==1.2.0
# via open-api-framework
docutils==0.21.2
# via django-setup-configuration
drf-nested-routers==0.94.1
# via commonground-api-common
drf-spectacular==0.27.2
Expand Down Expand Up @@ -229,7 +234,7 @@ maykin-2fa==1.0.1
# via open-api-framework
mozilla-django-oidc==4.0.1
# via mozilla-django-oidc-db
mozilla-django-oidc-db==0.21.1
mozilla-django-oidc-db==0.22.0
# via
# -r requirements/base.in
# open-api-framework
Expand Down Expand Up @@ -279,6 +284,8 @@ python-dotenv==1.0.1
# via
# open-api-framework
# pydantic-settings
python-stdnum==1.20
# via django-localflavor
pytz==2024.1
# via flower
pyyaml==6.0.1
Expand Down Expand Up @@ -310,6 +317,10 @@ rpds-py==0.19.1
# via
# jsonschema
# referencing
ruamel-yaml==0.18.10
# via django-setup-configuration
ruamel-yaml-clib==0.2.12
# via ruamel-yaml
sentry-sdk==2.12.0
# via open-api-framework
six==1.16.0
Expand Down
Loading

0 comments on commit 6ed877d

Please sign in to comment.