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

use correct URI base from config for creating mandatees #25

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/generate-mandatees/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
REGERINGSSAMENSTELLING_BASE_URI = "http://themis.vlaanderen.be/id/bestuursorgaan/"
LEGISLATUUR_BASE_URI = "http://themis.vlaanderen.be/id/bestuursorgaan/"
MANDAAT_BASE_URI = "http://themis.vlaanderen.be/id/mandaat/"
MANDATEE_BASE_URI = "http://themis.vlaanderen.be/id/mandataris/"
INVALIDATION_BASE_URI = "http://themis.vlaanderen.be/id/opheffing/"
GENERATION_BASE_URI = "http://themis.vlaanderen.be/id/creatie/"

5 changes: 3 additions & 2 deletions scripts/generate-mandatees/mandatees.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from rdflib import Graph, Literal, URIRef
from validation import DateValidator, NumberValidator
from namespaces import *
from config import BRUSSELS_TZ
from config import BRUSSELS_TZ,\
MANDATEE_BASE_URI

MANDATEE_QUESTIONS = [
{
Expand Down Expand Up @@ -51,7 +52,7 @@
def generate_mandatee(title, person, start_date, end_date, rank, mandate, regeringssamenstelling):
g = Graph()
uuid = generate_uuid()
m = g.resource("{}id/mandatee/{}".format(THEMIS_BASE, uuid))
m = g.resource(MANDATEE_BASE_URI + Literal(uuid))
m.set(RDF.type, MANDAAT.Mandataris)
m.set(MU.uuid, Literal(uuid))
if title:
Expand Down