Skip to content

Commit

Permalink
Add some debugging to committee generation
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life committed Nov 6, 2023
1 parent 002b579 commit 8a35d10
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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

0 comments on commit 8a35d10

Please sign in to comment.