Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Remove info that should be JSDocs #60

Merged
merged 1 commit into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,41 +146,3 @@ This figure represents the workflow of the LD Workbench application:
![Workflow of the LD-Workbench application](static/figures/diagram.svg)

A Pipeline can have multiple Stages, specified in the configuration file. A Stage has one Iterator and can have multiple Generators in it's configuration. An Iterator has to be connected to a SPARQL endpoint, when none is specified for the Generator(s), the Generator reuses the same SPARQL endpoint to generate linked data, when a different endpoint is specified in the Generator's configuration, this endpoint is used instead.

### Class Desscriptions

#### Pipeline

The Pipeline class orchistrates the data transformation process for each class, there can only be one pipeline, which is represented by the configuration file that is provided to the LD Workbench application. A Pipeline recursively runs each Stage specified in its configuration file, which generates data according to the configured iterator's and generator's SPARQL queries.

#### Stage

The Stage class initiates the Iterator and Generator(s), and uses an event stream to listen to incoming Iterator/Generator, end, and error events coming from the Iterator and Generator. The class itself also emits an end event, meaning the Iterator has finished its iterations and the generator(s) have generated the related data.

##### Previous Stage

The Previous Stage class is used to provide information from the stage that occurred before the current stage, for example the information about the endpoint from a previous stage.

#### Iterator

The Iterator class uses a SPARQL Select query to retrieve the `$this` target results from the endpoint. The result from the Iterator class is provided to the Generator class through an event emitter.

#### Generator Stage

The Generator class uses a SPARQL Construct query, pre-binded with the `$this` target from the Iterator, to retrieve the constructed triples from the endpoint. The result from the Generator class is provided to the Stage class through an event emitter.

#### Output Classes

##### File Class

The File class allows a file to be created from the Stage's `destinationPath` read and write streams, resulting in the creation of a local file with the generated results.

##### TriplyDB Class

The TriplyDB class serves as an example on how to LD Workbench could be used to upload generated data to a Triple Store. The class uses the `@triply/triplydb` package to upload the generated triples to a remote Triple Store like TriplyDB.

## CI/CD

This repository uses GitHub Actions for the CI, the configuration that concerns automated tests can be found in the [github-ci.yml file](https://github.com/netwerk-digitaal-erfgoed/ld-workbench/blob/main/.github/workflows/github-ci.yml).

To run the tests locally run the `npm test` command, for examples see files ending with `'*.test.ts'`.