Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔖 Release version 0.3.0 #54

Merged
merged 9 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = 0.2.0
current_version = 0.3.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<pre>[a-z]+)\.(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{pre}.{build}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quick-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ on:

jobs:
open-api-workflow-quick-start:
uses: maykinmedia/open-api-workflows/.github/workflows/quick-start.yml@v4.2.0
uses: maykinmedia/open-api-workflows/.github/workflows/quick-start.yml@v4.2.1
50 changes: 44 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,49 @@
Change history
==============

0.2.0
=====
0.3.0 (2025-03-04)
------------------

*October 04, 2024*
**New features**

* [:open-api-framework:`23`] Add support for new version of ``django-setup-configuration``, the following steps were
added/updated. For more information on how to provide configuration for these steps, see
:ref:`installation_configuration_cli`

* Configuration of OpenID Connect authentication for admin users (Single Sign On)


**Bugfixes and QOL**

* [:referentielijsten:`41`] Order API endpoints by pk (descending)
* [:open-api-framework:`79`] disable admin nav sidebar


**Documentation**

* [:referentielijsten:`43`] Update documentation for setup-configuration
* Add configuration for readthedocs

**Project maintenance**

* Upgrading dependencies:

* Upgrade npm packages to fix vulnerabilities
* Upgrade python packages to fix vulnerabilities
* Upgrade open-api-framework to 0.9.3
* Upgrade mozilla-django-oidc-db to 0.22.0
* Upgrade django-setup-configuration to 0.7.1
* Upgrade zgw-consumers to 0.35.1
* Upgrade commonground-api-common to 2.5.1
* [:open-api-framework:`107`] Add bump-my-version to dev dependencies
* [:open-api-framework:`102`] Add quick-start workflow to test docker-compose.yml
* [:open-api-framework:`44`] add workflow to CI to auto-update open-api-framework
* [:open-api-framework:`81`] Switch from pip-compile to UV
* [:open-api-framework:`92`] Fix docker latest tag publish
* [:open-api-framework:`13`] Switch to use reusable open-api-workflows in github actions

0.2.0 (2024-10-04)
------------------

**New features**

Expand Down Expand Up @@ -52,9 +91,8 @@ Change history
* [#20] Update dependencies and fixed broken oidc tests
* [#17] Refactor base settings

0.1.0
=====
0.1.0 (2024-05-28)
------------------

*May 28, 2024*

* Initial release.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ COPY ./bin/docker_start.sh /start.sh
# COPY ./bin/celery_worker.sh /celery_worker.sh
# COPY ./bin/celery_beat.sh /celery_beat.sh
# COPY ./bin/celery_flower.sh /celery_flower.sh
COPY ./bin/wait_for_db.sh /wait_for_db.sh
COPY ./bin/setup_configuration.sh /setup_configuration.sh
RUN mkdir /app/bin /app/log /app/media

VOLUME ["/app/log", "/app/media"]
Expand Down
2 changes: 1 addition & 1 deletion README.EN.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Referentielijsten API
=====================

:Version: 0.2.0
:Version: 0.3.0
:Source: https://github.com/maykinmedia/referentielijsten
:Keywords: referentielijsten, stamtabellen

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Referentielijsten API
=====================

:Version: 0.2.0
:Version: 0.3.0
:Source: https://github.com/maykinmedia/referentielijsten
:Keywords: referentielijsten, stamtabellen

Expand Down
8 changes: 2 additions & 6 deletions bin/docker_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ uwsgi_threads=${UWSGI_THREADS:-1}

mountpoint=${SUBPATH:-/}

until pg_isready; do
>&2 echo "Waiting for database connection..."
sleep 1
done

>&2 echo "Database is up."
# wait for required services
${SCRIPTPATH}/wait_for_db.sh

# Apply database migrations
>&2 echo "Apply database migrations"
Expand Down
14 changes: 14 additions & 0 deletions bin/setup_configuration.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# setup initial configuration using a yaml file
# Run this script from the root of the repository

set -e

if [[ "${RUN_SETUP_CONFIG,,}" =~ ^(true|1|yes)$ ]]; then
# wait for required services
/wait_for_db.sh

src/manage.py migrate
src/manage.py setup_configuration --yaml-file setup_configuration/data.yaml
fi
15 changes: 15 additions & 0 deletions bin/wait_for_db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

set -e

# Wait for the database container
# See: https://docs.docker.com/compose/startup-order/
export PGHOST=${DB_HOST:-db}
export PGPORT=${DB_PORT:-5432}

until pg_isready; do
>&2 echo "Waiting for database connection..."
sleep 1
done

>&2 echo "Database is up."
59 changes: 30 additions & 29 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,40 @@ services:
web:
build: .
image: maykinmedia/referentielijsten-api:latest
environment:
- DJANGO_SETTINGS_MODULE=referentielijsten.conf.docker
- SECRET_KEY=${SECRET_KEY:-django-insecure-4foe-_dk9x=88*0sljyo1_ga!!nj*x8ye6u0p(@871e)zg^+q}
- DB_NAME=referentielijsten
- DB_USER=referentielijsten
- DB_HOST=db
- CACHE_DEFAULT=redis:6379/0
- CACHE_AXES=redis:6379/0
- SUBPATH=${SUBPATH:-/}
- DISABLE_2FA=${DISABLE_2FA:-True}
environment: &app-env
DJANGO_SETTINGS_MODULE: referentielijsten.conf.docker
SECRET_KEY: ${SECRET_KEY:-django-insecure-4foe-_dk9x=88*0sljyo1_ga!!nj*x8ye6u0p(@871e)zg^+q}
DB_NAME: referentielijsten
DB_USER: referentielijsten
DB_HOST: db
CACHE_DEFAULT: redis:6379/0
CACHE_AXES: redis:6379/0
SUBPATH: ${SUBPATH:-/}
DISABLE_2FA: ${DISABLE_2FA:-True}
# Only allow all hosts for development/testing purposes!
- ALLOWED_HOSTS=*
ALLOWED_HOSTS: '*'
ports:
- 8000:8000
volumes: &app-volumes
- media:/app/media # Shared media volume to get access to saved OAS files
- ./docker/setup_configuration:/app/setup_configuration
depends_on:
web-init:
condition: service_completed_successfully

web-init:
build: .
environment:
<<: *app-env
#
# Django-setup-configuration
RUN_SETUP_CONFIG: ${RUN_SETUP_CONFIG:-true}
command: /setup_configuration.sh
depends_on:
- db
- redis
volumes: *app-volumes

# See: src/referentielijsten/conf/docker.py
# Optional containers below:
# elasticsearch:
# # NOTE: No persistance storage configured.
# # See: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
# image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
# container_name: elasticsearch
# environment:
# - discovery.type=single-node
# - cluster.routing.allocation.disk.threshold_enabled=false
# ports:
# - 9200:9200
# redis:
# # NOTE: No persistance storage configured.
# # See: https://hub.docker.com/_/redis/
# image: redis
# ports:
# - 6379:6379
volumes:
media:
db:
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. _changelog:

.. include:: ../CHANGELOG.rst
12 changes: 12 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
# "sphinx_tabs.tabs",
# "recommonmark",
# "sphinx_markdown_tables",
"sphinx.ext.extlinks",
"sphinx.ext.autodoc",
"django_setup_configuration.documentation.setup_config_example",
"django_setup_configuration.documentation.setup_config_usage",
Expand Down Expand Up @@ -99,3 +100,14 @@
r"http://localhost:3000*",
r"https://some-app.gemeente.nl*",
]

extlinks = {
"referentielijsten": (
"https://github.com/maykinmedia/referentielijsten/issues/%s",
"#%s",
),
"open-api-framework": (
"https://github.com/maykinmedia/open-api-framework/issues/%s",
"#%s",
),
}
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ To get you started, you might find some of these links relevant:

introduction/index
installation/index
changelog
1 change: 1 addition & 0 deletions docs/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Optional
* ``NUM_PROXIES``: the number of reverse proxies in front of the application, as an integer. This is used to determine the actual client IP adres. On Kubernetes with an ingress you typically want to set this to 2. Defaults to: ``1``.
* ``CSRF_TRUSTED_ORIGINS``: A list of trusted origins for unsafe requests (e.g. POST). Defaults to: ``[]``.
* ``NOTIFICATIONS_DISABLED``: indicates whether or not notifications should be sent to the Notificaties API for operations on the API endpoints. Defaults to ``True`` for the ``dev`` environment, otherwise defaults to ``False``.
* ``SENTRY_DSN``: URL of the sentry project to send error reports to. Default empty, i.e. -> no monitoring set up. Highly recommended to configure this.
* ``DISABLE_2FA``: Whether or not two factor authentication should be disabled. Defaults to: ``False``.
* ``LOG_OUTGOING_REQUESTS_EMIT_BODY``: Whether or not outgoing request bodies should be logged. Defaults to: ``True``.
* ``LOG_OUTGOING_REQUESTS_DB_SAVE``: Whether or not outgoing request logs should be saved to the database. Defaults to: ``False``.
Expand Down
Loading
Loading