Skip to content

Commit a1b2eff

Browse files
authored
Merge pull request #62 from ngfelixl/release/nx
Release/nx
2 parents 6e92905 + 407af8b commit a1b2eff

File tree

136 files changed

+37179
-4805
lines changed

Some content is hidden

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

136 files changed

+37179
-4805
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintrc.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nrwl/nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nrwl/nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
},
23+
"plugins": [],
24+
"extends": []
25+
},
26+
{
27+
"files": ["*.ts", "*.tsx"],
28+
"extends": ["plugin:@nrwl/nx/typescript"],
29+
"rules": {},
30+
"plugins": []
31+
},
32+
{
33+
"files": ["*.js", "*.jsx"],
34+
"extends": ["plugin:@nrwl/nx/javascript"],
35+
"rules": {}
36+
}
37+
]
38+
}

.github/workflows/ci.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ on: [push]
44

55
jobs:
66
build:
7-
87
runs-on: ubuntu-latest
98

109
steps:
11-
- uses: actions/checkout@v2
12-
- name: Use Node.js
13-
uses: actions/setup-node@v1
14-
with:
15-
node-version: '14.x'
16-
- run: npm ci
17-
- run: npm run lint
18-
- run: npm run build
19-
- run: npm run test
20-
env:
21-
CI: true
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v2
12+
with:
13+
node-version: '16.x'
14+
- run: npm ci
15+
- run: npx nx run-many --target=lint --all
16+
- run: npx nx run-many --target=build --all
17+
- run: npx nx run-many --target=test --all
18+
env:
19+
CI: true

.gitignore

+36-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
1-
node_modules/
2-
dist/
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
32

4-
yarn.lock
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
57

6-
coverage/
8+
# dependencies
9+
/node_modules
710

8-
**/plotly.js/**
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
919

10-
**/*.tgz
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.angular/cache
29+
/.sass-cache
30+
/connect.lock
31+
/coverage
32+
/libpeerconnection.log
33+
npm-debug.log
34+
yarn-error.log
35+
testem.log
36+
/typings
37+
38+
# System Files
39+
.DS_Store
40+
Thumbs.db

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add files here to ignore them from prettier formatting
2+
3+
/dist
4+
/coverage

.prettierrc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"printWidth": 120,
3-
"trailingComma": "all",
42
"singleQuote": true
5-
}
3+
}

.vscode/extensions.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"angular.ng-template",
4+
"nrwl.angular-console",
5+
"esbenp.prettier-vscode",
6+
"firsttris.vscode-jest-runner",
7+
"dbaeumer.vscode-eslint"
8+
]
9+
}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Felix Lemke
3+
Copyright (c) 2021 Felix Lemke
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

NOTES.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
These are notes for the stream implementation of Nodeplotlib.
2+
3+
## General
4+
5+
- A plot window (**apps/web**) tries to connect to the server via a realtime api (e.g. websockets).
6+
- The server recognizes the count of connected apps.
7+
- If the user executes the `plot` function several times, it will only open a window if there is no
8+
open connection to a **apps/web**.
9+
10+
## Server lifecycle
11+
12+
- The server starts with the execution of the `plot` function if there is no active server running.
13+
- The server stops if all **apps/web** are disconnected (and there were connections before).
14+
15+
## The plot function
16+
17+
- The plot function can either handle a `Plot` or an `Observable<Plot>`.
18+
- It creates an `Observable<Plot>` by using Rxjs' `of` observable constructor.
19+
- The plot streams are saved in a Plots Set.
20+
- If there is an active **apps/web** that listens to the server, it subscribes to all Plots in the Set.
21+
- It does not submit a whole "plots" object, but rather submits all plots one by one. The reason is
22+
realtime data, for which only the updated plot should be transmitted.
23+
- If all **apps/web** are disconnected, it should close the observable subscriptions of the plots and close
24+
the server as mentioned in the **server lifecycle** section.
25+
26+
## The stack function
27+
28+
- Is the `stack` function really needed? Stack served the purpose that only one window opens which
29+
could display several plots.
30+
31+
## The clear function
32+
33+
- The `clear` function is also probably not needed. Just close all windows and it should close the
34+
subscriptions to the plots and streams.
35+
36+
## Backlog
37+
38+
- The user can remove plots from the frontend. If that happened it submits a message to the
39+
backend so that the subscription can be cancelled and the plot stream can be removed from the plots set.
40+
41+
## Frontend only
42+
43+
- The user has the possibility to rearrange plots per drag and drop.
44+
- The user can resize the individual plot windows.
45+
46+
## Development
47+
48+
To start the app for development purposes run
49+
50+
```
51+
npm run build web -- --watch
52+
npm start dev-server
53+
```

0 commit comments

Comments
 (0)