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

v1.5.0 #239

Closed
wants to merge 14 commits into from
Closed
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.2
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
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
pull_request:
branches:
- "develop"
- "master"

env:
DJANGO_SETTINGS_MODULE: drc.conf.ci
Expand Down Expand Up @@ -104,7 +103,6 @@ jobs:
- check-format
- check-sort
- check-oas
- unit-tests
steps:
-
name: Checkout
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
===========
Wijzigingen
===========
1.5.0 (2024-25-03)
===========

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

===========
1.4.3 (2023-10-24)
===========

- **Changed:** `lock` attribute shows up in EIO.bestandsdelen POST response after creating an EIO.

===========
1.4.2 (2023-09-25)
===========
Expand Down
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Documenten API
==============

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

Expand All @@ -24,6 +24,10 @@ 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 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>`_
1.4.0 2023-08-22 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.4.0/src/openapi.yaml>`_, `Scopes <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.0/src/autorisaties.md>`_ `Berichtkenmerken <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.0/src/notificaties.md>`_
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.2",
"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.2"
__version__ = "1.5.0"
__author__ = "VNG Realisatie"
__homepage__ = "https://github.com/VNG-Realisatie/documenten-api"
__docformat__ = "restructuredtext"
Expand Down
1 change: 0 additions & 1 deletion src/drc/api/serializers/bestandsdeel.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

class BestandsDeelSerializer(serializers.HyperlinkedModelSerializer):
lock = serializers.CharField(
write_only=True,
help_text="Hash string, which represents id of the lock of related informatieobject",
)

Expand Down
12 changes: 7 additions & 5 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 Expand Up @@ -238,7 +239,10 @@ def _create_bestandsdeel(self, full_size, canonical):
for i in range(parts):
chunk_size = min(settings.CHUNK_SIZE, full_size)
BestandsDeel.objects.create(
informatieobject=canonical, omvang=chunk_size, volgnummer=i + 1
informatieobject=canonical,
omvang=chunk_size,
volgnummer=i + 1,
lock=canonical.lock,
)
full_size -= chunk_size

Expand Down Expand Up @@ -266,10 +270,6 @@ def create(self, validated_data):
eio.ondertekening = ondertekening
eio.save()

# large file process
if not eio.inhoud and eio.bestandsomvang and eio.bestandsomvang > 0:
self._create_bestandsdeel(validated_data["bestandsomvang"], canonical)

# create empty file if size == 0
if eio.bestandsomvang == 0:
eio.inhoud.save("empty_file", ContentFile(""))
Expand Down Expand Up @@ -381,6 +381,8 @@ def create(self, validated_data):
# lock document if it is a large file upload
if not eio.inhoud and eio.bestandsomvang and eio.bestandsomvang > 0:
eio.canonical.lock = uuid.uuid4().hex
# large file process
self._create_bestandsdeel(validated_data["bestandsomvang"], eio.canonical)
eio.canonical.save()
return eio

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.2")
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.2"
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
23 changes: 23 additions & 0 deletions src/drc/datamodel/migrations/0064_bestandsdeel_lock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.13 on 2023-10-19 12:27

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("datamodel", "0063_enkelvoudiginformatieobject_trefwoorden"),
]

operations = [
migrations.AddField(
model_name="bestandsdeel",
name="lock",
field=models.CharField(
blank=True,
help_text="Hash string, which represents id of the lock of related informatieobject",
max_length=255,
null=True,
),
),
]
Loading
Loading