Skip to content

Commit

Permalink
fixed linting
Browse files Browse the repository at this point in the history
  • Loading branch information
maartyman committed Oct 22, 2024
1 parent dd99cf7 commit 6f3e298
Show file tree
Hide file tree
Showing 39 changed files with 140 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import 'jest-rdf';
import '@incremunica/incremental-jest';
import type { EventEmitter } from 'node:events';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import type { BindingsStream, QueryStringContext } from '@comunica/types';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { ActionContextKeyIsAddition } from '@incremunica/actor-merge-bindings-context-is-addition';
import { DevTools } from '@incremunica/dev-tools';
import { StreamingStore } from '@incremunica/incremental-rdf-streaming-store';
Expand Down
2 changes: 1 addition & 1 deletion engines/query-sparql-incremental/test/QuerySparql-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'jest-rdf';
import '@incremunica/incremental-jest';
import type { EventEmitter } from 'node:events';
import * as http from 'node:http';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import type { Bindings, BindingsStream, QueryStringContext } from '@comunica/types';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { ActionContextKeyIsAddition } from '@incremunica/actor-merge-bindings-context-is-addition';
import { DevTools } from '@incremunica/dev-tools';
import { StreamingStore } from '@incremunica/incremental-rdf-streaming-store';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"@types/readable-stream": "^4.0.0",
"@types/setup-polly-jest": "^0.5.2",
"@types/ws": "^8.5.10",
"readable-stream": "^4.3.0",
"abort-controller": "^3.0.0",
"arrayify-stream": "^2.0.1",
"asynciterator": "^3.9.0",
Expand Down Expand Up @@ -83,6 +82,7 @@
"rdf-terms": "^1.9.1",
"rdf-test-suite": "^1.19.3",
"rdf-test-suite-ldf": "^1.4.2",
"readable-stream": "^4.3.0",
"setup-polly-jest": "^0.11.0",
"sparqlalgebrajs": "^4.3.8",
"stream-to-string": "^1.2.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/actor-guard-naive/lib/ActorGuardNaive.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { EventEmitter } from 'node:events';
import type { MediatorDereferenceRdf } from '@comunica/bus-dereference-rdf';
import {IActorTest, passTestVoid, TestResult} from '@comunica/core';
import type { IActorTest, TestResult } from '@comunica/core';
import { passTestVoid } from '@comunica/core';
import type { IActionGuard, IActorGuardOutput, IActorGuardArgs } from '@incremunica/bus-guard';
import { ActorGuard } from '@incremunica/bus-guard';
import type { MediatorResourceWatch } from '@incremunica/bus-resource-watch';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type {
import {
ActorMergeBindingsContext,
} from '@comunica/bus-merge-bindings-context';
import {IActorTest, passTestVoid, TestResult} from '@comunica/core';
import type { IActorTest, TestResult } from '@comunica/core';
import { passTestVoid } from '@comunica/core';
import type { IActionContextKey } from '@comunica/types';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { ActionContext, Bus } from '@comunica/core';
import type { IActionContext } from '@comunica/types';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { DevTools } from '@incremunica/dev-tools';
import { DataFactory } from 'rdf-data-factory';
import { ActionContextKeyIsAddition, ActorMergeBindingsContextIsAddition } from '../lib';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import type { Bindings } from '@comunica/utils-bindings-factory';
import type { MediatorHashBindings } from '@comunica/bus-hash-bindings';
import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
import {
ActorQueryOperationTypedMediated,
} from '@comunica/bus-query-operation';
import {IActorTest, passTestVoid, TestResult} from '@comunica/core';
import type { IActorTest, TestResult } from '@comunica/core';
import { passTestVoid } from '@comunica/core';
import type {
IActionContext,
IQueryOperationResult,
IQueryOperationResultBindings,
BindingsStream,
} from '@comunica/types';
import type { Bindings } from '@comunica/utils-bindings-factory';
import { getSafeBindings } from '@comunica/utils-query-operation';
import { ActionContextKeyIsAddition } from '@incremunica/actor-merge-bindings-context-is-addition';
import type { AsyncIterator } from 'asynciterator';
import type { Algebra } from 'sparqlalgebrajs';
import { getSafeBindings } from '@comunica/utils-query-operation';
import {MediatorHashBindings} from "@comunica/bus-hash-bindings";

/**
* An Incremunica Distinct Hash Query Operation Actor.
Expand All @@ -36,7 +37,7 @@ export class ActorQueryOperationIncrementalDistinctHash extends ActorQueryOperat
);
const { hashFunction } = await this.mediatorHashBindings.mediate({ context });
const bindingsStream = <BindingsStream><unknown>(<AsyncIterator<Bindings>><unknown>output.bindingsStream).filter(
this.newHashFilter(entry => hashFunction(entry, [...entry.keys()])),
this.newHashFilter(entry => hashFunction(entry, [ ...entry.keys() ])),
);
return {
type: 'bindings',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { ActionContext, Bus } from '@comunica/core';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { ActionContextKeyIsAddition } from '@incremunica/actor-merge-bindings-context-is-addition';
import { DevTools } from '@incremunica/dev-tools';
import { ArrayIterator } from 'asynciterator';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { BindingsFactory } from '@comunica/utils-bindings-factory';
import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';
import type {
IActionQuerySourceIdentifyHypermedia,
Expand All @@ -7,15 +6,17 @@ import type {
IActorQuerySourceIdentifyHypermediaTest,
} from '@comunica/bus-query-source-identify-hypermedia';
import { ActorQuerySourceIdentifyHypermedia } from '@comunica/bus-query-source-identify-hypermedia';
import {ActionContext, passTest, TestResult} from '@comunica/core';
import { KeysInitQuery } from '@comunica/context-entries';
import type { TestResult } from '@comunica/core';
import { ActionContext, passTest } from '@comunica/core';
import type { ComunicaDataFactory } from '@comunica/types';
import { BindingsFactory } from '@comunica/utils-bindings-factory';
import { StreamingQuerySourceRdfJs } from '@incremunica/actor-query-source-identify-streaming-rdfjs';
import type { MediatorGuard } from '@incremunica/bus-guard';
import { KeysGuard } from '@incremunica/context-entries';
import { StreamingStore } from '@incremunica/incremental-rdf-streaming-store';
import type { Quad } from '@incremunica/incremental-types';
import type * as RDF from '@rdfjs/types';
import type {ComunicaDataFactory} from "@comunica/types";
import {KeysInitQuery} from "@comunica/context-entries";

/**
* An incremunica Stream None Query Source Identify Hypermedia Actor.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'jest-rdf';
import '@incremunica/incremental-jest';
import { EventEmitter } from 'node:events';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { ActionContext, Bus } from '@comunica/core';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import {
ActionContextKeyIsAddition,
ActorMergeBindingsContextIsAddition,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { BindingsFactory } from '@comunica/utils-bindings-factory';
import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';
import type {
IActionQuerySourceIdentify,
IActorQuerySourceIdentifyOutput,
IActorQuerySourceIdentifyArgs,
} from '@comunica/bus-query-source-identify';
import { ActorQuerySourceIdentify } from '@comunica/bus-query-source-identify';
import {IActorTest, passTest, passTestVoid, TestResult} from '@comunica/core';
import { ActionContext } from '@comunica/core';
import { KeysInitQuery } from '@comunica/context-entries';
import type { IActorTest, TestResult } from '@comunica/core';
import { passTestVoid, ActionContext } from '@comunica/core';
import type { ComunicaDataFactory } from '@comunica/types';
import { BindingsFactory } from '@comunica/utils-bindings-factory';
import type { StreamingStore } from '@incremunica/incremental-rdf-streaming-store';
import type { Quad } from '@incremunica/incremental-types';
import { StreamingQuerySourceRdfJs } from './StreamingQuerySourceRdfJs';
import {DataFactory} from "rdf-data-factory";
import type {ComunicaDataFactory} from "@comunica/types";
import {KeysInitQuery} from "@comunica/context-entries";

/**
* An incremunica Streaming RDFJS Query Source Identify Actor.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { ClosableIterator } from '@comunica/utils-iterator';
import {
filterMatchingQuotedQuads,
getVariables,
getDuplicateElementLinks,
setMetadata,
} from '@comunica/bus-query-source-identify';
import { KeysQueryOperation} from '@comunica/context-entries';
import { MetadataValidationState } from '@comunica/utils-metadata';
import { KeysQueryOperation } from '@comunica/context-entries';
import type {
IQuerySource,
BindingsStream,
IActionContext,
FragmentSelectorShape,
Bindings, ComunicaDataFactory,
Bindings,
ComunicaDataFactory,
} from '@comunica/types';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { ClosableIterator } from '@comunica/utils-iterator';
import { MetadataValidationState } from '@comunica/utils-metadata';
import { ActionContextKeyIsAddition } from '@incremunica/actor-merge-bindings-context-is-addition';
import { KeysGuard, KeysStreamingSource } from '@incremunica/context-entries';
import type { StreamingStore } from '@incremunica/incremental-rdf-streaming-store';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Readable } from 'node:stream';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { KeysQueryOperation } from '@comunica/context-entries';
import { ActionContext } from '@comunica/core';
import { MetadataValidationState } from '@comunica/metadata';
import type { IActionContext } from '@comunica/types';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { ActionContextKeyIsAddition } from '@incremunica/actor-merge-bindings-context-is-addition';
import { DevTools } from '@incremunica/dev-tools';
import { StreamingStore } from '@incremunica/incremental-rdf-streaming-store';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import type { Bindings } from '@comunica/utils-bindings-factory';
import type { MediatorHashBindings } from '@comunica/bus-hash-bindings';
import type {
IActionRdfJoin,
IActorRdfJoinArgs,
IActorRdfJoinOutputInner,
IActorRdfJoinTestSideData
IActorRdfJoinTestSideData,
} from '@comunica/bus-rdf-join';
import { ActorRdfJoin } from '@comunica/bus-rdf-join';
import type { TestResult } from '@comunica/core';
import { passTestWithSideData } from '@comunica/core';
import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';
import type { BindingsStream } from '@comunica/types';
import type { Bindings } from '@comunica/utils-bindings-factory';
import type { AsyncIterator } from 'asynciterator';
import { IncrementalMinusHash } from './IncrementalMinusHash';
import {passTestWithSideData, TestResult} from "@comunica/core";
import type {MediatorHashBindings} from "@comunica/bus-hash-bindings";

/**
* An Incremunica Minus Hash RDF Join Actor.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import type { IActionRdfJoin } from '@comunica/bus-rdf-join';
import type { IActionRdfJoinSelectivity, IActorRdfJoinSelectivityOutput } from '@comunica/bus-rdf-join-selectivity';
import type { Actor, IActorTest, Mediator } from '@comunica/core';
import { ActionContext, Bus } from '@comunica/core';
import type { IActionContext } from '@comunica/types';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import {
ActionContextKeyIsAddition,
} from '@incremunica/actor-merge-bindings-context-is-addition';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import type { MediatorHashBindings } from '@comunica/bus-hash-bindings';
import type { Bindings } from '@comunica/utils-bindings-factory';
import type {
IActionRdfJoin,
IActorRdfJoinArgs,
IActorRdfJoinOutputInner,
IActorRdfJoinTestSideData
IActorRdfJoinTestSideData,
} from '@comunica/bus-rdf-join';
import { ActorRdfJoin } from '@comunica/bus-rdf-join';
import type { TestResult } from '@comunica/core';
import { passTestWithSideData } from '@comunica/core';
import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';
import type { BindingsStream } from '@comunica/types';
import type { Bindings } from '@comunica/utils-bindings-factory';
import type { AsyncIterator } from 'asynciterator';
import { IncrementalOptionalHash } from './IncrementalOptionalHash';
import {passTestWithSideData, TestResult} from "@comunica/core";

/**
* An Incremunica Optional Hash RDF Join Actor.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Bindings } from '@comunica/utils-bindings-factory';
import { BindingsFactory } from '@comunica/utils-bindings-factory';
import { ActionContextKeyIsAddition } from '@incremunica/actor-merge-bindings-context-is-addition';
import { IncrementalInnerJoin } from '@incremunica/incremental-inner-join';
import type { AsyncIterator } from 'asynciterator';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import type { IActionRdfJoin } from '@comunica/bus-rdf-join';
import { ActorRdfJoin } from '@comunica/bus-rdf-join';
import type { IActionRdfJoinSelectivity, IActorRdfJoinSelectivityOutput } from '@comunica/bus-rdf-join-selectivity';
import type { Actor, IActorTest, Mediator } from '@comunica/core';
import { ActionContext, Bus } from '@comunica/core';
import { MetadataValidationState } from '@comunica/metadata';
import type { IQueryOperationResultBindings, Bindings, IActionContext } from '@comunica/types';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import {
ActionContextKeyIsAddition,
} from '@incremunica/actor-merge-bindings-context-is-addition';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
import type { Bindings } from '@comunica/utils-bindings-factory';
import { BindingsFactory } from '@comunica/utils-bindings-factory';
import type { MediatorHashBindings } from '@comunica/bus-hash-bindings';
import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';
import type { MediatorQueryOperation } from '@comunica/bus-query-operation';
import type {
IActionRdfJoin,
IActorRdfJoinArgs,
IActorRdfJoinOutputInner,
IActorRdfJoinTestSideData
IActorRdfJoinTestSideData,
} from '@comunica/bus-rdf-join';
import { ActorRdfJoin } from '@comunica/bus-rdf-join';
import type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';
import {KeysInitQuery, KeysQueryOperation} from '@comunica/context-entries';
import { KeysInitQuery, KeysQueryOperation } from '@comunica/context-entries';
import type { TestResult } from '@comunica/core';
import { passTestWithSideData } from '@comunica/core';
import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';
import type {
BindingsStream,
IQuerySource,
IActionContext,
IJoinEntryWithMetadata,
IQueryOperationResultBindings, ComunicaDataFactory,
IQueryOperationResultBindings,
ComunicaDataFactory,
} from '@comunica/types';
import type { Bindings } from '@comunica/utils-bindings-factory';
import { BindingsFactory } from '@comunica/utils-bindings-factory';
import { getSafeBindings, materializeOperation, getOperationSource } from '@comunica/utils-query-operation';
import { ActionContextKeyIsAddition } from '@incremunica/actor-merge-bindings-context-is-addition';
import { KeysStreamingSource } from '@incremunica/context-entries';
import { TransformIterator, UnionIterator } from 'asynciterator';
import type { AsyncIterator } from 'asynciterator';
import type { Algebra } from 'sparqlalgebrajs';
import { Factory } from 'sparqlalgebrajs';
import {passTestWithSideData, TestResult} from "@comunica/core";
import {getSafeBindings, materializeOperation, getOperationSource} from '@comunica/utils-query-operation';
import {MediatorMergeBindingsContext} from "@comunica/bus-merge-bindings-context";
import type {MediatorHashBindings} from "@comunica/bus-hash-bindings";

/**
* A comunica Multi-way Bind RDF Join Actor.
Expand Down Expand Up @@ -179,6 +181,7 @@ export class ActorRdfJoinInnerIncrementalComputationalMultiBind extends ActorRdf
};

return new UnionIterator(baseStream.transform({
// eslint-disable-next-line ts/no-misused-promises
transform: binder,
optional,
}), { autoStart: false });
Expand Down Expand Up @@ -316,7 +319,7 @@ export class ActorRdfJoinInnerIncrementalComputationalMultiBind extends ActorRdf
sources ?? [],
algebraFactory,
bindingsFactory,
entry => hashFunction(entry, [...entry.keys()]),
entry => hashFunction(entry, [ ...entry.keys() ]),
);

return {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { EventEmitter } from 'node:events';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import type { IActionQueryOperation } from '@comunica/bus-query-operation';
import type { IActionRdfJoin } from '@comunica/bus-rdf-join';
import type { IActionRdfJoinEntriesSort, MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';
Expand All @@ -8,8 +7,9 @@ import 'jest-rdf';
import { KeysQueryOperation } from '@comunica/context-entries';
import type { Actor, IActorTest, Mediator } from '@comunica/core';
import { ActionContext, Bus } from '@comunica/core';
import { MetadataValidationState } from '@comunica/metadata';
import type { BindingsStream, IActionContext, IQueryOperationResultBindings } from '@comunica/types';
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
import { MetadataValidationState } from '@comunica/utils-metadata';
import { ActionContextKeyIsAddition } from '@incremunica/actor-merge-bindings-context-is-addition';
import { KeysStreamingSource } from '@incremunica/context-entries';
import { DevTools } from '@incremunica/dev-tools';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import type { Bindings } from '@comunica/utils-bindings-factory';
import type { MediatorHashBindings } from '@comunica/bus-hash-bindings';
import type {
IActionRdfJoin,
IActorRdfJoinArgs,
IActorRdfJoinOutputInner, IActorRdfJoinTestSideData,
IActorRdfJoinOutputInner,
IActorRdfJoinTestSideData,
} from '@comunica/bus-rdf-join';
import {
ActorRdfJoin,
} from '@comunica/bus-rdf-join';
import type { TestResult } from '@comunica/core';
import { passTestWithSideData } from '@comunica/core';
import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';
import type { BindingsStream } from '@comunica/types';
import type { Bindings } from '@comunica/utils-bindings-factory';
import type { AsyncIterator } from 'asynciterator';
import { IncrementalFullHashJoin } from './IncrementalFullHashJoin';
import {passTestWithSideData, TestResult} from "@comunica/core";
import type {MediatorHashBindings} from "@comunica/bus-hash-bindings"

/**
* A comunica Inner Incremental Full Hash RDF Join Actor.
Expand All @@ -38,7 +40,7 @@ export class ActorRdfJoinInnerIncrementalFullHash extends ActorRdfJoin {
<AsyncIterator<Bindings>><unknown>action.entries[1].output.bindingsStream,
<(...bindings: Bindings[]) => Bindings | null>ActorRdfJoin.joinBindings,
entry => hashFunction(entry, commonVariables),
entry => hashFunction(entry, [...entry.keys()]),
entry => hashFunction(entry, [ ...entry.keys() ]),
);
return {
result: {
Expand Down
Loading

0 comments on commit 6f3e298

Please sign in to comment.