Skip to content

Commit 6060a64

Browse files
committed
renamed dashi into chartlets
1 parent 23af378 commit 6060a64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+121
-121
lines changed

dashi/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# dashi
1+
# chartlets
22

3-
Dashi is a JavaScript library that allows configuring server-side widgets
3+
Chartlets is a JavaScript library that allows configuring server-side widgets
44
and plugging them into existing web frontends.
55

66
_Note, this library is experimental and under development still._
@@ -31,23 +31,23 @@ The bottom shows the lifeline of the backend REST server.
3131
## How to run the demo
3232

3333
```bash
34-
git clone https://github.com/bcdev/dashi.git
34+
git clone https://github.com/bcdev/chartlets.git
3535
```
3636

3737
### Run the server
3838

3939
```bash
40-
cd dashi/dashipy
40+
cd chartlets/dashipy
4141
conda env create
42-
conda activate dashi
42+
conda activate chartlets
4343
pip install -ve .
4444
python -m dashipy.demo.server
4545
```
4646

4747
### Run the UI
4848

4949
```bash
50-
cd ../dashi
50+
cd ../chartlets
5151
npm install
5252
npm run dev
5353
```

dashi/TODO.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Dashi UI TODOs
1+
# Chartlets UI TODOs
22

33
- Keep state flat, avoid deep nesting!
44

@@ -11,7 +11,5 @@
1111
- How: Go back to former design where initial contributions that stay constant
1212
are separate from changing contribution states and components.
1313

14-
- Consequently use `propertyPath: string[]` instead of `propertyName: string`
15-
1614
- Add true actions from `src/actions` to store state so that lib users
1715
know what actions are public.

dashi/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dashi/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "dashipopashi",
3-
"version": "0.0.15",
2+
"name": "chartlets",
3+
"version": "0.0.0",
44
"description": "An experimental library for integrating interactive charts into existing JavaScript applications.",
55
"type": "module",
66
"files": [
@@ -18,22 +18,22 @@
1818
],
1919
"repository": {
2020
"type": "git",
21-
"url": "https://github.com/bcdev/dashi.git"
21+
"url": "https://github.com/bcdev/charlet.git"
2222
},
2323
"bugs": {
24-
"url": "https://github.com/bcdev/dashi/issues"
24+
"url": "https://github.com/bcdev/charlet/issues"
2525
},
26-
"homepage": "https://github.com/bcdev/dashi/blob/main/dashi/README.md",
26+
"homepage": "https://github.com/bcdev/charlet/blob/main/chartlets/README.md",
2727
"author": "Brockmann Consult GmbH",
2828
"license": "MIT",
2929
"types": "./dist/index.d.ts",
30-
"module": "./dist/dashi.js",
31-
"main": "./dist/dashi.umd.cjs",
30+
"module": "./dist/chartlets.js",
31+
"main": "./dist/chartlets.umd.cjs",
3232
"exports": {
3333
".": {
3434
"types": "./dist/index.d.ts",
35-
"module": "./dist/dashi.js",
36-
"require": "./dist/dashi.umd.cjs"
35+
"module": "./dist/chartlets.js",
36+
"require": "./dist/chartlets.umd.cjs"
3737
}
3838
},
3939
"scripts": {

dashi/src/demo/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function App() {
3232
<ThemeProvider theme={theme}>
3333
<CssBaseline />
3434
<Typography fontSize="3em" fontWeight="bold">
35-
Dashi Demo
35+
Chartlets Demo
3636
</Typography>
3737
<ExtensionsInfo />
3838
<ControlBar />

dashi/src/lib/actions/helpers/configureLogging.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,26 @@ function logState(next: StoreState, prev: StoreState) {
2727
const delta = diff(prev, next);
2828
const nDiffs = delta.length;
2929
console.groupCollapsed(
30-
`dashi: state changed (${nDiffs} difference${nDiffs === 1 ? "" : "s"})`,
30+
`chartlets: state changed (${nDiffs} difference${nDiffs === 1 ? "" : "s"})`,
3131
);
3232
delta.forEach(logDiff);
33-
console.debug("dashi: change details:", { prev, next, delta });
33+
console.debug("chartlets: change details:", { prev, next, delta });
3434
console.groupEnd();
3535
}
3636

3737
function logDiff(v: Difference, index: number) {
3838
const wherePart = `%c${index + 1} %c${v.type} %c${v.path.join(".")}`;
3939
if (v.type === "CREATE") {
40-
console.debug("dashi:", wherePart, indexStyle, typeStyle, pathStyle, {
40+
console.debug("chartlets:", wherePart, indexStyle, typeStyle, pathStyle, {
4141
value: v.value,
4242
});
4343
} else if (v.type === "CHANGE") {
44-
console.debug("dashi:", wherePart, indexStyle, typeStyle, pathStyle, {
44+
console.debug("chartlets:", wherePart, indexStyle, typeStyle, pathStyle, {
4545
value: v.value,
4646
oldValue: v.oldValue,
4747
});
4848
} else if (v.type === "REMOVE") {
49-
console.debug("dashi:", wherePart, indexStyle, typeStyle, pathStyle, {
49+
console.debug("chartlets:", wherePart, indexStyle, typeStyle, pathStyle, {
5050
oldValue: v.oldValue,
5151
});
5252
}

dashi/src/lib/actions/helpers/invokeCallbacks.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ export function invokeCallbacks(callbackRequests: CallbackRequest[]) {
88
const shouldLog = configuration.logging?.enabled;
99
if (!callbackRequests.length) {
1010
if (shouldLog) {
11-
console.info(`dashi: invokeCallbacks - no requests`, callbackRequests);
11+
console.info(
12+
`chartlets: invokeCallbacks - no requests`,
13+
callbackRequests,
14+
);
1215
}
1316
return;
1417
}
1518
const invocationId = getInvocationId();
1619
if (shouldLog) {
1720
console.info(
18-
`dashi: invokeCallbacks (${invocationId})-->`,
21+
`chartlets: invokeCallbacks (${invocationId})-->`,
1922
callbackRequests,
2023
);
2124
}
@@ -24,7 +27,7 @@ export function invokeCallbacks(callbackRequests: CallbackRequest[]) {
2427
if (changeRequestsResult.data) {
2528
if (shouldLog) {
2629
console.info(
27-
`dashi: invokeCallbacks <--(${invocationId})`,
30+
`chartlets: invokeCallbacks <--(${invocationId})`,
2831
changeRequestsResult.data,
2932
);
3033
}

dashi/src/lib/api/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { ApiOptions, ApiError, ApiResult } from "@/lib/types/api";
22
import { hasOwnProperty } from "../utils/hasOwnProperty";
33

44
const defaultServerUrl = "http://localhost:8888";
5-
const defaultEndpointName = "dashi";
5+
const defaultEndpointName = "chartlets";
66

77
export async function fetchApiResult<T, P extends unknown[]>(
88
callApi: (...args: P) => Promise<T>,

dashi/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export default defineConfig({
3939
sourcemap: true,
4040
lib: {
4141
entry: resolve(__dirname, "src/lib/index.ts"),
42-
name: "Dashi",
42+
name: "Chartlets",
4343
// the proper extensions will be added
44-
fileName: "dashi",
44+
fileName: "chartlets",
4545
},
4646
rollupOptions: {
4747
// externalize deps that shouldn't be bundled into the library

dashipy/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# dashi
1+
# chartlets
22

3-
Dashi is a framework for server-configured panels.
3+
`chartlets` is a Python framework for server-configured web-UI contributions.
44

55
## Run demo server
66

77
``` bash
88
mamba env create
9-
conda activate dashi
10-
python -m dashipy.server
9+
conda activate chartlets
10+
python -m chartlets.demo.server
1111
```
1212

1313
## How to use the framework
@@ -17,10 +17,10 @@ python -m dashipy.server
1717
Implement the application-specific contributions that users
1818
can add to their extensions.
1919

20-
As an example, see [`panel.py` of the demo](dashipy/demo/contribs/panel.py):
20+
As an example, see [`panel.py` of the demo](chartlets/demo/contribs/panel.py):
2121

2222
```python
23-
from dashipy import Contribution
23+
from chartlets import Contribution
2424

2525

2626
class Panel(Contribution):
@@ -34,11 +34,11 @@ class Panel(Contribution):
3434

3535
Define the possible contribution points in your application.
3636

37-
As an example, see [`server.py` of the demo](dashipy/demo/server.py):
37+
As an example, see [`server.py` of the demo](chartlets/demo/server.py):
3838

3939
```python
40-
from dashipy import Extension
41-
from dashipy.demo.contribs import Panel
40+
from chartlets import Extension
41+
from chartlets.demo.contribs import Panel
4242

4343
Extension.add_contrib_point("panels", Panel)
4444
```
@@ -47,24 +47,24 @@ Extension.add_contrib_point("panels", Panel)
4747

4848
Load the extensions that augment your application.
4949

50-
As an example, see [`server.py` of the demo](dashipy/demo/server.py):
50+
As an example, see [`server.py` of the demo](chartlets/demo/server.py):
5151

5252
```python
53-
from dashipy import ExtensionContext
53+
from chartlets import ExtensionContext
5454

5555
ext_ctx = ExtensionContext.load(app_ctx, extension_refs)
5656
```
5757

5858
### 4. Publish the extensions
5959

60-
Implement the Dashi API in your application-specific webserver using
60+
Implement the Chartlets API in your application-specific webserver using
6161
the controller implementations in `dashipy.controllers`.
6262

63-
As an example, see [`server.py` of the demo](dashipy/demo/server.py).
63+
As an example, see [`server.py` of the demo](chartlets/demo/server.py).
6464

6565
### 5. Consume the extensions
6666

67-
Use JavaScript package `dashi` in your frontend to implement the
67+
Use JavaScript package `chartlets` in your frontend to implement the
6868
contribution lifecycle in your React application.
6969

70-
As an example, see [the demo application](../dashi/src/demo).
70+
As an example, see [the demo application](../chartlets/src/demo).

0 commit comments

Comments
 (0)