Skip to content

feat: add pipeline-void package and extend pipeline with analyzers, writers, and SPARQL utilities - #48

Merged
ddeboer merged 27 commits into
mainfrom
feat/pipeline-migration
Feb 7, 2026
Merged

feat: add pipeline-void package and extend pipeline with analyzers, writers, and SPARQL utilities#48
ddeboer merged 27 commits into
mainfrom
feat/pipeline-migration

Conversation

@ddeboer

@ddeboer ddeboer commented Feb 5, 2026

Copy link
Copy Markdown
Member

Summary

Add @lde/pipeline-void package for VOiD dataset description generation and extend @lde/pipeline with shared abstractions.

New: @lde/pipeline-void

  • VOiD analyzers that run SPARQL CONSTRUCT queries against dataset endpoints to generate VOiD descriptions
  • PerClassAnalyzer: runs per-class partition queries with configurable concurrency
  • SparqlQueryAnalyzer: runs standalone SPARQL CONSTRUCT queries
  • VocabularyAnalyzer: fetches and includes referenced vocabularies
  • Factory functions for common analyzers (datatype, language, object class)
  • Provenance utility for adding PROV-O metadata to analysis results
  • 16 SPARQL query templates for VOiD statistics

Extended: @lde/pipeline

  • @lde/pipeline/analyzer subpath export: abstract Analyzer, BaseAnalyzer, Success, Failure types shared with pipeline-void
  • @lde/pipeline/writer subpath export: FileWriter, SparqlUpdateWriter, shared serializeQuads() utility
  • SparqlConstructExecutor with bindings support and collect() helper
  • DistributionAnalyzer and DistributionProbe for DCAT distribution analysis
  • PipelineBuilder and PipelineConfig for declarative pipeline construction
  • readQueryFile() utility for loading SPARQL query templates

Other changes

  • distribution-downloader: replace DownloadLogger with standard Logger interface
  • Fix CI flaky test caused by SPARQL endpoint port conflict (document port allocations in AGENTS.md)
  • Update coverage thresholds for pipeline, pipeline-void, and sparql-qlever

Test plan

  • npx nx run-many -t build passes
  • npx nx run-many -t test passes
  • npx nx run-many -t lint typecheck passes

- Add @lde/pipeline-void package with VOiD statistical analyzers
  - SparqlQueryAnalyzer for CONSTRUCT queries with template substitution
  - PerClassAnalyzer for two-phase class iteration to avoid timeouts
  - 16 SPARQL query files for dataset analysis

- Add @lde/sparql-writer package for RDF output
  - SparqlUpdateWriter using INSERT DATA queries
  - FileWriter for Turtle/N-Triples/N-Quads files

- Enhance @lde/task-runner-native
  - Add configurable working directory (cwd option)
  - Add graceful shutdown with SIGKILL escalation after timeout
  - Handle already-exited processes in stop()

- Update @lde/sparql-qlever for new CLI names
  - IndexBuilderMain → qlever-index
  - ServerMain → qlever-server
  - Add waitForSparqlEndpointAvailable after server start

- Add PipelineBuilder fluent DSL to @lde/pipeline
  - Builder pattern with withSelector(), addStep(), addWriter()
  - Helper functions: registry(), manual(), fileWriter(), sparqlWriter()
  - defineConfig() and loadPipelineConfig() via c12

- Update README files for task-runner packages
- Add optional logger support and byteSize check to distribution-downloader
  to detect incomplete downloads
- Add DistributionAnalyzer to pipeline for probing dataset distributions
- Remove duplicate Importer/ImportSuccessful/ImportFailed types from
  pipeline, now imports from @lde/sparql-importer
- Add tests for byteSize detection and logger functionality
- Update coverage thresholds to match actual coverage
- Add vite.config.ts to enable running tests via Nx
- Fix test state isolation by resetting distribution properties in beforeEach
- Set coverage thresholds to match actual coverage
Enable running tests via Nx. Coverage thresholds set to 0 since
the only source file (index.ts) is excluded by base config.
- Add loadQuery() static method to PerClassAnalyzer for subclass reuse
- Add ObjectClassAnalyzer, DatatypeAnalyzer, LanguageAnalyzer subclasses
- Add VocabularyAnalyzer decorator that enriches with void:vocabulary triples
- Add withProvenance() utility for PROV-O metadata triples
- Add tests for all new modules (16 new tests, 25 total)
… in PerClassAnalyzer

- Add ExecuteOptions with endpoint and bindings to SparqlConstructExecutor.execute()
- Bindings are applied as string replacements before standard template substitution
- Refactor PerClassAnalyzer to delegate CONSTRUCT execution to SparqlConstructExecutor
- Keep SELECT class query with its own substituteSelectTemplates method
- Add SparqlConstructExecutor, collect(), and related types to @lde/pipeline
- Remove vite.config.ts and vitest.config.ts from include in
  distribution-downloader and wait-for-sparql tsconfig.spec.json
- Fixes typecheck errors caused by vite.base.config.ts being outside rootDir
…rd Logger interface

- Define Logger interface matching abstract-logging/pino shape
- Add noopLogger default to eliminate optional chaining
- No new dependencies; structurally compatible with pino BaseLogger
- Refactor SparqlQuery step to delegate to SparqlConstructExecutor
- Refactor SparqlQueryAnalyzer to use executor + collect()
- Add @lde/pipeline dependency to pipeline-void
- Add n3 dependency to pipeline for collect()
- Add sparql and distribution exports to pipeline index
- Fix eslint vite.config ignore in distribution-downloader, wait-for-sparql
- Update sparql-qlever coverage thresholds and QLever image
- Use void-ext:distinctLiterals instead of nde:distinctObjectsLiteral
- Use void-ext:distinctIRIReferenceObjects instead of nde:distinctObjectsURI
- Drop non-distinct total counts (no standard equivalent)
- Remove nde: prefix dependency from query files
- Add unit tests for collect() utility (stream to Store)
- Ignore tsconfig.tsbuildinfo and vite.base.config.d.ts artifacts
- Fix stale @lde/* dependency versions in pipeline-void, sparql-writer, sparql-qlever
- Add fileParallelism: false to pipeline tests to prevent port conflicts
- Fix sparql-writer mock type to satisfy TypeScript strict checks
- Update coverage thresholds for Vitest 4
- Sync tsconfig references via Nx
@ddeboer
ddeboer force-pushed the feat/pipeline-migration branch from da39df8 to 9c58756 Compare February 6, 2026 18:44
- Create @lde/pipeline/analyzer subpath export with Analyzer, BaseAnalyzer,
  Success, Failure, and re-exported NotSupported from step.ts
- Delete pipeline-void's local analyzer.ts; re-export from @lde/pipeline/analyzer
- Update concrete analyzers to import from @lde/pipeline/analyzer
- Remove PipelineNotSupported alias workaround, use shared NotSupported directly
- Update coverage thresholds to reflect removed source file
…void

- Extract substituteQueryTemplates as shared function from SparqlConstructExecutor
- Remove AnalyzableDataset; use ExecutableDataset from @lde/pipeline instead
- Remove duplicate substituteSelectTemplates from PerClassAnalyzer
- Add pipeline README
- Update coverage thresholds
jest-dev-server waits for the TCP port but comunica's worker may still
be loading the data file. Poll with an ASK query until the endpoint
responds with HTTP 200 before returning.
@ddeboer
ddeboer force-pushed the feat/pipeline-migration branch from d5140b6 to 6926c8a Compare February 7, 2026 17:53
- Replace hand-rolled polling loop with @lde/wait-for-sparql's
  waitForSparqlEndpointAvailable (uses p-retry with CONSTRUCT query)
- Use UNION query to detect data in both default and named graphs
- Change pipeline executor test port from 3002 to 3003 to avoid
  conflict with dataset-registry-client tests running in parallel
- The port conflict (3002) was the actual cause of flaky CI tests,
  not missing data readiness — fixed in previous commit
- Remove wait-for-sparql dependency and UNION query workaround
- Restore simple jest-dev-server TCP port check
- Use readQueryFile() from @lde/pipeline in pipeline-void analyzers
  instead of reimplementing file reading with readFile + toString
- Use collect() from @lde/pipeline in PerClassAnalyzer instead of
  inline for-await loop
- Merge @lde/sparql-writer into @lde/pipeline as subpath export
  @lde/pipeline/writer (Writer, FileWriter, SparqlUpdateWriter)
- Delete standalone sparql-writer package
- Update coverage thresholds
- Revert all sparql-qlever changes (not part of this PR's scope)
- Document SPARQL test port allocations in CLAUDE.md to prevent
  future conflicts when Nx runs tests in parallel
…ith factories

- Extract serializeQuads() into pipeline/writer/serialize.ts, used by
  both fileWriter and sparqlUpdateWriter instead of duplicated N3 wrappers
- Replace DatatypeAnalyzer, LanguageAnalyzer, ObjectClassAnalyzer subclass
  files with factory functions in perClassAnalyzer.ts (-69 lines, +24)
- Restore sparql-qlever tsconfig.json to main state
- Update coverage thresholds for both packages
@ddeboer ddeboer changed the title feat: add pipeline migration packages and configuration support refactor: move analyzer contracts to pipeline and reduce duplication Feb 7, 2026
@ddeboer ddeboer changed the title refactor: move analyzer contracts to pipeline and reduce duplication feat: add pipeline-void package and extend pipeline with analyzers, writers, and SPARQL utilities Feb 7, 2026
@ddeboer
ddeboer merged commit 0014f16 into main Feb 7, 2026
2 checks passed
@ddeboer
ddeboer deleted the feat/pipeline-migration branch February 7, 2026 19:08
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.

1 participant