From 8a35d104958e65b3e79364f358bbcbf5b6c81537 Mon Sep 17 00:00:00 2001 From: Sean Kelly Date: Mon, 6 Nov 2023 16:27:26 -0600 Subject: [PATCH] Add some debugging to committee generation --- .../edrn/rdf/dmcccommitteerdfgenerator.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py b/src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py index a80a369..ab9948a 100644 --- a/src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py +++ b/src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py @@ -50,7 +50,7 @@ class IDMCCCommitteeRDFGenerator(IRDFGenerator): ) membershipOperation = schema.TextLine( title=_('Membership Operation Name'), - description=_('Name of the SOAP operation to invoke in order to retrieve information about whose in what committees.'), + description=_("Name of the SOAP operation to invoke in order to retrieve information about who's in what committees."), required=True, ) verificationNum = schema.TextLine( @@ -154,11 +154,20 @@ def generateGraph(self): if value not in _roleNamePredicates: continue predicateURI = URIRef(getattr(context, _roleNamePredicates[value])) 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) graph.add((subjectURI, predicateURI, obj)) if unusedSlots: - _logger.warning('For %s the following slots were unused: %s', '/'.join(context.getPhysicalPath()), - ', '.join(unusedSlots)) + _logger.warning( + 'For %s the following slots were unused: %s', '/'.join(context.getPhysicalPath()), + ', '.join(unusedSlots) + ) + + try: + graph.serialize(destination='/tmp/committees.rdf', format='pretty-xml') + except: + pass # C'est tout. return graph