Skip to content

Commit

Permalink
issue has been updated and redone
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivrij committed Mar 25, 2024
1 parent 73843b2 commit aa282d3
Show file tree
Hide file tree
Showing 25 changed files with 63 additions and 279 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
===========
Wijzigingen
===========
1.5.0 (2023-13-05)
1.5.0 (2024-25-03)
===========

- **Changed:** Status within EIO to include more fields.
- **Added:** Fields on EIO (vervallen, ontvangen, archiefstatus, bevat_persoonsgegevens).
- **Added:** Fields on EIO (inhoudIsVervallen).

===========
1.4.3 (2023-10-24)
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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.5.0 2023-12-05 `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>`_
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>`_
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
5 changes: 1 addition & 4 deletions src/drc/api/serializers/enkelvoudig_informatieobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,7 @@ class Meta:
"locked",
"bestandsdelen",
"trefwoorden",
"archiefstatus",
"bevat_persoonsgegevens",
"ontvangen",
"vervallen",
"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
10 changes: 2 additions & 8 deletions src/drc/api/tests/test_enkelvoudiginformatieobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ def test_create(self, *mocks):
"informatieobjecttype": INFORMATIEOBJECTTYPE,
"vertrouwelijkheidaanduiding": "openbaar",
"verschijningsvorm": "Vorm A",
"archiefstatus": "nog_te_archiveren",
"bevatPersoonsgegevens": "onbekend",
"ontvangen": None,
"vervallen": None,
"inhoudIsVervallen": None,
}

# Send to the API
Expand Down Expand Up @@ -179,10 +176,7 @@ def test_read(self):
"locked": False,
"bestandsdelen": [],
"trefwoorden": None,
"archiefstatus": "nog_te_archiveren",
"bevatPersoonsgegevens": "onbekend",
"ontvangen": None,
"vervallen": 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
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
73 changes: 3 additions & 70 deletions src/drc/datamodel/models/enkelvoudig_informatieobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _

from djchoices import ChoiceItem, DjangoChoices
from privates.fields import PrivateMediaFileField
from vng_api_common.caching import ETagMixin
from vng_api_common.descriptors import GegevensGroepType
Expand All @@ -15,43 +14,6 @@
from .informatieobject import InformatieObject


class Persoonsgegevens(DjangoChoices):
onbekend = ChoiceItem(
"onbekend",
_(
"Niet bekend of het document persoonsgegevens bevat die"
"niet vrijelijk openbaar gemaakt mogen worden."
),
)
ja = ChoiceItem(
"ja",
_(
"Niet bekend of het document persoonsgegevens bevat die"
"niet vrijelijk openbaar gemaakt mogen worden."
),
)
nee = ChoiceItem(
"nee",
_(
"Bevat geen persoonsgegevens die niet vrijelijk openbaar"
"gemaakt mogen worden."
),
)


class ArchiefStatusEIO(DjangoChoices):
nog_te_archiveren = ChoiceItem(
"nog_te_archiveren",
_("De zaak cq. het zaakdossier is nog niet als geheel gearchiveerd."),
)
gearchiveerd = ChoiceItem(
"gearchiveerd",
_(
"De zaak cq. het zaakdossier is als geheel niet-wijzigbaar bewaarbaar gemaakt."
),
)


class EnkelvoudigInformatieObjectCanonical(models.Model):
"""
Indicates the identity of a document
Expand Down Expand Up @@ -195,42 +157,13 @@ class EnkelvoudigInformatieObject(ETagMixin, APIMixin, InformatieObject):
null=True,
)

vervallen = models.BooleanField(
_("vervallen"),
inhoud_is_vervallen = models.BooleanField(
_("inhoud is vervallen"),
blank=True,
default=None,
null=True,
help_text=_(
"Legt vast of het document een rol speelt in het huidige of toekomstige proces."
),
)

ontvangen = models.BooleanField(
_("ontvangen"),
blank=True,
default=None,
null=True,
help_text=_("Legt vast of het document afkomstig is van een externe partij."),
)

archiefstatus = models.CharField(
_("archiefstatus"),
max_length=40,
choices=ArchiefStatusEIO.choices,
default=ArchiefStatusEIO.nog_te_archiveren,
help_text=_(
"Aanduiding of het zaakdossier blijvend bewaard of na een bepaalde termijn vernietigd moet worden."
),
)

bevat_persoonsgegevens = models.CharField(
_("bevat persoonsgegevens"),
max_length=40,
null=True,
choices=Persoonsgegevens.choices,
default=Persoonsgegevens.onbekend,
help_text=_(
"Legt vast of het document persoonsgegevens bevat die niet vrijelijk openbaar gemaakt mogen worden."
"Geeft aan of de inhoud van het informatieobject vervallen (dus niet langer geldig) is."
),
)

Expand Down
1 change: 1 addition & 0 deletions src/drc/datamodel/tests/test_statussen.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests for the business logic w/r to statussen, from RGBZ.
"""

from datetime import date

from django.core.exceptions import ValidationError
Expand Down
1 change: 1 addition & 0 deletions src/drc/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
do NOT import anything Django related here, as this file needs to be loaded
before Django is initialized.
"""

import os

from dotenv import load_dotenv
Expand Down
1 change: 1 addition & 0 deletions src/drc/tests/test_userstory_154.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* https://github.com/VNG-Realisatie/gemma-zaken/issues/154 (us)
* https://github.com/VNG-Realisatie/gemma-zaken/issues/239 (mapping)
"""

from rest_framework import status
from rest_framework.test import APITestCase
from vng_api_common.tests import JWTAuthMixin, TypeCheckMixin, get_operation_url
Expand Down
1 change: 1 addition & 0 deletions src/drc/tests/test_userstory_169.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* https://github.com/VNG-Realisatie/gemma-zaken/issues/169 (us)
* https://github.com/VNG-Realisatie/gemma-zaken/issues/182 (mapping)
"""

import base64
from io import BytesIO
from unittest.mock import patch
Expand Down
1 change: 1 addition & 0 deletions src/drc/tests/test_userstory_349.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Ref: https://github.com/VNG-Realisatie/gemma-zaken/issues/349
"""

from django.test import override_settings

from rest_framework import status
Expand Down
1 change: 1 addition & 0 deletions src/drc/tests/test_userstory_39.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test the flow described in https://github.com/VNG-Realisatie/gemma-zaken/issues/39
"""

import base64
from datetime import date
from unittest.mock import patch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
See:
https://github.com/VNG-Realisatie/gemma-zaken/issues/609
"""

from base64 import b64encode
from unittest.mock import patch

Expand Down
1 change: 1 addition & 0 deletions src/drc/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application
Expand Down
Loading

0 comments on commit aa282d3

Please sign in to comment.