Skip to content

Commit

Permalink
Merge branch 'prov4itdata/publish' into 'development'
Browse files Browse the repository at this point in the history
Release v1.0.0

See merge request prov4itdata-dapsi/mono-repo!3
  • Loading branch information
gertjandemulder committed Mar 12, 2021
2 parents c3fb8d8 + 38a5fb3 commit c43f20c
Show file tree
Hide file tree
Showing 52 changed files with 14,677 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
**/node_modules
.rdf-test-suite-cache
.idea
lerna-debug.log
yarn-error.log
**/lib/**/*.js
**/lib/**/*.js.map
**/lib/**/*.d.ts
**/test/**/*.js
**/test/**/*.js.map
**/test/**/*.d.ts
**/bin/**/*.js
**/bin/**/*.js.map
**/bin/**/*.d.ts
**/index.js
**/index.js.map
**/index.d.ts
coverage
documentation
earl.ttl
.eslintcache
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.0.0]

- Comunica PROV4ITDaTa Init Actor
- Added Comunica Federated RDF Resolve Quad Pattern Actor
- Added Comunica Annotate Provenance RDF Metadata Extract Actor
- Added Comunica Context Entries
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# Mono Repo
<p align="center">
<a href="https://comunica.dev/">
<img alt="Comunica" src="https://comunica.dev/img/comunica_red.svg" width="200">
</a>
</p>

<p align="center">
<strong>Comunica: PROV4ITDaTa project</strong>
</p>


This is a monorepo that contains a custom Comunica engine with custom actors,
tailored to needs of the PROV4ITDaTa project.</br>
Concretely, this monorepo provides the following packages:
- [`@prov4itdata/actor-init-sparql`](https://www.npmjs.com/package/@prov4itdata/actor-init-sparql): a custom configuration of the Comunica engine.
- [`@prov4itdata/actor-rdf-resolve-quad-pattern-federated`](https://www.npmjs.com/package/@prov4itdata/actor-rdf-resolve-quad-pattern-federated): a slightly updated version of [`@comunica/actor-rdf-resolve-quad-pattern-federated`](https://github.com/comunica/comunica/tree/master/packages/actor-rdf-resolve-quad-pattern-federated) that allows to collect the provenance data from the federated sources.
- [`@prov4itdata/actor-rdf-metadata-extract-annotate-provenance`](https://www.npmjs.com/package/@prov4itdata/actor-rdf-metadata-extract-annotate-provenance): a new actor that captures source-level provenance.
- [`@prov4itdata/context-entries`](https://www.npmjs.com/package/@prov4itdata/context-entries): this package is a plain copy of the not-yet-published https://github.com/comunica/comunica/tree/master/packages/context-entries

## License
This code is copyrighted by [Ghent University – imec](http://idlab.ugent.be/)
and released under the [MIT license](http://opensource.org/licenses/MIT).
21 changes: 21 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"lerna": "2.4.0",
"command": {
"publish": {
"ignoreChanges": [
"*.md"
],
"message": "Bump to release version %s",
"allowBranch": "master",
"npmClient": "npm"
}
},
"packages": [
"packages/*"
],
"useWorkspaces": true,
"version": "1.1.0",
"loglevel": "success",
"registry": "https://registry.npmjs.org/",
"npmClient": "yarn"
}
104 changes: 104 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"engines": {
"node": ">=8.0"
},
"devDependencies": {
"@comunica/bus-query-operation": "^1.19.0",
"@comunica/bus-rdf-dereference": "^1.19.0",
"@comunica/bus-rdf-membership-filter": "^1.0.0",
"@comunica/bus-rdf-metadata-extract": "^1.19.0",
"@comunica/core": "^1.19.0",
"@rdfjs/data-model": "^1.1.1",
"@strictsoftware/typedoc-plugin-monorepo": "^0.4.0",
"@types/bloem": "^0.2.0",
"@types/jest": "^26.0.0",
"@types/murmurhash": "^0.0.1",
"@types/node": "^13.1.7",
"@typescript-eslint/eslint-plugin": "^4.1.1",
"@typescript-eslint/parser": "^4.1.1",
"arrayify-stream": "^1.0.0",
"asynciterator": "^3.0.2",
"babel-loader": "^8.1.0",
"coveralls": "^3.0.0",
"cross-fetch": "^3.0.5",
"eslint": "^7.9.0",
"eslint-config-es": "3.23.2",
"eslint-import-resolver-typescript": "^2.3.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^24.0.2",
"eslint-plugin-tsdoc": "^0.2.7",
"eslint-plugin-unused-imports": "^1.0.0",
"immutable": "^3.8.2",
"jest": "^26.0.0",
"jest-rdf": "^1.3.0",
"lerna": "^4.0.0",
"lodash.assign": "^4.2.0",
"manual-git-changelog": "^1.0.0",
"pre-commit": "^1.2.2",
"rdf-quad": "^1.3.0",
"sparqlalgebrajs": "^2.0.0",
"stream-to-string": "^1.1.0",
"streamify-array": "^1.0.0",
"streamify-string": "^1.0.1",
"ts-jest": "^26.0.0",
"typedoc": "^0.20.0",
"typescript": "^3.9.0",
"uglifyjs-webpack-plugin": "^2.1.1",
"webpack": "^4.28.3",
"webpack-cli": "^4.0.0"
},
"pre-commit": [
"build",
"lint",
"test"
],
"jest": {
"transform": {
"^.+\\.ts$": "ts-jest"
},
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
"moduleFileExtensions": [
"ts",
"js"
],
"setupFilesAfterEnv": [
"./setup-jest.js"
],
"collectCoverage": true,
"coveragePathIgnorePatterns": [
"/node_modules/",
"/mocks/",
"index.js"
],
"testEnvironment": "node",
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
}
},
"scripts": {
"test-changed": "lerna run test --since HEAD",
"build-changed": "lerna run build --since HEAD",
"test": "jest",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"test-ci": "jest --ci --maxWorkers=4 --coverage",
"coveralls-ci": "cat ./coverage/lcov.info | coveralls",
"lint": "eslint . --ext .ts --cache",
"clean": "rm -rf ./node_modules && rm -rf ./packages/*/node_modules",
"build": "tsc",
"build-watch": "tsc --watch",
"publish": "yarn run build && lerna publish",
"publish-bare": "lerna exec -- npm publish --silent",
"doc": "typedoc --name 'Comunica AMF' --disableOutputCheck --external-modulemap '.*packages/([^/]+)/.*' --mode modules --out documentation",
"postinstall": "yarn run build && lerna run prepare",
"version": "manual-git-changelog onversion"
}
}
5 changes: 5 additions & 0 deletions packages/actor-init-sparql-prov4itdata/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
comunica-browser.js*
engine-default.js
index-browser.d.ts
index-browser.js
index-browser.js.map
Empty file.
10 changes: 10 additions & 0 deletions packages/actor-init-sparql-prov4itdata/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.0.0]

- Intial release
54 changes: 54 additions & 0 deletions packages/actor-init-sparql-prov4itdata/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Comunica PROV4ITDaTa Init Actor

A custom Comunica query engine, configured to be used by the PROV4ITDaTa project.

<!-- This module is part of the [Comunica framework](https://comunica.dev/). -->

## Install

```bash
$ yarn add @prov4itdata/actor-init-sparql
```

or

```bash
$ npm install -g @prov4itdata/actor-init-sparql
```

### Usage within application

This engine can be used in JavaScript/TypeScript applications as follows:

```javascript
const newEngine = require('@comunica/actor-init-sparql-amf').newEngine;
const myEngine = newEngine();

const result = await myEngine.query(`
SELECT * WHERE {
?s ?p ?o
}`, {
sources: ['http://localhost:3000/dataset'],
});

// Consume results as a stream (best performance)
result.bindingsStream.on('data', (binding) => {
console.log(binding.get('?s').value);
console.log(binding.get('?s').termType);

console.log(binding.get('?p').value);

console.log(binding.get('?o').value);
});

// Consume results as an array (easier)
const bindings = await result.bindings();
console.log(bindings[0].get('?s').value);
console.log(bindings[0].get('?s').termType);

// Log metadata containing source-level provenance information
const metadata = await result.metadata();
console.log(metadata)
```

_[**Read more** about querying an application](https://comunica.dev/docs/query/getting_started/query_app/)._
7 changes: 7 additions & 0 deletions packages/actor-init-sparql-prov4itdata/bin/http.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node
import { HttpServiceSparqlEndpoint } from '@comunica/actor-init-sparql';

const defaultConfigPath = `${__dirname}/../config/config-default.json`;

HttpServiceSparqlEndpoint.runArgsInProcess(process.argv.slice(2), process.stdout, process.stderr, `${__dirname}/../`, process.env, defaultConfigPath, code => process.exit(code))
.catch(error => process.stderr.write(`${error.message}/n`));
3 changes: 3 additions & 0 deletions packages/actor-init-sparql-prov4itdata/bin/query-dynamic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
import { runArgsInProcess } from '@comunica/runner-cli';
runArgsInProcess(`${__dirname}/../`, `${__dirname}/../config/config-default.json`);
3 changes: 3 additions & 0 deletions packages/actor-init-sparql-prov4itdata/bin/query.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
import { runArgsInProcessStatic } from '@comunica/runner-cli';
runArgsInProcessStatic(require('../engine-default.js'));
38 changes: 38 additions & 0 deletions packages/actor-init-sparql-prov4itdata/config/config-default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"@context": [
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-init-sparql/^1.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/runner/^1.0.0/components/context.jsonld",
{
"caisa": "npmd:@prov4itdata/actor-init-sparql/",
"files-caisa": "caisa:^1.0.0/",
"config-setsa": "files-caisa:config/sets/"
}
],

"@id": "urn:comunica:my",
"@type": "Runner",
"import": [

"files-caisa:config/sets/http-solid.json",

"files-cais:config/sets/http-memento.json",
"files-cais:config/sets/join.json",
"files-cais:config/sets/rdf-dereference.json",
"files-cais:config/sets/rdf-parsers.json",
"files-cais:config/sets/rdf-serializers.json",
"files-caisa:config/sets/resolve-federated.json",
"files-cais:config/sets/resolve-hypermedia.json",
"files-cais:config/sets/resolve-rdfjs.json",
"files-cais:config/sets/resolve-sparql.json",
"files-cais:config/sets/sparql-init.json",
"files-cais:config/sets/graphql-parsers.json",
"files-cais:config/sets/sparql-optimize.json",
"files-cais:config/sets/sparql-parsers.json",
"files-cais:config/sets/sparql-queryoperators.json",
"files-cais:config/sets/sparql-queryoperators-path.json",
"files-cais:config/sets/sparql-serializers.json",

"files-caisa:config/sets/rdf-metadata-extract-annotate-provenance.json"
]
}
38 changes: 38 additions & 0 deletions packages/actor-init-sparql-prov4itdata/config/sets/http-solid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"@context": [
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-init-sparql/^1.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/runner/^1.0.0/components/context.jsonld",

"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-solid-auth-fetch/^1.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-proxy/^1.0.0/components/context.jsonld",

"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^1.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/mediator-number/^1.0.0/components/context.jsonld"
],
"@graph": [
{
"@id": "urn:comunica:my",
"actors": [
{
"@id": "config-sets:http.json#myHttpProxy",
"@type": "ActorHttpProxy",
"cahp:Actor/Http/Proxy/mediatorHttp": {
"@id": "config-sets:http.json#mediatorHttp"
},
"beforeActor": "config-sets:http.json#myHttpFetcher"
},
{
"@id": "config-sets:http.json#myHttpFetcher",
"@type": "ActorHttpSolidAuthFetch"
}
]
},
{
"@id": "config-sets:http.json#mediatorHttp",
"@type": "MediatorNumberMin",
"field": "time",
"ignoreErrors": true,
"cc:Mediator/bus": { "@id": "cbh:Bus/Http" }
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"@context": [
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-init-sparql/^1.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/runner/^1.0.0/components/context.jsonld",

"https://linkedsoftwaredependencies.org/bundles/npm/@prov4itdata/actor-rdf-metadata-extract-annotate-provenance/^1.0.0/components/context.jsonld",

"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-dereference/^1.0.0/components/context.jsonld",

"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/mediator-number/^1.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/mediator-race/^1.0.0/components/context.jsonld",
{
"caisa": "npmd:@prov4itdata/actor-init-sparql/",
"files-caisa": "caisa:^1.0.0/",
"config-setsa": "files-caisa:config/sets/"
}
],
"@id": "urn:comunica:my",
"actors": [
{
"@id": "config-setsa:rdf-metadata-extract-annotate-provenance.json#myRdfMetadataExtractAnnotateProvenance",
"@type": "ActorRdfMetadataExtractAnnotateProvenance"
}
]
}
Loading

0 comments on commit c43f20c

Please sign in to comment.