Skip to content

Commit

Permalink
adds fields (#238)
Browse files Browse the repository at this point in the history
Adds field to set inhoud_is_vervallen.

This version also bumps to v1.5.0 inline with:

VNG-Realisatie/gemma-zaken#2242
  • Loading branch information
joerivrij authored Mar 29, 2024
1 parent ec65e56 commit 6b763bd
Show file tree
Hide file tree
Showing 33 changed files with 325 additions and 53 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 = 1.4.3
current_version = 1.5.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)([-](?P<release>(rc|alpha))+(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{release}{build}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
===========
Wijzigingen
===========
1.5.0 (2024-25-03)
===========

- **Added:** Fields on EIO (inhoudIsVervallen).

===========
1.4.3 (2023-10-24)
===========
Expand Down
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Documenten API
==============

:Version: 1.4.3
:Version: 1.5.0
:Source: https://github.com/VNG-Realisatie/documenten-api
:Keywords: zaken, zaakgericht werken, GEMMA, RGBZ, DRC

Expand All @@ -24,7 +24,9 @@ Versie Release datum API specificatie
master n.v.t. `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/gemma-documentregistratiecomponent/master/src/openapi.yaml>`_, `Scopes <https://github.com/VNG-Realisatie/documenten-api/blob/master/src/autorisaties.md>`_ `Berichtkenmerken <https://github.com/VNG-Realisatie/documenten-api/blob/master/src/notificaties.md>`_
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/VNG-Realisatie/gemma-documentregistratiecomponent/master/src/openapi.yaml>`_
(`verschillen <https://github.com/VNG-Realisatie/documenten-api/compare/stable/1.2.x..master>`_)
1.4.3 2023-10-24 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.4.3/src/openapi.yaml>`_, `Scopes <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.1/src/autorisaties.md>`_ `Berichtkenmerken <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.1/src/notificaties.md>`_
1.5.0 2024-03-25 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.5.0/src/openapi.yaml>`_, `Scopes <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.5.0/src/autorisaties.md>`_ `Berichtkenmerken <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.5.0/src/notificaties.md>`_
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.5.0/src/openapi.yaml>`_
1.4.3 2023-10-24 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.4.3/src/openapi.yaml>`_, `Scopes <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.3/src/autorisaties.md>`_ `Berichtkenmerken <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.3/src/notificaties.md>`_
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.4.3/src/openapi.yaml>`_
1.4.1 2023-08-29 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.4.1/src/openapi.yaml>`_, `Scopes <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.1/src/autorisaties.md>`_ `Berichtkenmerken <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.1/src/notificaties.md>`_
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.4.1/src/openapi.yaml>`_
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drc",
"version": "1.4.3",
"version": "1.5.0",
"description": "drc referentie implementatie API",
"main": "src/index.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Pillow
Pillow==10.2.0
psycopg2-binary
python-dotenv
python-dateutil
Expand Down
6 changes: 3 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ oyaml==0.7
# via vng-api-common
packaging==21.3
# via sphinx
pillow==6.2.1
pillow==10.2.0
# via -r requirements/base.in
psycopg2-binary==2.9.3
psycopg2-binary==2.9.9
# via -r requirements/base.in
pycparser==2.21
# via cffi
Expand Down Expand Up @@ -190,7 +190,7 @@ raven==6.9.0
# via -r requirements/base.in
regex==2022.7.25
# via textile
requests==2.21
requests==2.21.0
# via
# gemma-zds-client
# requests-mock
Expand Down
6 changes: 3 additions & 3 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@ pathspec==0.9.0
# via black
pep8==1.7.1
# via -r requirements/testing.in
pillow==6.2.1
pillow==10.2.0
# via -r requirements/base.txt
platformdirs==2.5.2
# via
# black
# pylint
psycopg2-binary==2.9.3
psycopg2-binary==2.9.9
# via -r requirements/base.txt
pycparser==2.21
# via
Expand Down Expand Up @@ -360,7 +360,7 @@ tomli==2.0.1
# pylint
tomlkit==0.11.4
# via pylint
typing-extensions==4.3.0
typing-extensions==4.10.0
# via
# astroid
# black
Expand Down
6 changes: 3 additions & 3 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,13 @@ pathspec==0.9.0
# via black
pep8==1.7.1
# via -r requirements/testing.in
pillow==6.2.1
pillow==10.2.0
# via -r requirements/base.txt
platformdirs==2.5.2
# via
# black
# pylint
psycopg2-binary==2.9.3
psycopg2-binary==2.9.9
# via -r requirements/base.txt
pycparser==2.21
# via
Expand Down Expand Up @@ -364,7 +364,7 @@ tomli==2.0.1
# pylint
tomlkit==0.11.4
# via pylint
typing-extensions==4.3.0
typing-extensions==4.10.0
# via
# astroid
# black
Expand Down
4 changes: 2 additions & 2 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ packaging==21.3
# via
# -r requirements/base.txt
# sphinx
pillow==6.2.1
pillow==10.2.0
# via -r requirements/base.txt
psycopg2-binary==2.9.3
psycopg2-binary==2.9.9
# via -r requirements/base.txt
pycparser==2.21
# via
Expand Down
2 changes: 1 addition & 1 deletion src/drc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import re
from collections import namedtuple

__version__ = "1.4.3"
__version__ = "1.5.0"
__author__ = "VNG Realisatie"
__homepage__ = "https://github.com/VNG-Realisatie/documenten-api"
__docformat__ = "restructuredtext"
Expand Down
1 change: 1 addition & 0 deletions src/drc/api/serializers/enkelvoudig_informatieobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class Meta:
"locked",
"bestandsdelen",
"trefwoorden",
"inhoud_is_vervallen",
)
extra_kwargs = {
"informatieobjecttype": {
Expand Down
1 change: 1 addition & 0 deletions src/drc/api/tests/test_auth.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Guarantee that the proper authorization amchinery is in place.
"""

from django.test import override_settings

from rest_framework import status
Expand Down
1 change: 1 addition & 0 deletions src/drc/api/tests/test_caching.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test that the caching mechanisms are in place.
"""

from rest_framework import status
from rest_framework.test import APITestCase, APITransactionTestCase
from vng_api_common.tests import CacheMixin, JWTAuthMixin, generate_jwt_auth, reverse
Expand Down
2 changes: 1 addition & 1 deletion src/drc/api/tests/test_dso_api_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_api_19_documentation_version_yaml(self):
@override_settings(ROOT_URLCONF="drc.api.tests.test_urls")
def test_api_24_version_header(self):
response = self.client.get("/test-view")
self.assertEqual(response["API-version"], "1.4.3")
self.assertEqual(response["API-version"], "1.5.0")


class DSOApi50Tests(APITestCase):
Expand Down
2 changes: 2 additions & 0 deletions src/drc/api/tests/test_enkelvoudiginformatieobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def test_create(self, *mocks):
"informatieobjecttype": INFORMATIEOBJECTTYPE,
"vertrouwelijkheidaanduiding": "openbaar",
"verschijningsvorm": "Vorm A",
"inhoudIsVervallen": None,
}

# Send to the API
Expand Down Expand Up @@ -175,6 +176,7 @@ def test_read(self):
"locked": False,
"bestandsdelen": [],
"trefwoorden": None,
"inhoudIsVervallen": None,
}
response_data = response.json()
self.assertEqual(sorted(response_data.keys()), sorted(expected.keys()))
Expand Down
3 changes: 2 additions & 1 deletion src/drc/api/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class OneAddressValidator:
"""
Class to validate that only one address is send with each request and only one address is associated with each Verzending within the database.
To replace an address with PUT/PATCH, if it is the same GegevensGroepType, it can just be overwritten. If it is to be replaced with another GegevensGroepType,
the existing GegevensGroepType address, mijn_overheid, emailadres and faxnummer have to be set equal to None to indicate it will be removed."""
the existing GegevensGroepType address, mijn_overheid, emailadres and faxnummer have to be set equal to None to indicate it will be removed.
"""

def set_context(self, serializer):
self.instance = getattr(serializer, "instance", None)
Expand Down
10 changes: 2 additions & 8 deletions src/drc/api/views/enkelvoudig_informatieobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,13 @@
update=extend_schema(
summary=_("Werk een (ENKELVOUDIG) INFORMATIEOBJECT in zijn geheel bij."),
description=_(
"Dit creëert altijd een nieuwe versie van het (ENKELVOUDIG) INFORMATIEOBJECT. \n"
" \n**Er wordt gevalideerd op**\n"
"- correcte `lock` waarde\n"
"- status NIET `definitief`"
"Dit creëert altijd een nieuwe versie van het (ENKELVOUDIG) INFORMATIEOBJECT."
),
),
partial_update=extend_schema(
summary=_("Werk een (ENKELVOUDIG) INFORMATIEOBJECT deels bij."),
description=_(
"Dit creëert altijd een nieuwe versie van het (ENKELVOUDIG) INFORMATIEOBJECT. \n"
"\n**Er wordt gevalideerd op**\n"
" - correcte `lock` waarde\n"
" - status NIET `definitief`"
"Dit creëert altijd een nieuwe versie van het (ENKELVOUDIG) INFORMATIEOBJECT."
),
),
destroy=extend_schema(
Expand Down
2 changes: 1 addition & 1 deletion src/drc/conf/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from vng_api_common.conf.api import * # noqa - imports white-listed

API_VERSION = "1.4.3"
API_VERSION = "1.5.0"


REST_FRAMEWORK = BASE_REST_FRAMEWORK.copy()
Expand Down
1 change: 1 addition & 0 deletions src/drc/conf/plugins.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Settings for plugins
"""

import os
import sys
from importlib import import_module
Expand Down
22 changes: 18 additions & 4 deletions src/drc/datamodel/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ class Statussen(DjangoChoices):
_("In bewerking"),
description=_("Aan het informatieobject wordt nog gewerkt."),
)
ter_vaststelling = ChoiceItem(
"ter_vaststelling",
_("Ter vaststelling"),
description=_("Informatieobject gereed maar moet nog vastgesteld " "worden."),
concept = ChoiceItem(
"concept",
_("Concept"),
description=_(
"Het document is inhoudelijk klaar om voorgelegd te"
"worden aan anderen en zo nodig aangepast te worden op"
"basis van commentaar.."
),
)
definitief = ChoiceItem(
"definitief",
Expand All @@ -25,6 +29,16 @@ class Statussen(DjangoChoices):
"vastgesteld dan wel ontvangen."
),
)
ter_vaststelling = ChoiceItem(
"ter_vaststelling",
_("Ter vaststelling"),
description=_("Informatieobject gereed maar moet nog vastgesteld " "worden."),
)
Vastgesteld = ChoiceItem(
"vastgesteld",
_("Vastgesteld"),
description=_("Het besluitvormingstraject is afgerond."),
)
gearchiveerd = ChoiceItem(
"gearchiveerd",
_("Gearchiveerd"),
Expand Down
98 changes: 98 additions & 0 deletions src/drc/datamodel/migrations/0065_auto_20231204_1305.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Generated by Django 3.2.13 on 2023-12-04 13:05

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("datamodel", "0064_bestandsdeel_lock"),
]

operations = [
migrations.AddField(
model_name="enkelvoudiginformatieobject",
name="archiefstatus",
field=models.CharField(
choices=[
(
"nog_te_archiveren",
"De zaak cq. het zaakdossier is nog niet als geheel gearchiveerd.",
),
(
"gearchiveerd",
"De zaak cq. het zaakdossier is als geheel niet-wijzigbaar bewaarbaar gemaakt.",
),
],
default="nog_te_archiveren",
help_text="Aanduiding of het zaakdossier blijvend bewaard of na een bepaalde termijn vernietigd moet worden.",
max_length=40,
verbose_name="archiefstatus",
),
),
migrations.AddField(
model_name="enkelvoudiginformatieobject",
name="bevat_persoonsgegevens",
field=models.CharField(
choices=[
(
"onbekend",
"Niet bekend of het document persoonsgegevens bevat dieniet vrijelijk openbaar gemaakt mogen worden.",
),
(
"ja",
"Niet bekend of het document persoonsgegevens bevat dieniet vrijelijk openbaar gemaakt mogen worden.",
),
(
"nee",
"Bevat geen persoonsgegevens die niet vrijelijk openbaargemaakt mogen worden.",
),
],
default="onbekend",
help_text="Legt vast of het document persoonsgegevens bevat die niet vrijelijk openbaar gemaakt mogen worden.",
max_length=40,
null=True,
verbose_name="bevat persoonsgegevens",
),
),
migrations.AddField(
model_name="enkelvoudiginformatieobject",
name="ontvangen",
field=models.BooleanField(
blank=True,
default=None,
help_text="Legt vast of het document afkomstig is van een externe partij.",
null=True,
verbose_name="ontvangen",
),
),
migrations.AddField(
model_name="enkelvoudiginformatieobject",
name="vervallen",
field=models.BooleanField(
blank=True,
default=None,
help_text="Legt vast of het document een rol speelt in het huidige of toekomstige proces.",
null=True,
verbose_name="vervallen",
),
),
migrations.AlterField(
model_name="enkelvoudiginformatieobject",
name="status",
field=models.CharField(
blank=True,
choices=[
("in_bewerking", "In bewerking"),
("concept", "Concept"),
("definitief", "Definitief"),
("ter_vaststelling", "Ter vaststelling"),
("vastgesteld", "Vastgesteld"),
("gearchiveerd", "Gearchiveerd"),
],
help_text="Aanduiding van de stand van zaken van een INFORMATIEOBJECT. De waarden 'in bewerking' en 'ter vaststelling' komen niet voor als het attribuut `ontvangstdatum` van een waarde is voorzien. Wijziging van de Status in 'gearchiveerd' impliceert dat het informatieobject een duurzaam, niet-wijzigbaar Formaat dient te hebben.",
max_length=20,
verbose_name="status",
),
),
]
Loading

0 comments on commit 6b763bd

Please sign in to comment.