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
- WoT resources: SHACL Shapes, JSON Schema, JSON-LD context, and RDF
- Documentation: TD specification and ontology specifications
Here is an overview of the process:
This project leverages LinkML for modelling the Web of Things Thing Description information model.
- Python 3.11 or greater. Download and install Python.
- The
poetry
dependency manager. See the poetry installation documentation for more details.
- Clone the repository and navigate to the project directory:
git clone https://github.com/w3c/wot-thing-description-toolchain-tmp.git
cd wot-thing-description-toolchain-tmp
- Prepare a clean environment
python -m venv .venv
. .venv/bin/activate
- Install project dependencies with
poetry
:
poetry install
- View all supported commands:
python main.py -h
The main.py script supports various options:
main.py [-h] [-l] [-s]
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.
Generate resources using the default schema and configuration:
python main.py
Generate documentation locally and serve it:
python main.py -l -s
- LinkML schema:
resources/schemas/thing_description.yaml
- Generated WoT resources:
resources/gens
- Generated full LinkML schema:
resources/gens/linkml
We welcome contributions! Please fork the repository, create a branch, and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.