Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
egekorkan authored Nov 14, 2023
1 parent 241b66c commit 3a3b678
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
</picture>

## Playground
> The place where you can create and play with Thing Descriptions. Try it online at [http://plugfest.thingweb.io/playground/](http://plugfest.thingweb.io/playground/)

The place where you can create and play with WoT Thing Descriptions. Try it online at [https://playground.thingweb.io/](https://playground.thingweb.io)

[![Default CI & CD Pipeline](https://github.com/thingweb/thingweb-playground/actions/workflows/ci-cd.yaml/badge.svg)](https://github.com/thingweb/thingweb-playground/actions/workflows/ci-cd.yaml)
[![CodeQL](https://github.com/thingweb/thingweb-playground/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/thingweb/thingweb-playground/actions/workflows/codeql-analysis.yml)
[![Discord](https://img.shields.io/badge/Discord-7289DA?logo=discord&logoColor=white&label=td-playground)](https://discord.gg/9yaFmkJ9GT)
[<img alt="npm" src="https://img.shields.io/npm/dw/@thing-description-playground/core">](https://npm-stat.com/charts.html?package=%2540thing-description-playground%252Fcore)
[![Netlify Status](https://api.netlify.com/api/v1/badges/51a65a70-cb51-49e1-bbb6-82e83983c6cf/deploy-status)](https://app.netlify.com/sites/thingweb-playground/deploys)

## Installation

Expand All @@ -21,16 +23,16 @@ There are different ways to use Playground:

## Structure

The structure of all Web of Things (WoT) Playground packages is shown here: ![packageStructure](images/playground-structure.png)
The structure of all Playground packages is shown here: ![packageStructure](images/playground-structure.png)

All packages (except CLI and Web) are designed to be used as an imported package in a Node.js project or as a web bundle in a Web application.
This allows them to be used in the Web package as part of a Web UI or inside the CLI.

- The core package provides a function to check whether a Thing Description (TD) is valid according to the W3C WoT [Thing Description standard](https://w3c.github.io/wot-thing-description/#).
It uses the official JSON Schema plus additional scripts for aspects which cannot be checked with a JSON Schema alone.
It uses the official JSON Schema plus additional scripts for aspects that cannot be checked with a JSON Schema alone.
Used together with the assertions package, it allows to check whether all of the features of the TD standard are present in a single TD or a group of TDs representing an implementation.

Both packages are used by the Web and CLI packages to provide their functionalities, plus IO functionalities through an UI.
Both packages are used by the Web and CLI packages to provide their functionalities, plus IO functionalities through a UI.

## Packages

Expand All @@ -39,7 +41,7 @@ The packages in this repository are available under ([packages folder](./package
Reusable packages:

- [core](./packages/core/): The core package provides a function to check whether a Thing Description (TD) is valid according to the W3C WoT [Thing Description standard](https://w3c.github.io/wot-thing-description/#).
It uses the official JSON Schema plus additional scripts for aspects which cannot be checked with a JSON Schema alone. It generates a JSON report of the validation results. [NPM](https://www.npmjs.com/package/@thing-description-playground/core).
It uses the official JSON Schema plus additional scripts for aspects that cannot be checked with a JSON Schema alone. It generates a JSON report of the validation results. [NPM](https://www.npmjs.com/package/@thing-description-playground/core).
- [assertions](./packages/assertions/): The assertions package allows to check whether all of the features of the TD standard are present in a single TD or a group of TDs representing an implementation. It needs to be used together with the core package since some features are detected by the core package. [NPM](https://www.npmjs.com/package/@thing-description-playground/assertions).
- [defaults](./packages/defaults/): The defaults package can be used to add or remove explicitly stated default values in a TD. It has no dependency to other playground packages. [NPM](https://www.npmjs.com/package/@thing-description-playground/defaults).
- [td_to_openAPI](./packages/td_to_openAPI): The Open API package allows to create an Open API instance from a Thing Description which has HTTP in the forms. It has no dependency to other playground packages.[NPM](https://www.npmjs.com/package/@thing-description-playground/td_to_openapi).
Expand All @@ -48,14 +50,14 @@ Reusable packages:

End Product Packages:

- [cli](./packages/cli/): The CLI package wraps the above packages in way they can be used from the command line. Additionally, it allows the functionalities of the other packages to be executed on a set of TDs. [NPM](https://www.npmjs.com/package/@thing-description-playground/cli).
- [web](./packages/web/): The Web package wraps the above packages in way they can be used from a browser interface. You can host/adapt your own browser version of the playground. It is online at [http://plugfest.thingweb.io/playground/](http://plugfest.thingweb.io/playground/)[NPM](https://www.npmjs.com/package/@thing-description-playground/web).
- [cli](./packages/cli/): The CLI package wraps the above packages in a way they can be used from the command line. Additionally, it allows the functionalities of the other packages to be executed on a set of TDs. [NPM](https://www.npmjs.com/package/@thing-description-playground/cli).
- [web](./packages/web/): The Web package wraps the above packages in a way they can be used from a browser interface. You can host/adapt your own browser version of the playground. It is online at [http://plugfest.thingweb.io/playground/](http://plugfest.thingweb.io/playground/)[NPM](https://www.npmjs.com/package/@thing-description-playground/web).

## Examples

Examples are included in the [core](./packages/core/examples) and in the [examples folder](./examples) in the root of the project.
Examples are included in the [core](./packages/core/examples) and in the [examples folder](./examples) at the root of the project.

## Browser based Thing Description Validation
## Browser-based Thing Description Validation

- Online: It is hosted [here](http://plugfest.thingweb.io/playground/)

Expand All @@ -69,13 +71,13 @@ Examples are included in the [core](./packages/core/examples) and in the [exampl

Please have a look at the `cli` [package](https://github.com/eclipse-thingweb/playground/tree/master/packages/cli#batch-testing) for batch testing of Thing Descriptions.

## Script based Assertion Tester
## Script-based Assertion Tester

Please have a look at the `cli` [package](https://github.com/eclipse-thingweb/playground/tree/master/packages/cli#script-based-assertion-tester--a-parameter) for script based assertion testing, or at the `assertions` package, if you're planning to integrate the assertion testing as a dependency in your own NPM modules.
Please have a look at the `cli` [package](https://github.com/eclipse-thingweb/playground/tree/master/packages/cli#script-based-assertion-tester--a-parameter) for script-based assertion testing, or at the `assertions` package, if you're planning to integrate the assertion testing as a dependency in your own NPM modules.

## Script based Thing Description Validation
## Script-based Thing Description Validation

Please have look at the `cli` [package](https://github.com/eclipse-thingweb/playground/tree/master/packages/cli#script-based-thing-description-validation) for script based TD validation, or at the `core` package, if you're planning to integrate the TD validation as a dependency in your own NPM modules.
Please have a look at the `cli` [package](https://github.com/eclipse-thingweb/playground/tree/master/packages/cli#script-based-thing-description-validation) for script-based TD validation, or at the `core` package, if you're planning to integrate the TD validation as a dependency in your own NPM modules.

## License

Expand All @@ -85,7 +87,7 @@ All packages are licensed under the Eclipse Public License v. 2.0. You find a co

1. Run `lerna bootstrap` to install dependencies among the packages, even if a package has never been published before. Make sure you have not increased the dependency versions yet, e.g., you have a new package _newExample_ and the _oldExample_ depends on it. The _newExample_ is on version `0.0.0` (since you want to publish it as `1.0.0`) then in the _oldExample_ package.json the dependency has to be on the same version (or lower) so `"dependencies" { newExample: "^0.0.0"}}`. **Otherwise lerna will not accept linking the local _newExample_.**
2. If `lerna bootstrap` was successful you can now bump dependency versions (if required), e.g., you could now do `"dependencies" { newExample: "^1.0.0"}}` in the _oldExample_ package.json.
3. Run `lerna publish` to publish all new package versions. Lerna will then ask for every changed package whether it received a patch, minor or major update. In our example you should now select major for the _newExample_ so that it will be published as `1.0.0` version. You should login to npm via `npm login` before doing this.
3. Run `lerna publish` to publish all the new package versions. Lerna will then ask for every changed package whether it received a patch, minor or major update. In our example, you should now select major for the _newExample_ so that it will be published as `1.0.0` version. You should log in to npm via `npm login` before doing this.

## Adapting Licenses

Expand Down

0 comments on commit 3a3b678

Please sign in to comment.