Skip to content

Commit c65d9e0

Browse files
committed
updated docs
1 parent eb14a12 commit c65d9e0

File tree

4 files changed

+54
-18
lines changed

4 files changed

+54
-18
lines changed

docs/about.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Chartlets' TypeScript code is formatted by
5656
[prettier](https://prettier.io/).
5757

5858
```bash
59-
cd chartlets.js
60-
prettier .
59+
cd chartlets.js/packages/lib
60+
prettier -w .
6161
```
6262

6363
### Documentation

docs/demo.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,59 @@
11
Chartlets provides a simple demo that serves as a
22
reference for the framework usage and testbed for its features.
33

4+
The following steps assume the latest versions of the following
5+
development tools are installed:
6+
7+
- `git`
8+
- `conda` or `mamba`
9+
- `npm` from `node.js`
10+
11+
## Get sources from repo
12+
413
```bash
514
git clone https://github.com/bcdev/chartlets.git
615
```
716

8-
### Run the server
17+
This will create the folder `chartlets` which is referred to as
18+
`${project}` in the following.
19+
20+
## Run demo server
21+
22+
Create environment and install library
923

1024
```bash
11-
cd chartlets/chartlets.py
25+
cd ${project}/chartlets.py
1226
conda env create
1327
conda activate chartlets
1428
pip install -ve .
15-
python -m chartlets.demo.server
1629
```
1730

18-
### Run the UI
31+
Run demo server
32+
33+
```bash
34+
cd ${project}/chartlets.py/demo
35+
python -m server.main
36+
```
37+
38+
## Run demo UI
39+
40+
Install common dependencies
1941

2042
```bash
21-
cd ../chartlets.js
43+
cd ${project}/chartlets.js
2244
npm install
45+
```
46+
47+
Build the library
48+
49+
```bash
50+
cd ${project}/chartlets.js/packages/lib
51+
npm run build
52+
```
53+
54+
Run the demo UI
55+
56+
```bash
57+
cd ${project}/chartlets.js/packages/demo
2358
npm run dev
24-
```
59+
```

docs/guide/contributors.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Your module is supposed to export one or more instances of the
99
`chartlets.Extension` class. An extension object is a container for your
1010
UI contributions. It groups contributions that logically belong together.
1111

12-
As an example, see [`my_extension` of the demo](https://github.com/bcdev/chartlets/tree/main/chartlets.py/my_extension).
12+
As an example, see [`my_extension` of the demo](https://github.com/bcdev/chartlets/tree/main/chartlets.py/demo/my_extension).
1313

1414
To develop an extension, follow these steps:
1515

@@ -35,11 +35,12 @@ ext = Extension("my_dashboard")
3535
## Create the contribution object
3636

3737
In a submodule you create a contribution object from an application specific
38-
contribution, e.g., a `Panel`. Application-specific contribution classes
39-
are always derived from `chartlets.Contribution`.
38+
contribution, e.g., a `Panel` from the Chartlets demo server.
39+
Application-specific contribution classes are always derived from
40+
`chartlets.Contribution`.
4041

4142
```python
42-
from chartlets.demo import Panel
43+
from server.contribs import Panel
4344

4445
panel = Panel(title="Click Statistics")
4546
```

docs/guide/providers.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Currently, Chartlets is available from PyPI only.
5454
Implement the application-specific contributions that users
5555
can add to their extensions.
5656

57-
As an example, see [`panel.py` of the demo](https://github.com/bcdev/chartlets/tree/main/chartlets.py/chartlets/demo/contribs/panel.py):
57+
As an example, see [`panel.py` of the demo](https://github.com/bcdev/chartlets/tree/main/chartlets.py/demo/server/contribs/panel.py):
5858

5959
```python
6060
from chartlets import Contribution
@@ -71,11 +71,11 @@ class Panel(Contribution):
7171

7272
Define the possible contribution points in your application.
7373

74-
As an example, see [`server.py` of the demo](https://github.com/bcdev/chartlets/tree/main/chartlets.py/chartlets/demo/server.py):
74+
As an example, see [`server.py` of the demo](https://github.com/bcdev/chartlets/tree/main/chartlets.py/demo/server/server.py):
7575

7676
```python
7777
from chartlets import Extension
78-
from chartlets.demo.contribs import Panel
78+
from .contribs import Panel
7979

8080
Extension.add_contrib_point("panels", Panel)
8181
```
@@ -84,7 +84,7 @@ Extension.add_contrib_point("panels", Panel)
8484

8585
Load the extensions that augment your application.
8686

87-
As an example, see [`server.py` of the demo](https://github.com/bcdev/chartlets/tree/main/chartlets.py/chartlets/demo/server.py):
87+
As an example, see [`server.py` of the demo](https://github.com/bcdev/chartlets/tree/main/chartlets.py/demo/server/server.py):
8888

8989
```python
9090
from chartlets import ExtensionContext
@@ -97,15 +97,15 @@ ext_ctx = ExtensionContext.load(app_ctx, extension_refs)
9797
Implement the Chartlets API in your application-specific webserver using
9898
the controller implementations in `chartlets.controllers`.
9999

100-
As an example, see [`server.py` of the demo](https://github.com/bcdev/chartlets/tree/main/chartlets.py/chartlets/demo/server.py).
100+
As an example, see [`server.py` of the demo](https://github.com/bcdev/chartlets/tree/main/chartlets.py/demo/server/server.py).
101101

102102
## Frontend integration
103103

104104
The JavaScript package `chartlets` provides the types, actions, and hooks
105105
to allow for supporting server-side UI contributions in your React
106106
application.
107107

108-
As an example, see [the demo application](https://github.com/bcdev/chartlets/tree/main/chartlets.js/src/demo).
108+
As an example, see [the demo application](https://github.com/bcdev/chartlets/tree/main/chartlets.js/packages/demo/src).
109109

110110
As an application provider you will need to perform the
111111
following steps:

0 commit comments

Comments
 (0)