netwerk-digitaal-erfgoed / dataset-knowledge-graph

Pipeline that generates the NDE Dataset Knowledge Graph
European Union Public License 1.2
2 stars 0 forks source link

add tests #63

Closed pmaria closed 5 months ago

ddeboer commented 6 months ago

@pmaria Is this now ready for review or still a draft?

pmaria commented 6 months ago

@ddeboer ready. Did you manage with the uriSpace test?

ddeboer commented 5 months ago

@ddeboer ready. Did you manage with the uriSpace test?

Sorry for the wait. As it turns out, the implementation worked fine (really?! 😆). The confusion was that there are two analyzers at play:

  1. a plain SPARQL analyzer that returns object URI prefixes
  2. which is then wrapped in the uriSpace analyzer proper:

https://github.com/netwerk-digitaal-erfgoed/dataset-knowledge-graph/blob/c7225ad76f480c2cad4ce2abe0b947933484cac8/src/main.ts#L49-L51

This second analyzer compares the URI prefixes against the known list of prefixes from the Network of Terms catalog. The uriSpace test was testing 2, but assuming the implementation of 1. I changed the test fixture to refer to a terminology source from the catalog (AAT) and added the relevant assertions.

Merging this. Good to have some real tests and coverage, thanks! 🎉