Skip to content

Commit

Permalink
docs: update github pages for bette documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tabkram committed Dec 12, 2023
1 parent e802aae commit 91d233f
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 26 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Execution Engine

[![execution-engine on npm](https://img.shields.io/npm/v/execution-engine.svg?logo=npm&label=NPM+package&color=limegreen)](https://www.npmjs.com/package/execution-engine)
![npm](https://img.shields.io/npm/dm/execution-engine?color=limegreen)
[![npm](https://img.shields.io/npm/dm/execution-engine?color=limegreen)](https://www.npmjs.com/package/execution-engine)
[![install size](https://packagephobia.com/badge?p=execution-engine)](https://packagephobia.com/result?p=execution-engine)
[![Github repo](https://img.shields.io/badge/github-grey?logo=github)](https://github.com/tabkram/execution-engine)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
Expand Down Expand Up @@ -139,17 +139,17 @@ Explore the comprehensive __[documentation](https://tabkram.github.io/execution-

For a detailed list of changes, enhancements, and bug fixes, please refer to our [Changelog](CHANGELOG.md).

# Contributing 🤝
## Contributing 🤝

If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request.
Contributions are welcome!

Before getting started, please read our [Contribution Guidelines](CONTRIBUTING.md).

# Community 👥
## Community 👥

Love `execution-engine` ? Give our repo a star ⭐ ⬆️.

# License 📄
## License 📄

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
13 changes: 8 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A TypeScript library for tracing and visualizing code execution workflows
- [ExecutionTimer](#executiontimer)
- [TraceableExecution](#traceableexecution)
- [ExecutionEngine](#executionengine)
- [EngineTask with @engine and @run Decorators](#enginetask-with-engine-and-run-decorators)

## Installation 📦

Expand Down Expand Up @@ -49,8 +50,9 @@ console.log('Trace:', trace);

You can:

- view the **complete code** in [examples/usage.ts](examples/usage.ts)
- inspect the **trace output** in [examples/usage.json](examples/usage.json).
- view the **complete code** in [usage.ts](https://github.com/tabkram/execution-engine/blob/main/examples/usage.ts)
- inspect the **trace output**
in [usage.json](https://github.com/tabkram/execution-engine/blob/main/examples/usage.json).
- visualize the **trace graph** using the json-to-graph online
tool. [→ See the result ←](https://tabkram.github.io/json-to-graph/?data=https://raw.githubusercontent.com/tabkram/execution-engine/main/examples/usage.json)

Expand Down Expand Up @@ -83,8 +85,9 @@ console.log("Trace:", trace);

You can:

- view the **complete code** in [examples/usage2.ts](examples/usage2.ts)
- inspect the **trace output** in [examples/usage2.json](examples/usage2.json)
- view the **complete code** in [usage2.ts](https://github.com/tabkram/execution-engine/blob/main/examples/usage2.ts)
- inspect the **trace output**
in [usage2.json](https://github.com/tabkram/execution-engine/blob/main/examples/usage2.json)
- visualize the **trace graph** using the json-to-graph online
tool. [→ See the result ←](https://tabkram.github.io/json-to-graph/?data=https://raw.githubusercontent.com/tabkram/execution-engine/main/examples/usage2.json)

Expand All @@ -104,7 +107,7 @@ The __[ExecutionEngine](./ExecutionEngine.md)__ enhances traceable execution by
capturing additional relevant information.
It builds upon the functionality of [TraceableExecution](./TraceableExecution.md).

### EngineTask Class and @engine/@run Decorators
### EngineTask with @engine and @run Decorators

The __[EngineTask](./EngineTask.md)__ class works in conjunction with the `@engine` decorator and the `@run` decorator
to integrate the ExecutionEngine into your classes, providing tracing capabilities for methods.
Expand Down
23 changes: 23 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Execution Engine Examples

| Example Code | Trace Output | Trace Graph |
|----------------------------------------|--------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [authentication.ts](authentication.ts) | [authentication.json](authentication.json) | [Graph Results](https://tabkram.github.io/json-to-graph/?data=https://raw.githubusercontent.com/tabkram/execution-engine/main/examples/authentication.json) |
| [car.ts](car.ts) | [car.json](car.json) | [Graph Results](https://tabkram.github.io/json-to-graph/?data=https://raw.githubusercontent.com/tabkram/execution-engine/main/examples/car.json) |
| [weather.ts](weather.ts) | [weather.json](weather.json) | [Graph Results](https://tabkram.github.io/json-to-graph/?data=https://raw.githubusercontent.com/tabkram/execution-engine/main/examples/weather.json) |
| [usage.ts](usage.ts) | [usage.json](usage.json) | [Graph Results](https://tabkram.github.io/json-to-graph/?data=https://raw.githubusercontent.com/tabkram/execution-engine/main/examples/usage.json) |
| [usage2.ts](usage2.ts) | [usage2.json](usage2.json) | [Graph Results](https://tabkram.github.io/json-to-graph/?data=https://raw.githubusercontent.com/tabkram/execution-engine/main/examples/usage2.json) |

### Basic Usage

- **[usage.ts](usage.ts)**: is a fundamental example of using the `ExecutionEngine`.

- **[authentication.ts](authentication.ts):** illustrates the sequential execution of functions, providing a detailed trace for each step of the workflow.

- **[car.ts](car.ts)**: an advanced example showcasing the ability to orchestrate intricate tasks simultaneously and hierarchically.

### Decorators-based Usage

- **[usage2.ts](usage2.ts)**: an alternative usage of the `ExecutionEngine` that illustrates the integration of decorators (`@engine` and `@run`) for a more organized and class-based approach.

- **[weather.ts](weather.ts)**: Advanced example with custom parameters, demonstrating the Execution Engine's versatility in handling complex workflows through decorators (`@engine` and `@run`) within TypeScript classes.
34 changes: 17 additions & 17 deletions examples/usage2.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
[
{
"data": {
"id": "bound myMethod1_1702207617652_13a5a286-3150-4950-b67a-8e03a797b770",
"label": "bound myMethod1",
"id": "myMethod1_1702221511695_bae140a3-b63d-4c15-b9b1-b21b1bfb25b5",
"label": "myMethod1",
"inputs": [
"param1"
],
"outputs": "result1 for param1",
"startTime": "2023-12-10T11:26:57.652Z",
"endTime": "2023-12-10T11:26:57.653Z",
"duration": 0.40799999237060547,
"elapsedTime": "0.408 ms",
"startTime": "2023-12-10T15:18:31.695Z",
"endTime": "2023-12-10T15:18:31.695Z",
"duration": 0.2722501754760742,
"elapsedTime": "0.272 ms",
"parallel": false,
"abstract": false,
"createTime": "2023-12-10T11:26:57.653Z"
"createTime": "2023-12-10T15:18:31.696Z"
},
"group": "nodes"
},
{
"data": {
"id": "bound myMethod2_1702207617653_daeb25cd-1822-48d8-9744-a460bfe9f82f",
"label": "bound myMethod2",
"id": "myMethod2_1702221511696_4f21ad45-7d8d-4291-bb8a-b4de667bf6ae",
"label": "myMethod2",
"inputs": [
"param2"
],
"outputs": "result2 for param2",
"startTime": "2023-12-10T11:26:57.653Z",
"endTime": "2023-12-10T11:26:57.653Z",
"duration": 0.2049999237060547,
"elapsedTime": "0.205 ms",
"startTime": "2023-12-10T15:18:31.696Z",
"endTime": "2023-12-10T15:18:31.696Z",
"duration": 0.23508310317993164,
"elapsedTime": "0.235 ms",
"parallel": false,
"abstract": false,
"createTime": "2023-12-10T11:26:57.653Z"
"createTime": "2023-12-10T15:18:31.696Z"
},
"group": "nodes"
},
{
"data": {
"id": "bound myMethod1_1702207617652_13a5a286-3150-4950-b67a-8e03a797b770->bound myMethod2_1702207617653_daeb25cd-1822-48d8-9744-a460bfe9f82f",
"source": "bound myMethod1_1702207617652_13a5a286-3150-4950-b67a-8e03a797b770",
"target": "bound myMethod2_1702207617653_daeb25cd-1822-48d8-9744-a460bfe9f82f",
"id": "myMethod1_1702221511695_bae140a3-b63d-4c15-b9b1-b21b1bfb25b5->myMethod2_1702221511696_4f21ad45-7d8d-4291-bb8a-b4de667bf6ae",
"source": "myMethod1_1702221511695_bae140a3-b63d-4c15-b9b1-b21b1bfb25b5",
"target": "myMethod2_1702221511696_4f21ad45-7d8d-4291-bb8a-b4de667bf6ae",
"parallel": false
},
"group": "edges"
Expand Down

1 comment on commit 91d233f

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 92.22% 237/257
🟢 Branches 86.57% 174/201
🟢 Functions 91.67% 66/72
🟢 Lines 92.95% 224/241

Test suite run success

32 tests passing in 5 suites.

Report generated by 🧪jest coverage report action from 91d233f

Please sign in to comment.