Skip to content

Feature/sparql qc queries#789

Open
shanmukhkalasamudram wants to merge 5 commits intodevelopfrom
feature/sparql-qc-queries
Open

Feature/sparql qc queries#789
shanmukhkalasamudram wants to merge 5 commits intodevelopfrom
feature/sparql-qc-queries

Conversation

@shanmukhkalasamudram
Copy link
Contributor

Query Checks
CCO_classes_have_BFO_superclass Fixed — old namespace was dead, always passed silently
no_cco_elucidation No terms using deprecated v1 elucidation property
missing_definition_source All terms have a definition source annotation
exactly_1_label Every term has exactly one rdfs:label
exactly_1_curated_in Every term has exactly one "curated in ontology" annotation
annotation_language_tag All natural-language annotations carry @en tag
iri_format_check All IRIs match ont + 8-digit format
curated_in_matches_ontology "Curated in" values point to a valid CCO module IRI
no_duplicate_declarations No term declared as two different OWL types
duplicate_iri_number No two terms share the same 8-digit numeric fragment across namespaces

- Fix CCO_classes_have_BFO_superclass.sparql namespace (v1 -> v2)
- Add validate-profile DL targets to Makefile (Step 6b)
- Add build/artifacts/ and build/lib/ to .gitignore
- New: no_cco_elucidation.sparql (Step 6j)
- New: missing_definition_source.sparql (Step 6h)
- New: exactly_1_label.sparql (Step 6c)
- New: exactly_1_curated_in.sparql (Step 6c)
- New: annotation_language_tag.sparql (Step 6i)
- New: iri_format_check.sparql (Step 6e)
- New: curated_in_matches_ontology.sparql (Step 6f)
- New: no_duplicate_declarations.sparql (Step 6d)

All queries tested against CommonCoreOntologiesMerged.ttl and
verified with synthetic TTL files to confirm non-silent failure.
Pre-release gaps surfaced: 815 missing definition sources,
1 missing curated-in (ont00001660), 9 missing @en language tags.
- Add .github/release.yml to categorize PRs by label in release notes
- Add 'Generate Release Notes' step to manage_release.yml that calls
  the GitHub API to auto-generate notes and injects them into the
  existing draft release via gh release edit --notes-file
@johnbeve
Copy link
Contributor

@shanmukhkalasamudram Did you check that these return the expected results? If so, can you provide the results of your testing in the comments here?

@shanmukhkalasamudram
Copy link
Contributor Author

shanmukhkalasamudram commented Mar 23, 2026

Hi @johnbeve — yes, tested locally by running all 19 SPARQL queries via robot verify against the merged ontology (ccom-raw.ttl). Results below.

Impact summary: After this PR, every push runs 19 checks. Seven pass completely clean against the current ontology, giving us a reliable release gate for those properties. The remaining queries surfaced pre-existing issues that were previously invisible — none were introduced by this PR.


Queries passing clean (0 violations)

deprecated_property_reference · duplicate_definition · duplicate_iri_number · duplicate_label · exactly_1_prefLabel_per_lang · min_1_ontology_title · subclass_circularity


Pre-existing issues surfaced by the new queries

Query Findings Severity
missing_definition_source 835 terms have a definition but no source citation WARNING
min_1_eng_def 87 terms missing any English definition WARNING
annotation_language_tag 12 annotations on 5 terms missing @en tag ERROR
annotation_whitespace 8 annotation values with leading/trailing whitespace ERROR
no_multiple_inverse_properties ont00001995 has two owl:inverseOf declarations ERROR
exactly_1_curated_in ont00001660 (International Geomagnetic Reference Field) missing cco:ont00001760 ERROR

The remaining results contain only test-fixture IRIs (ont9999xxx) planted to verify detection logic — no real ontology terms appear in those results.

@shanmukhkalasamudram
Copy link
Contributor Author

Full CSV results are attached as ontology_release_results in this CI run (completed successfully).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants