Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
13c1c67
Bump org.apache.maven.plugins:maven-surefire-plugin from 2.22.2 to 3.2.5
dependabot[bot] Mar 4, 2024
00c60f5
Add unit test for reasoner video.
bnouwt Apr 9, 2024
2a99f61
Bump org.slf4j:slf4j-simple from 1.7.25 to 2.0.13
dependabot[bot] Apr 15, 2024
ec0e904
Trying to reproduce the behavior described in this issue.
bnouwt May 28, 2024
1fae3ed
Fix applying a rule multiple times.
bnouwt May 29, 2024
115a923
Merge pull request #507 from TNO/440-prevent-the-same-knowledge-base-…
bnouwt May 29, 2024
2911abb
Make sure typed literals are not converted into plain literals.
bnouwt May 31, 2024
3d1844b
Merge pull request #508 from TNO/506-askresult-bindingset-different-f…
bnouwt May 31, 2024
c5efd1c
Restructuring documentation to enable website generation (#509)
Sophietje Jun 14, 2024
138fe7e
Prepare for release 1.2.5
bnouwt Jun 17, 2024
4ea4eaa
Merge pull request #510 from TNO/prepare-for-release-1.2.5
bnouwt Jun 17, 2024
ca6968b
Prepare for snapshot
bnouwt Jun 17, 2024
78c959e
Merge pull request #511 from TNO/prepare_for_snapshot
bnouwt Jun 17, 2024
9cb9079
Add two necessary jersey dependencies.
bnouwt Jun 18, 2024
f9c4ccc
Merge pull request #514 from TNO/513-errors-occur-when-including-know…
bnouwt Jun 18, 2024
5fa5a68
Update faq.md
bnouwt Jul 9, 2024
5152711
Merge pull request #516 from TNO/bnouwt-patch-1
bnouwt Jul 9, 2024
0c85121
Update faq.md
bnouwt Jul 9, 2024
bfac700
Merge pull request #517 from TNO/bnouwt-patch-1
bnouwt Jul 10, 2024
963eed6
Update faq.md
bnouwt Jul 10, 2024
1976c36
Merge pull request #518 from TNO/bnouwt-patch-1
bnouwt Jul 10, 2024
880d457
Merge pull request #504 from TNO/dependabot/maven/org.slf4j-slf4j-sim…
bnouwt Jul 15, 2024
02116de
Merge pull request #492 from TNO/dependabot/maven/org.apache.maven.pl…
bnouwt Jul 15, 2024
bbb4314
Add a new tests that illustrates the improvements made with the matcher.
Aug 15, 2024
f1cba8b
Disable test by default.
Aug 15, 2024
854fce6
Merge pull request #524 from TNO/add-matcher-performance-test
bnouwt Aug 15, 2024
9f6bf9b
Add unit test for reasoner video.
bnouwt Apr 9, 2024
8efa94c
Add generalize if necessary test.
bnouwt Aug 22, 2024
479643e
Merge branch
bnouwt Aug 22, 2024
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
32 changes: 32 additions & 0 deletions .github/workflows/docs-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy documentation website
on:
push:
branches:
- master
paths:
- docs/**

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@master
- name: Install dependencies
working-directory: ./docs
run: npm install
- name: Build documentation website
working-directory: ./docs
run: npm run build
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'placeholder'
- name: Add known hosts
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy to server
working-directory: ./docs
run: scp -r build/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_DOCS_PATH }}
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![DOI](https://zenodo.org/badge/502097185.svg)](https://zenodo.org/badge/latestdoi/502097185)

[![Knowledge Engine logo](./docs/img/ke_text_white_backdrop.png)](https://www.knowledge-engine.eu/)
[![Knowledge Engine logo](docs/static/img/ke_text_white_backdrop.png)](https://www.knowledge-engine.eu/)

Welcome to the source code repository of the Knowledge Engine.
This README should help you understand what the Knowledge Engine is, and how to use it.
Expand Down Expand Up @@ -71,7 +71,7 @@ The easiest way to start a Knowledge Engine runtime is with Docker:
```bash
docker run \
-p 8280:8280 \
ghcr.io/tno/knowledge-engine/smart-connector:1.2.4
ghcr.io/tno/knowledge-engine/smart-connector:1.2.5
```

The Knowledge Engine runtime is now available to use via the REST API at base URL `http://localhost:8280/rest` on your host machine.
Expand All @@ -93,7 +93,7 @@ docker run \
-p 8081:8081 \
-e KD_URL=https://knowledge-directory.example.org \
-e KE_RUNTIME_EXPOSED_URL=https://your-domain.example.org:8081 \
ghcr.io/tno/knowledge-engine/smart-connector:1.2.4
ghcr.io/tno/knowledge-engine/smart-connector:1.2.5
```

### Running with Java
Expand All @@ -111,7 +111,7 @@ export KE_RUNTIME_EXPOSED_URL=https://your-domain.example.org:8081
# Start it. The argument (8280) denotes the port number at which it
# will listen for connections to the Knowledge Engine REST API.
java -jar -Dorg.slf4j.simpleLogger.logFile=smart-connector.log \
smart-connector-rest-dist-1.2.4-with-dependencies.jar 8280
smart-connector-rest-dist-1.2.5-with-dependencies.jar 8280
```

The JAR can be retrieved by compiling the project:
Expand Down Expand Up @@ -181,7 +181,7 @@ This section gives more detailed information about the project's structure, and

The Knowledge Engine project consists of the following Maven modules:
- `smart-connector`
- This is the implementation of the smart connector, with the Java developer API. For instructions on how to use it, refer to [the documentation](./docs/03_java_developer_api.md).
- This is the implementation of the smart connector, with the Java developer API. For instructions on how to use it, refer to [the documentation](./docs/docs/java_developer_api.md).
- `smart-connector-api`
- This module contains interfaces for the smart connector and other classes. It is made as a separate module so that it is easy to use different implementations of the interfaces.
- `smart-connector-rest-server`
Expand All @@ -205,17 +205,17 @@ These are instructions on what to do when we release a new version of the knowle
5. Build and push the new Docker images to GitLab:

```bash
docker buildx build ./smart-connector-rest-dist --platform linux/arm64,linux/amd64 --tag docker-registry.inesctec.pt/interconnect/knowledge-engine/smart-connector-rest-dist:1.2.4 --push
docker buildx build ./knowledge-directory --platform linux/arm64,linux/amd64 --tag docker-registry.inesctec.pt/interconnect/knowledge-engine/knowledge-directory:1.2.4 --push
docker buildx build ./admin-ui --platform linux/arm64,linux/amd64 --tag docker-registry.inesctec.pt/interconnect/knowledge-engine/admin-ui:1.2.4 --push
docker buildx build ./smart-connector-rest-dist --platform linux/arm64,linux/amd64 --tag docker-registry.inesctec.pt/interconnect/knowledge-engine/smart-connector-rest-dist:1.2.5 --push
docker buildx build ./knowledge-directory --platform linux/arm64,linux/amd64 --tag docker-registry.inesctec.pt/interconnect/knowledge-engine/knowledge-directory:1.2.5 --push
docker buildx build ./admin-ui --platform linux/arm64,linux/amd64 --tag docker-registry.inesctec.pt/interconnect/knowledge-engine/admin-ui:1.2.5 --push
```

6. Build and push the new Docker images to GitHub:

```bash
docker buildx build ./smart-connector-rest-dist --platform linux/arm64,linux/amd64 --tag ghcr.io/tno/knowledge-engine/smart-connector:1.2.4 --push
docker buildx build ./knowledge-directory --platform linux/arm64,linux/amd64 --tag ghcr.io/tno/knowledge-engine/knowledge-directory:1.2.4 --push
docker buildx build ./admin-ui --platform linux/arm64,linux/amd64 --tag ghcr.io/tno/knowledge-engine/admin-ui:1.2.4 --push
docker buildx build ./smart-connector-rest-dist --platform linux/arm64,linux/amd64 --tag ghcr.io/tno/knowledge-engine/smart-connector:1.2.5 --push
docker buildx build ./knowledge-directory --platform linux/arm64,linux/amd64 --tag ghcr.io/tno/knowledge-engine/knowledge-directory:1.2.5 --push
docker buildx build ./admin-ui --platform linux/arm64,linux/amd64 --tag ghcr.io/tno/knowledge-engine/admin-ui:1.2.5 --push
```

7. Prepare the next SNAPSHOT version and make a commit for that too.
Expand All @@ -232,7 +232,7 @@ docker buildx build ./admin-ui --platform linux/arm64,linux/amd64 --tag ghcr.io/
10. Inform mailing list(s) (and [the blog](https://www.knowledge-engine.eu/blog/)) about the new release.

## (advanced) Administering a Knowledge Engine runtime
To start a new instance of the REST API knowledge engine version 1.2.4, make sure you have `git checkout 1.2.4` the tag `1.2.4`. Now make sure you run the `mvn clean install` command successfully from the root of the repository.
To start a new instance of the REST API knowledge engine version 1.2.5, make sure you have `git checkout 1.2.5` the tag `1.2.5`. Now make sure you run the `mvn clean install` command successfully from the root of the repository.

### Starting the Knowledge Engine in local mode
When no additional configuration parameters are provided, the Knowledge Engine will by default run in local mode. This means you can create multiple smart connectors that can communicate with each other through the REST API, but the Knowledge Engine will not connect to a knowledge directory and will not be able to connect with smart connectors running in other runtimes.
Expand All @@ -246,17 +246,17 @@ cd smart-connector-rest-dist/target
Finally, start the server (note that you can configure a log file by including the `-Dorg.slf4j.simpleLogger.logFile=ke.log` system property to the JVM):

```bash
java -Dorg.slf4j.simpleLogger.logFile=ke.log -cp "smart-connector-rest-dist-1.2.4.jar:dependency/*" eu.knowledge.engine.rest.Main 8280
java -Dorg.slf4j.simpleLogger.logFile=ke.log -cp "smart-connector-rest-dist-1.2.5.jar:dependency/*" eu.knowledge.engine.rest.Main 8280
```

If you want to run in it in the background, you can use the `nohup` linux command (which does not use the simpleLogger configuration system property, but redirects the standard err/out):

```bash
nohup java -cp "smart-connector-rest-dist-1.2.4.jar:dependency/*" eu.knowledge.engine.rest.Main 8280 > ke.log
nohup java -cp "smart-connector-rest-dist-1.2.5.jar:dependency/*" eu.knowledge.engine.rest.Main 8280 > ke.log
```

### Starting the Knowledge Engine in distributed mode
The Knowledge Engine can also start in distributed mode, where it connects with a remote knowledge directory and where different instances of the Knowledge Engine (each instance hosting one or more smart connectors) can communicate with each other. More information about starting the Knowledge Engine in distributed mode can be found in the [documentation](docs/04_distributed_mode.md).
The Knowledge Engine can also start in distributed mode, where it connects with a remote knowledge directory and where different instances of the Knowledge Engine (each instance hosting one or more smart connectors) can communicate with each other. More information about starting the Knowledge Engine in distributed mode can be found in the [documentation](docs/docs/distributed_mode.md).

### Additional configuration environment variables

Expand Down
2 changes: 1 addition & 1 deletion admin-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
<version>2.0.13</version>
</dependency>


Expand Down
2 changes: 1 addition & 1 deletion admin-ui/src/main/resources/openapi-admin-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ info:
description:
This API provides information on Knowledge Engine Runtimes (todo), Smart Connectors, Knowledge Bases, and Knowledge
Interactions in a Knowledge Engine Network.
version: 1.2.4
version: 1.2.6-SNAPSHOT

paths:
/rest/admin/sc/all/{include-meta}:
Expand Down
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
14 changes: 0 additions & 14 deletions docs/00_home.md

This file was deleted.

19 changes: 0 additions & 19 deletions docs/05_glossary.md

This file was deleted.

34 changes: 34 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Documentation

This directory contains the documentation for the Knowledge Engine as well as the required settings that are used to generate the documentation website.
The documentation can be found in the `docs/` directory.


## Generating the website

Required:
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.

### Generate website files
To statically generate the website, within this directory (`knowledge-engine/docs/`), run:
```bash
npm run build
```
This will generate a `build/` directory containing all files for the website.

Be careful when editing code blocks with tabs.
Currently, it requires you to leave empty lines around the Markdown syntax



### Test the site locally

If you're working on the documentation, you can locally run a serve so you can easily see what your changes look like.
To run the development server, within this directory (`knowledge-engine/docs/`), execute:
```bash
npm run start
```

The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
The site will **automatically reload** and display your changes.
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Loading