Skip to content

Commit

Permalink
Bump schematools 6.5.2 (#960)
Browse files Browse the repository at this point in the history
* update schematools to 6.5.2

* monkeypatch _find_scope_by_id method

* add public scope to data used in openapi spec test
  • Loading branch information
pstokkink authored Feb 26, 2025
1 parent 68573b4 commit 9990040
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 9 deletions.
12 changes: 12 additions & 0 deletions schemas/data/scopes/DADI/openbaar
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "scope",
"id": "OPENBAAR",
"name": "Openbaar",
"accessPackages": {
"nonProduction": "EM4W-DATA-schemascope-ot-scope_openbaar",
"production": "EM4W-DATA-schemascope-p-scope_openbaar"
},
"owner": {
"$ref": "publishers/DADI"
}
}
6 changes: 5 additions & 1 deletion schemas/data/scopes/index
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{}
{
"DADI": [
"openbaar"
]
}
2 changes: 1 addition & 1 deletion src/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ django-vectortiles == 1.0.1
djangorestframework == 3.15.2
djangorestframework-csv == 3.0.2
djangorestframework-gis == 1.1
amsterdam-schema-tools[django] == 6.5.1
amsterdam-schema-tools[django] == 6.5.2
azure-identity == 1.19.0
azure-monitor-opentelemetry == 1.6.4
cachetools == 5.5.1
Expand Down
6 changes: 3 additions & 3 deletions src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements.txt requirements.in
#
amsterdam-schema-tools[django]==6.5.1 \
--hash=sha256:00eec7141b0537260dd6b52e1f757a6032eed0d0f8f310bda4dc44d7e882b934 \
--hash=sha256:81c85583e7c284e8c1c526ea2e7eb954f8c5d76277e05dd69b56f11a26db9d24
amsterdam-schema-tools[django]==6.5.2 \
--hash=sha256:8bb05277c58c8085b6ab0f1e6f7d5383f7f14b6ae6f4c22f7d74e8c867dcf974 \
--hash=sha256:dea8107c9414efc648dbffe868d08b7fcb588b7339861a19bf7b184f09856461
# via -r requirements.in
argparse==1.4.0 \
--hash=sha256:62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4 \
Expand Down
6 changes: 3 additions & 3 deletions src/requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements_dev.txt requirements_dev.in
#
amsterdam-schema-tools[django]==6.5.1 \
--hash=sha256:00eec7141b0537260dd6b52e1f757a6032eed0d0f8f310bda4dc44d7e882b934 \
--hash=sha256:81c85583e7c284e8c1c526ea2e7eb954f8c5d76277e05dd69b56f11a26db9d24
amsterdam-schema-tools[django]==6.5.2 \
--hash=sha256:8bb05277c58c8085b6ab0f1e6f7d5383f7f14b6ae6f4c22f7d74e8c867dcf974 \
--hash=sha256:dea8107c9414efc648dbffe868d08b7fcb588b7339861a19bf7b184f09856461
# via -r ./requirements.in
argparse==1.4.0 \
--hash=sha256:62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4 \
Expand Down
9 changes: 8 additions & 1 deletion src/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from rest_framework.test import APIClient, APIRequestFactory
from schematools.contrib.django.models import Dataset, DynamicModel, Profile
from schematools.loaders import FileSystemProfileLoader, FileSystemSchemaLoader
from schematools.types import DatasetSchema
from schematools.types import DatasetSchema, Scope

from rest_framework_dso.crs import RD_NEW
from tests.test_rest_framework_dso.models import Actor, Category, Location, Movie, MovieUser
Expand All @@ -30,6 +30,13 @@
DATE_2021_JUNE = datetime(2021, 6, 11, 10, 0, tzinfo=get_current_timezone())


# In test files we use a lot of non-existent scopes, so instead of writing scope
# json files we monkeypatch this method.
@pytest.fixture(autouse=True)
def patch_find_scope_by_id(monkeypatch):
monkeypatch.setattr(DatasetSchema, "_find_scope_by_id", Scope.from_string)


@pytest.fixture()
def api_rf() -> APIRequestFactory:
"""Request factory for APIView classes"""
Expand Down

0 comments on commit 9990040

Please sign in to comment.