Skip to content

Add detailed content reporting for rdf inspect#159

Merged
niegrzybkowski merged 15 commits intomainfrom
GH-75/inspect-report-detail
Jul 16, 2025
Merged

Add detailed content reporting for rdf inspect#159
niegrzybkowski merged 15 commits intomainfrom
GH-75/inspect-report-detail

Conversation

@niegrzybkowski
Copy link
Contributor

@niegrzybkowski niegrzybkowski commented Jul 15, 2025

Closes #75

This PR adds a --detail option, which when set will generate a detailed report on the counts of different terms and nodes, grouped depending on the (one of flat, node, term).

  • node will group by node types, i.e. iri, bnode
  • term will group by term types i.e. subject, predicate
  • flat will not reduce the counts, instead concatenating field names, i.e. subject_iri_count

I move some functionality inside FrameInfo in preparation, and I create a subclass FrameDetailInfo, which holds the detail information and the functionality necessary to aggregate the details appropriately.
I also convert MetricsPrinter to a class, as I needed to handle formatting grouping in different ways, I do it by passing the formatter as a constructor argument.

@niegrzybkowski niegrzybkowski linked an issue Jul 15, 2025 that may be closed by this pull request
@niegrzybkowski niegrzybkowski changed the title Gh 75/inspect report detail Add detailed reporting for rdf inspect Jul 15, 2025
@niegrzybkowski niegrzybkowski changed the title Add detailed reporting for rdf inspect Add detailed content reporting for rdf inspect Jul 15, 2025
@niegrzybkowski niegrzybkowski marked this pull request as ready for review July 15, 2025 11:04
@niegrzybkowski
Copy link
Contributor Author

I will refactor FrameInfo stuff later (when working on #74 ), for now I left it as-is

Copy link
Member

@Ostrzyciel Ostrzyciel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments, I'll now download it and try running it ;)

Co-authored-by: Piotr Sowiński <ostrzycielnozyczek@gmail.com>
Copy link
Member

@Ostrzyciel Ostrzyciel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

@niegrzybkowski niegrzybkowski merged commit 1962a43 into main Jul 16, 2025
7 checks passed
@niegrzybkowski niegrzybkowski deleted the GH-75/inspect-report-detail branch July 16, 2025 09:15
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.

rdf inspect: report on detailed contents of RdfTriple / RdfQuad

2 participants