Skip to content

Commit b307789

Browse files
committed
added dummy timeline
1 parent d8a6e5b commit b307789

18 files changed

+348
-57
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
__pycache__
22
venv
33
/dist
4+
/cache/web

cache/artifacts.json

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
"type": "generic",
1818
"filepath": "fetch/result.json"
1919
},
20+
"timeline": {
21+
"path": "process",
22+
"ext": ".json",
23+
"type": "generic",
24+
"filepath": "process/timeline.json"
25+
},
2026
"website": {
2127
"path": "fetch",
2228
"ext": ".json",

cache/dependencies.dot

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ digraph G {
55
D [label="stats", class="artifact", shape="ellipse"];
66
E [label="compute-statistics", class="job", shape="box"];
77
F [label="result", class="artifact", shape="ellipse"];
8-
G [label="generate-website", class="job", shape="box"];
9-
H [label="website", class="artifact", shape="ellipse"];
8+
G [label="timeline", class="artifact", shape="ellipse"];
9+
H [label="generate-website", class="job", shape="box"];
10+
I [label="website", class="artifact", shape="ellipse"];
1011
A -> B;
1112
B -> C;
1213
C -> D;
1314
B -> E;
1415
E -> F;
15-
D -> G;
16-
F -> G;
17-
G -> H;
16+
E -> G;
17+
D -> H;
18+
F -> H;
19+
H -> I;
1820
}

cache/dependencies.dot.svg

+47-35
Loading

cache/dependencies.json

+8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
"label": "result",
2525
"class": "artifact"
2626
},
27+
{
28+
"label": "timeline",
29+
"class": "artifact"
30+
},
2731
{
2832
"label": "generate-website",
2933
"class": "job"
@@ -54,6 +58,10 @@
5458
"source": "compute-statistics",
5559
"target": "result"
5660
},
61+
{
62+
"source": "compute-statistics",
63+
"target": "timeline"
64+
},
5765
{
5866
"source": "stats",
5967
"target": "generate-website"

cache/pipeline.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22
{
33
"stage": "fetch",
44
"job": "fetch-data-1",
5-
"start": "2024-04-21 09:50:41.486325",
6-
"stop": "2024-04-21 09:50:41.587123",
7-
"duration": "0:00:00.100798",
5+
"start": "2024-04-21 11:34:23.145484",
6+
"stop": "2024-04-21 11:34:23.246365",
7+
"duration": "0:00:00.100881",
88
"duration_text": "100 ms"
99
},
1010
{
1111
"stage": "process",
1212
"job": "calculate-functions",
13-
"start": "2024-04-21 09:50:41.587123",
14-
"stop": "2024-04-21 09:50:41.889199",
15-
"duration": "0:00:00.302076",
16-
"duration_text": "302 ms"
13+
"start": "2024-04-21 11:34:23.246365",
14+
"stop": "2024-04-21 11:34:23.551893",
15+
"duration": "0:00:00.305528",
16+
"duration_text": "305 ms"
1717
},
1818
{
1919
"stage": "process",
2020
"job": "compute-statistics",
21-
"start": "2024-04-21 09:50:41.889199",
22-
"stop": "2024-04-21 09:50:42.290750",
23-
"duration": "0:00:00.401551",
21+
"start": "2024-04-21 11:34:23.551893",
22+
"stop": "2024-04-21 11:34:23.953212",
23+
"duration": "0:00:00.401319",
2424
"duration_text": "401 ms"
2525
},
2626
{
2727
"stage": "build",
2828
"job": "generate-website",
29-
"start": "2024-04-21 09:50:42.290750",
30-
"stop": "2024-04-21 09:50:42.793770",
31-
"duration": "0:00:00.503020",
32-
"duration_text": "503 ms"
29+
"start": "2024-04-21 11:34:23.953212",
30+
"stop": "2024-04-21 11:34:24.459497",
31+
"duration": "0:00:00.506285",
32+
"duration_text": "506 ms"
3333
}
3434
]

cache/process/timeline.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[
2+
{
3+
"id": 1,
4+
"content": "item 1",
5+
"start": "2013-04-20"
6+
},
7+
{
8+
"id": 2,
9+
"content": "item 2",
10+
"start": "2013-04-14"
11+
},
12+
{
13+
"id": 3,
14+
"content": "item 3",
15+
"start": "2013-04-18"
16+
},
17+
{
18+
"id": 4,
19+
"content": "item 4",
20+
"start": "2013-04-16",
21+
"end": "2013-04-19"
22+
},
23+
{
24+
"id": 5,
25+
"content": "item 5",
26+
"start": "2013-04-25"
27+
},
28+
{
29+
"id": 6,
30+
"content": "item 6",
31+
"start": "2013-04-27"
32+
}
33+
]

pipeline.py

+9
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ def compute():
2323
new_data = run.get_artifact("content")
2424
time.sleep(0.4)
2525
run.set_artifact({"result":6},"fetch/result.json")
26+
timeline = [
27+
{"id": 1, "content": 'item 1', "start": '2013-04-20'},
28+
{"id": 2, "content": 'item 2', "start": '2013-04-14'},
29+
{"id": 3, "content": 'item 3', "start": '2013-04-18'},
30+
{"id": 4, "content": 'item 4', "start": '2013-04-16', "end": '2013-04-19'},
31+
{"id": 5, "content": 'item 5', "start": '2013-04-25'},
32+
{"id": 6, "content": 'item 6', "start": '2013-04-27'}
33+
]
34+
run.set_artifact(timeline,"process/timeline.json")
2635
return
2736

2837
def build():

website/astro.config.mjs

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ import {config} from './config.js'
55
export default defineConfig({
66
output: 'static',
77
outDir: config.outDir,
8-
base: config.base
8+
base: config.base,
9+
devToolbar: {
10+
enabled: false
11+
}
912
});

website/client_config.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
const base = (import.meta.env.PUBLIC_BASE==null)?"":import.meta.env.PUBLIC_BASE
3+
4+
const config = {
5+
base: base,
6+
}
7+
export {
8+
config
9+
}

website/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
},
1212
"dependencies": {
1313
"astro": "^4.6.3",
14-
"js-yaml": "^4.1.0"
14+
"js-yaml": "^4.1.0",
15+
"vis-data": "^7.1.9",
16+
"vis-timeline": "^7.7.3"
1517
}
1618
}

0 commit comments

Comments
 (0)