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

readme update #35

Merged
merged 7 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
59 changes: 36 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,63 @@

# Temporary WoT TD Tooling
# WoTIS - Web of Things Integrated Schemas

The aim of this repository is to simplify the current WoT TD tooling for generating the specification. WoT TD Tooling is a python project to automate the generation of
1) WoT resources: [SHACL Shapes](https://www.w3.org/TR/shacl/), [JSON Schema](https://json-schema.org/specification), [JSON-LD context](https://www.w3.org/TR/json-ld11/), and [RDF](https://www.w3.org/TR/rdf11-concepts/)
The aim of this repository is to simplify the current tooling required for generating the WoT Thing Description (TD) specification and related resources.
WoTIS toolchain is a python-based project designed to automate the generation of
1) WoT resources: [SHACL Shapes](https://www.w3.org/TR/shacl/), [JSON Schema](https://json-schema.org/specification), [JSON-LD context](https://www.w3.org/TR/json-ld11/), [RDF](https://www.w3.org/TR/rdf11-concepts/) and visual figures
mahdanoura marked this conversation as resolved.
Show resolved Hide resolved
2) Documentation: TD specification and ontology specifications

Here is an overview of the process:
This project leverages [LinkML](https://linkml.io/linkml/) for modelling the [Web of Things Thing Description](https://www.w3.org/TR/wot-thing-description11/) information model.

<img title="WoT Toolchain Overview" src="images/toolchain.svg">
## Process Overview

This project leverages [LinkML](https://linkml.io/linkml/) for modelling the [Web of Things Thing Description](https://www.w3.org/TR/wot-thing-description11/) information model.
Below is a simplified overview of the process:

## Prerequisites
Step 1: Generate WoT resources using WOTIS

Step 2: Generate the final WoT TD specification document using the generated WoT resources along with a static ```index.html```

<img title="WoT Toolchain Overview" src="images/toolchain.svg">

The [uv](https://docs.astral.sh/uv/) package manager.
## Prerequisites
* Python 3.11 or greater. [Download and install Python.](https://www.python.org/downloads/)
mahdanoura marked this conversation as resolved.
Show resolved Hide resolved
* The [uv](https://docs.astral.sh/uv/) package manager.

## Quick Start
1. Clone the repository and navigate to the project directory:
```
```bash
git clone https://github.com/w3c/wot-thing-description-toolchain-tmp.git
cd wot-thing-description-toolchain-tmp
```
2. Run the script using `uv`
```
uv run main.py -h
2. Install the package or run it using `uv run wotis`
```bash
uv install
```

## Usage
The main.py script supports various options:
See the list of all WOTIS commands:
```bash
wotis --help
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
wotis --help
uv run wotis --help

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suggest we keep the wotis --help, because the project installs it as a standalone command, making it simpler to use.

```
uv run main.py [-h] [-l] [-s]

Generate WoT resources (RDF, JSON-LD Context, SHACL Shapes, and JSON Schema) from a default LinkML schema:
```bash
wotis generate-wot-resources [-i] [-d] [-s] [--help]

options:
-h, --help show this help message and exit
-l, --local-docs Boolean for local documentation generation.
-s, --serve-docs Boolean for serving the generated documentation.
-i, --input_schema Path to the input schema specified as LinkML yaml.
[default: resources/schemas/thing_description.yaml]

-d, --generate_docs Boolean for local documentation generation.
-s, --serve_docs Boolean for serving the generated documentation.
--help Show this help message and exit.
```

## Examples
Generate resources using the default schema and configuration:
```
uv run main.py
Generate documentation using the default schema locally and serve it:
```bash
wotis generate-wot-resources -d -s
```

Generate documentation locally and serve it:
`uv run main.py -l -s`

#### Default Paths
* LinkML schema: `resources/schemas/thing_description.yaml`
* Generated WoT resources: `resources/gens`
Expand Down
Empty file removed src/__init__.py
Empty file.
Loading