Skip to content

Commit

Permalink
added dummy timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
wassfila committed Apr 21, 2024
1 parent d8a6e5b commit b307789
Show file tree
Hide file tree
Showing 18 changed files with 348 additions and 57 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__pycache__
venv
/dist
/cache/web
6 changes: 6 additions & 0 deletions cache/artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
"type": "generic",
"filepath": "fetch/result.json"
},
"timeline": {
"path": "process",
"ext": ".json",
"type": "generic",
"filepath": "process/timeline.json"
},
"website": {
"path": "fetch",
"ext": ".json",
Expand Down
12 changes: 7 additions & 5 deletions cache/dependencies.dot
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ digraph G {
D [label="stats", class="artifact", shape="ellipse"];
E [label="compute-statistics", class="job", shape="box"];
F [label="result", class="artifact", shape="ellipse"];
G [label="generate-website", class="job", shape="box"];
H [label="website", class="artifact", shape="ellipse"];
G [label="timeline", class="artifact", shape="ellipse"];
H [label="generate-website", class="job", shape="box"];
I [label="website", class="artifact", shape="ellipse"];
A -> B;
B -> C;
C -> D;
B -> E;
E -> F;
D -> G;
F -> G;
G -> H;
E -> G;
D -> H;
F -> H;
H -> I;
}
82 changes: 47 additions & 35 deletions cache/dependencies.dot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions cache/dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"label": "result",
"class": "artifact"
},
{
"label": "timeline",
"class": "artifact"
},
{
"label": "generate-website",
"class": "job"
Expand Down Expand Up @@ -54,6 +58,10 @@
"source": "compute-statistics",
"target": "result"
},
{
"source": "compute-statistics",
"target": "timeline"
},
{
"source": "stats",
"target": "generate-website"
Expand Down
28 changes: 14 additions & 14 deletions cache/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@
{
"stage": "fetch",
"job": "fetch-data-1",
"start": "2024-04-21 09:50:41.486325",
"stop": "2024-04-21 09:50:41.587123",
"duration": "0:00:00.100798",
"start": "2024-04-21 11:34:23.145484",
"stop": "2024-04-21 11:34:23.246365",
"duration": "0:00:00.100881",
"duration_text": "100 ms"
},
{
"stage": "process",
"job": "calculate-functions",
"start": "2024-04-21 09:50:41.587123",
"stop": "2024-04-21 09:50:41.889199",
"duration": "0:00:00.302076",
"duration_text": "302 ms"
"start": "2024-04-21 11:34:23.246365",
"stop": "2024-04-21 11:34:23.551893",
"duration": "0:00:00.305528",
"duration_text": "305 ms"
},
{
"stage": "process",
"job": "compute-statistics",
"start": "2024-04-21 09:50:41.889199",
"stop": "2024-04-21 09:50:42.290750",
"duration": "0:00:00.401551",
"start": "2024-04-21 11:34:23.551893",
"stop": "2024-04-21 11:34:23.953212",
"duration": "0:00:00.401319",
"duration_text": "401 ms"
},
{
"stage": "build",
"job": "generate-website",
"start": "2024-04-21 09:50:42.290750",
"stop": "2024-04-21 09:50:42.793770",
"duration": "0:00:00.503020",
"duration_text": "503 ms"
"start": "2024-04-21 11:34:23.953212",
"stop": "2024-04-21 11:34:24.459497",
"duration": "0:00:00.506285",
"duration_text": "506 ms"
}
]
33 changes: 33 additions & 0 deletions cache/process/timeline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[
{
"id": 1,
"content": "item 1",
"start": "2013-04-20"
},
{
"id": 2,
"content": "item 2",
"start": "2013-04-14"
},
{
"id": 3,
"content": "item 3",
"start": "2013-04-18"
},
{
"id": 4,
"content": "item 4",
"start": "2013-04-16",
"end": "2013-04-19"
},
{
"id": 5,
"content": "item 5",
"start": "2013-04-25"
},
{
"id": 6,
"content": "item 6",
"start": "2013-04-27"
}
]
9 changes: 9 additions & 0 deletions pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ def compute():
new_data = run.get_artifact("content")
time.sleep(0.4)
run.set_artifact({"result":6},"fetch/result.json")
timeline = [
{"id": 1, "content": 'item 1', "start": '2013-04-20'},
{"id": 2, "content": 'item 2', "start": '2013-04-14'},
{"id": 3, "content": 'item 3', "start": '2013-04-18'},
{"id": 4, "content": 'item 4', "start": '2013-04-16', "end": '2013-04-19'},
{"id": 5, "content": 'item 5', "start": '2013-04-25'},
{"id": 6, "content": 'item 6', "start": '2013-04-27'}
]
run.set_artifact(timeline,"process/timeline.json")
return

def build():
Expand Down
5 changes: 4 additions & 1 deletion website/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ import {config} from './config.js'
export default defineConfig({
output: 'static',
outDir: config.outDir,
base: config.base
base: config.base,
devToolbar: {
enabled: false
}
});
9 changes: 9 additions & 0 deletions website/client_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

const base = (import.meta.env.PUBLIC_BASE==null)?"":import.meta.env.PUBLIC_BASE

const config = {
base: base,
}
export {
config
}
4 changes: 3 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
},
"dependencies": {
"astro": "^4.6.3",
"js-yaml": "^4.1.0"
"js-yaml": "^4.1.0",
"vis-data": "^7.1.9",
"vis-timeline": "^7.7.3"
}
}
Loading

0 comments on commit b307789

Please sign in to comment.