feat: add pipeline-void package and extend pipeline with analyzers, writers, and SPARQL utilities - #48
Merged
Merged
Conversation
- 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
force-pushed
the
feat/pipeline-migration
branch
from
February 6, 2026 18:44
da39df8 to
9c58756
Compare
- 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
force-pushed
the
feat/pipeline-migration
branch
from
February 7, 2026 17:53
d5140b6 to
6926c8a
Compare
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
@lde/pipeline-voidpackage for VOiD dataset description generation and extend@lde/pipelinewith shared abstractions.New:
@lde/pipeline-voidPerClassAnalyzer: runs per-class partition queries with configurable concurrencySparqlQueryAnalyzer: runs standalone SPARQL CONSTRUCT queriesVocabularyAnalyzer: fetches and includes referenced vocabulariesExtended:
@lde/pipeline@lde/pipeline/analyzersubpath export: abstractAnalyzer,BaseAnalyzer,Success,Failuretypes shared with pipeline-void@lde/pipeline/writersubpath export:FileWriter,SparqlUpdateWriter, sharedserializeQuads()utilitySparqlConstructExecutorwith bindings support andcollect()helperDistributionAnalyzerandDistributionProbefor DCAT distribution analysisPipelineBuilderandPipelineConfigfor declarative pipeline constructionreadQueryFile()utility for loading SPARQL query templatesOther changes
distribution-downloader: replaceDownloadLoggerwith standardLoggerinterfaceTest plan
npx nx run-many -t buildpassesnpx nx run-many -t testpassesnpx nx run-many -t lint typecheckpasses