From bfee6de5a95f5a9175717a2b68168fdfc34e862d Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Thu, 24 Feb 2022 18:25:33 +0100 Subject: [PATCH 1/3] Remove unused config and bump kallipe-api --- config/dispatcher/dispatcher.ex | 6 +----- docker-compose.yml | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index 71e6750..9854ec6 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -221,7 +221,7 @@ defmodule Dispatcher do match "/sessions/*path", %{ accept: [:any], layer: :api} do Proxy.forward conn, path, "http://login/sessions/" end - + ############################################################### # SEARCH ############################################################### @@ -239,10 +239,6 @@ defmodule Dispatcher do forward conn, path, "http://kalliope-api/v3/api-docs/" end - match "/changes/*path", %{ layer: :api_services, accept: %{ json: true } } do - forward conn, path, "http://kalliope-api/changes/" - end - match "/consolidated/*path", %{ layer: :api_services, accept: %{ json: true } } do forward conn, path, "http://kalliope-api/consolidated/" end diff --git a/docker-compose.yml b/docker-compose.yml index 79a9974..2c9f1e6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -79,7 +79,7 @@ services: restart: always logging: *default-logging kalliope-api: - image: lblod/jsonld-delta-service:0.5.4 + image: lblod/jsonld-delta-service:0.5.5-beta.1 volumes: - ./config/kalliope:/config - ./data/files:/share @@ -90,6 +90,7 @@ services: LOGGING_LEVEL: "INFO" SPARQL_ENDPOINT: "http://db:8890/sparql" LIMIT_SIZE: "10000" + MU_AUTH_SUDO: "false" labels: - "logging=true" restart: always @@ -351,4 +352,3 @@ services: environment: - discovery.type=single-node restart: always - \ No newline at end of file From 61deab821295e9dc80f7c04bb64c23080d917700 Mon Sep 17 00:00:00 2001 From: Nordine Bittich <3816305+nbittich@users.noreply.github.com> Date: Mon, 28 Feb 2022 15:26:39 +0100 Subject: [PATCH 2/3] List all positions for a person (ministers + mandatories) & bug fix editing issue with delta (#105) --- config/search/config.json | 270 ++++++++++++++++++++++++++++- config/search/update-handler.store | 3 + docker-compose.yml | 2 +- 3 files changed, 268 insertions(+), 7 deletions(-) create mode 100644 config/search/update-handler.store diff --git a/config/search/config.json b/config/search/config.json index 7122002..f3d5ae4 100644 --- a/config/search/config.json +++ b/config/search/config.json @@ -9,12 +9,13 @@ ], "types": [ { - "type": "person", - "on_path": "people", + "type": "mandatory", + "on_path": "mandatories", "rdf_type": "http://data.lblod.info/vocabularies/erediensten/EredienstMandataris", "properties": { "given_name": ["http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan","http://xmlns.com/foaf/0.1/givenName"], "id": ["http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan","http://mu.semte.ch/vocabularies/core/uuid"], + "uuid": ["http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan","http://mu.semte.ch/vocabularies/core/uuid"], "family_name": ["http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan","http://xmlns.com/foaf/0.1/familyName"], "first_name_used": ["http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan","https://data.vlaanderen.be/ns/persoon#gebruikteVoornaam"], "end_date": "http://data.vlaanderen.be/ns/mandaat#einde", @@ -59,8 +60,7 @@ "http://www.w3.org/ns/org#holds", "http://www.w3.org/ns/org#role", "http://www.w3.org/2004/02/skos/core#prefLabel" - ], - "planned_end_date": "https://data.lblod.info/vocabularies/erediensten/geplandeEinddatumAanstelling" + ] }, "mappings": { @@ -123,11 +123,269 @@ } } }, - "end_date": { "type": "date" }, - "planned_end_date": { "type": "date" } + "end_date": { "type": "date" } } } }, + { + "type": "minister", + "on_path": "ministers", + "rdf_type": "http://data.lblod.info/vocabularies/erediensten/RolBedienaar", + "sub_types": ["http://data.lblod.info/vocabularies/contacthub/AgentInPositie"], + "properties": { + "given_name": ["http://www.w3.org/ns/org#heldBy","http://xmlns.com/foaf/0.1/givenName"], + "id": ["http://www.w3.org/ns/org#heldBy","http://mu.semte.ch/vocabularies/core/uuid"], + "uuid": ["http://www.w3.org/ns/org#heldBy","http://mu.semte.ch/vocabularies/core/uuid"], + "family_name": ["http://www.w3.org/ns/org#heldBy","http://xmlns.com/foaf/0.1/familyName"], + "first_name_used": ["http://www.w3.org/ns/org#heldBy","https://data.vlaanderen.be/ns/persoon#gebruikteVoornaam"], + "end_date": "http://data.lblod.info/vocabularies/contacthub/eindedatum", + "organization_id": [ + "http://www.w3.org/ns/org#holds", + "^http://data.lblod.info/vocabularies/erediensten/wordtBediendDoor", + "http://mu.semte.ch/vocabularies/core/uuid" + ], + "organization_name": [ + "http://www.w3.org/ns/org#holds", + "^http://data.lblod.info/vocabularies/erediensten/wordtBediendDoor", + "http://www.w3.org/2004/02/skos/core#prefLabel" + ], + "organization_municipality": [ + "http://www.w3.org/ns/org#holds", + "^http://data.lblod.info/vocabularies/erediensten/wordtBediendDoor", + "http://www.w3.org/ns/org#hasPrimarySite", + "https://data.vlaanderen.be/ns/organisatie#bestaatUit", + "https://data.vlaanderen.be/ns/adres#gemeentenaam" + ], + "organization_province": [ + "http://www.w3.org/ns/org#holds", + "^http://data.lblod.info/vocabularies/erediensten/wordtBediendDoor", + "http://www.w3.org/ns/org#hasPrimarySite", + "https://data.vlaanderen.be/ns/organisatie#bestaatUit", + "http://www.w3.org/ns/locn#adminUnitL2" + ], + "position_id": [ + "http://www.w3.org/ns/org#holds", + "http://data.lblod.info/vocabularies/erediensten/functie", + "http://mu.semte.ch/vocabularies/core/uuid" + ], + "position_name": [ + "http://www.w3.org/ns/org#holds", + "http://data.lblod.info/vocabularies/erediensten/functie", + "http://www.w3.org/2004/02/skos/core#prefLabel" + ] + }, + + "mappings": { + "properties": { + "family_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "id": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "given_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_id": { "type": "text" }, + "organization_province": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_municipality": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "position_id": { "type": "text" }, + "position_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "end_date": { "type": "date" } + } + } + }, + { + "type" : "person", + "composite_types" : ["minister", "mandatory"], + "on_path" : "people", + "properties" : [ + { + "name" : "given_name", + "mappings" : { + "minister" : "given_name", + "mandatory" : "given_name" + } + }, + { + "name" : "id", + "mappings" : { + "minister" : "id", + "mandatory" : "id" + } + }, + { + "name" : "family_name", + "mappings" : { + "minister" : "family_name", + "mandatory" : "family_name" + } + }, + { + "name" : "first_name_used", + "mappings" : { + "minister" : "first_name_used", + "mandatory" : "first_name_used" + } + }, + { + "name" : "end_date", + "mappings" : { + "minister" : "end_date", + "mandatory" : "end_date" + } + }, + { + "name" : "organization_id", + "mappings" : { + "minister" : "organization_id", + "mandatory" : "organization_id" + } + }, + { + "name" : "organization_name", + "mappings" : { + "minister" : "organization_name", + "mandatory" : "organization_name" + } + }, + { + "name" : "organization_municipality", + "mappings" : { + "minister" : "organization_municipality", + "mandatory" : "organization_municipality" + } + }, + { + "name" : "organization_province", + "mappings" : { + "minister" : "organization_province", + "mandatory" : "organization_province" + } + }, + { + "name" : "position_id", + "mappings" : { + "minister" : "position_id", + "mandatory" : "position_id" + } + }, + { + "name" : "position_name", + "mappings" : { + "minister" : "position_name", + "mandatory" : "position_name" + } + } + ], + "mappings": { + "properties": { + "family_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "id": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "given_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_id": { "type": "text" }, + "organization_province": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_municipality": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "position_id": { "type": "text" }, + "position_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "end_date": { "type": "date" } + } + } + }, { "type": "unit", "on_path": "units", diff --git a/config/search/update-handler.store b/config/search/update-handler.store new file mode 100644 index 0000000..90757d3 --- /dev/null +++ b/config/search/update-handler.store @@ -0,0 +1,3 @@ +--- +queue: [] +index: {} diff --git a/docker-compose.yml b/docker-compose.yml index 79a9974..ae221c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -338,7 +338,7 @@ services: # MU SEARCH - TODO USE THE CORRECT IMAGE ONCE INHERITANCE IS IN MU SEARCH ################################################################################ search: - image: nbittich/mu-search:wip + image: nbittich/mu-search:wip-inheritance links: - db:database restart: always From cd185f427e9777e51732472667b91c1c073f9811 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 28 Feb 2022 17:24:42 +0100 Subject: [PATCH 3/3] Bump kalliope api to v0.5.5 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2c9f1e6..5dfbbb5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -79,7 +79,7 @@ services: restart: always logging: *default-logging kalliope-api: - image: lblod/jsonld-delta-service:0.5.5-beta.1 + image: lblod/jsonld-delta-service:0.5.5 volumes: - ./config/kalliope:/config - ./data/files:/share