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

First documentation in README.md #355

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

hartig
Copy link
Member

@hartig hartig commented Aug 23, 2024

Related to #346.

@hartig hartig linked an issue Aug 23, 2024 that may be closed by this pull request
7 tasks
Copy link
Member Author

@hartig hartig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keski I created a PR from the branch in which you have started extending the README.md file, because I had a bunch of questions and comments. Now I was able to write these here into the PR ;-)

<details>
<summary><b>Run using Docker</b></summary>

Download or clone the project from the HeFQUIN repository and navigate to the project root in a terminal. Build and run the latest version of the engine using:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "Download" mean? Downloading the ZIP / TAR.GZ file of one of the releases?

Assuming yes, then this should be the default option that we advertise here in the quick start guide. The option to clone the repo may be mentioned briefly, with a reference to the corresponding part of the detailed documentation pages.

Comment on lines +38 to +65
The optional build argument (`TAG`) can used to build the image from a specific release:
```yml
hefquin:
build:
context: .
args:
TAG: <insert tag>
ports:
- "8080:8080"
```

The engine can be configured by mounting custom configuration files when starting up the container:
```yml
hefquin:
build: .
ports:
- "8080:8080"
volumes:
- ./example/config.properties:/usr/local/tomcat/webapps/ROOT/config.properties
- ./example/ExampleEngineConf.ttl:/usr/local/tomcat/webapps/ROOT/ExampleEngineConf.ttl
- ./example/ExampleFedConf.ttl:/usr/local/tomcat/webapps/ROOT/ExampleFedConf.ttl
```

where the `config.properties` file has the following structure:
```bash
ENGINE_CONF_FILE=ExampleEngineConf.ttl # the engine configuration file
FED_CONF_FILE=ExampleFedConf.ttl # the federation configuration file
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These things should also be moved to the detailed documentation pages, and here we mention only briefly that these things are possible and refer to the documentation pages for the details.

FED_CONF_FILE=ExampleFedConf.ttl # the federation configuration file
```

By default the service exposes a SPARQL endpoint at `http://localhost:8080/sparql`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this relevant only for the Docker option? If not, we should move up to the general part about the Web service (i.e., right before the collapsible subsections).

Comment on lines +73 to +83
__Option 1:__ Clone the project from the HeFQUIN repository and navigate to the project root in a terminal. Build the latest version of the engine using:
```bash
$ mvn clean package
```
To use a specific release, checkout the tag before building:
```bash
$ git checkout <insert tag>
$ mvn clean package
```

__Option 2:__ Download a JAR file from the set of available releases (see [Releases](https://github.com/LiUSemWeb/HeFQUIN/releases)).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not advertise option 1 here but move it to the detailed documentation, and here only briefly mention the existence of this option, with a reference to the corresponding part of the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An issue about the text for option 2 is that there are no JAR files at https://github.com/LiUSemWeb/HeFQUIN/releases -- Is this something that we need to enable somehow? Or can the creation of releases on the Github Website only produce ZIP and TAR.GZ files?


Start the server in a terminal by running the following command:
```bash
java -cp target/HeFQUIN-x.y.z-SNAPSHOT.jar se.liu.ida.hefquin.service.HeFQUINServer
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works only for option 1 above, not for option 2 (assuming option 2 is indeed about downloading a JAR file).

Comment on lines +114 to +118
The engine can be configured by modifying the `config.properties` file in the working directory. The `config.properties` file has the following structure:
```bash
ENGINE_CONF_FILE=ExampleEngineConf.ttl # the engine configuration file
FED_CONF_FILE=ExampleFedConf.ttl # the federation configuration file
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like above, perhaps that's something to be moved to the detailed documentation pages a well.

ENGINE_CONF_FILE=ExampleEngineConf.ttl # the engine configuration file
FED_CONF_FILE=ExampleFedConf.ttl # the federation configuration file
```
> __NOTE__: The servlet will need to be restarted for any changes in the engine configuration to take effect.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this relevant only for the 'separate servlet container' case?

Comment on lines +124 to +132
__Option 1:__ Clone the project from the HeFQUIN repository and navigate to the project root in a terminal. Build the latest version of the engine using:
```bash
$ mvn clean package
```
To use a specific release, checkout the tag before building:
```bash
$ git checkout <insert tag>
$ mvn clean package
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above, this option should be moved to the detailed documentation, and then only briefly referred to from here.

$ mvn clean package
```

__Option 2:__ Download a JAR file from the set of available releases (see [Releases](https://github.com/LiUSemWeb/HeFQUIN/releases)).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No JAR under Releases.


Example usage:
```bash
java -cp target/HeFQUIN-0.0.4-SNAPSHOT.jar se.liu.ida.hefquin.cli.RunQueryWithoutSrcSel \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work if a JAR has been downloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

First documentation pages
2 participants