From 7e1a2863449a2771872e5764ac377802dba01b83 Mon Sep 17 00:00:00 2001 From: Sean Kelly Date: Tue, 7 Nov 2023 08:35:00 -0600 Subject: [PATCH] more debugging --- src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py | 10 +++++++++- src/edrn.rdf/edrn/rdf/siterdfupdater.py | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py b/src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py index ab9948a..bf757da 100644 --- a/src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py +++ b/src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py @@ -144,15 +144,23 @@ def generateGraph(self): horribleMembers = members(verificationNum) for row in splitDMCCRows(horribleMembers): subjectURI = predicateURI = obj = None + gotChristos = False for key, value in parseTokens(row): if not value: continue if key == 'committee_identifier': subjectURI = URIRef(context.uriPrefix + value) elif key == 'Registered_Person_Identifer': + if value == '2313': + gotChristos = True obj = URIRef(context.personPrefix + value) elif key == 'roleName': - if value not in _roleNamePredicates: continue + if value not in _roleNamePredicates: + _logger.warning('🤔 Unknown role "%s"; ignoring this member', value) + continue predicateURI = URIRef(getattr(context, _roleNamePredicates[value])) + if gotChristos: + _logger.warning('🎅 Got Christos for subject %s, role %s, obj %s', subjectURI, predicateURI, obj) + gotChristos = False if subjectURI and predicateURI and obj: if obj == URIRef('http://edrn.nci.nih.gov/data/registered-person/2313'): _logger.warning('🎅 Christos! %s, %s, %s', subjectURI, predicateURI, obj) diff --git a/src/edrn.rdf/edrn/rdf/siterdfupdater.py b/src/edrn.rdf/edrn/rdf/siterdfupdater.py index 2641bde..50a5047 100644 --- a/src/edrn.rdf/edrn/rdf/siterdfupdater.py +++ b/src/edrn.rdf/edrn/rdf/siterdfupdater.py @@ -19,6 +19,7 @@ class SiteRDFUpdater(BrowserView): '''A "view" that instructs all RDF sources to generate fresh RDF.''' def render(self): return self.index() + def __call__(self): alsoProvides(self.request, IDisableCSRFProtection) self.request.set('disable_border', True)