Skip to content

Release/nx #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 49 commits into from
Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
2fb64f2
refactor: replace with nx workspace
ngfelixl Oct 5, 2021
5b5d325
chore: add copy-files script
ngfelixl Oct 5, 2021
b8ca9c6
chore: install material, fix serving of static files
ngfelixl Oct 5, 2021
85b3518
chore: install nestjs
ngfelixl Oct 5, 2021
2fe54ec
feat: add interfaces library
ngfelixl Oct 18, 2021
646b453
feat: github icon, mat-drawer, fix plot add
ngfelixl Oct 18, 2021
5294d55
feat: add plotly link, stack components
ngfelixl Oct 18, 2021
17081c4
refactor: create standalone server library
ngfelixl Oct 18, 2021
69530c9
chore: update license year
ngfelixl Dec 9, 2021
7c6ca0b
docs: add notes for the implementation
ngfelixl Dec 9, 2021
cfbdc51
chore: update nestjs dependencies
ngfelixl Dec 9, 2021
ab87cf5
feat: establish socket.io connection
ngfelixl Dec 9, 2021
2cfd4cb
feat: allow single time plots and realtime streams
ngfelixl Dec 11, 2021
56c56dc
chore: add webpack copy plugin
ngfelixl Dec 13, 2021
357c6cc
chore: add package-lock
ngfelixl Dec 19, 2021
1f9482f
chore: update to 13 and run migrations
ngfelixl Dec 19, 2021
2cd7ff4
refactor: use socket.io-client instead of ngx-socket-io
ngfelixl Dec 19, 2021
494609d
chore: disconnect from socket on destroy
ngfelixl Dec 19, 2021
a737dce
chore: use setup-node@v2 github action
ngfelixl Dec 19, 2021
9a038d2
chore: update package name and remove ngrx from eslint plugins
ngfelixl Dec 19, 2021
0e1f56d
refactor(web): remove overview component
ngfelixl Dec 19, 2021
4c0be1a
tests(web): add tests for plots and app component
ngfelixl Dec 19, 2021
c94bcad
feat(web): add link to tutorial in toolbar
ngfelixl Dec 19, 2021
724b565
styles(web): reduce icon size
ngfelixl Dec 19, 2021
0b8832f
refactor: merge the nodeplotlib files into one library
ngfelixl Dec 19, 2021
651c42b
fix: copy web files to nodeplotlib build
ngfelixl Dec 19, 2021
5784f5b
chore(nodeplotlib): fix eslint config
ngfelixl Dec 19, 2021
96f980c
chore: add implicitDependencies for dev-server and web-e2e
ngfelixl Dec 20, 2021
9a1143c
docs: update readmes and tutorial component
ngfelixl Dec 20, 2021
01285bb
feat(nodeplotlib): add possibility to set NODEPLOTLIB_PORT
ngfelixl Dec 20, 2021
0f0a5fb
chore: remove rxjs as it will be listed in the dependencies
ngfelixl Dec 20, 2021
4cd4960
refactor: remove clear function and remove export shutdown
ngfelixl Dec 20, 2021
c47ab63
docs: add dev description and link to user docs
ngfelixl Dec 20, 2021
41939ac
chore: add package.json descriptive properties
ngfelixl Dec 20, 2021
9f0b12c
fix(tools): fix path for copying web files
ngfelixl Dec 20, 2021
2fd2f14
chore: add nestjs platforms as dependencies
ngfelixl Dec 20, 2021
cdaeed5
chore: bump version number
ngfelixl Dec 20, 2021
a6f5fe9
test(nodeplotlib): add tests for bridge-service
ngfelixl Dec 21, 2021
739407c
docs(nodeplotlib): add docs for nodeplotlib basic usage and streams
ngfelixl Dec 21, 2021
819e552
docs: add build and publish guides
ngfelixl Dec 21, 2021
c471439
docs: add npl fav/icon and update readme
ngfelixl Jan 3, 2022
e9a5795
feat(web): add viewport meta tag
ngfelixl Jan 3, 2022
37c299a
feat(web): add npl icon in app, styles, tooltip
ngfelixl Jan 3, 2022
e5fcc04
fix(nodeplotlib): fix console message for server and add full url
ngfelixl Jan 3, 2022
1152110
chore: bump version number
ngfelixl Jan 3, 2022
560df55
docs(nodeplotlib): fix relative path to image
ngfelixl Jan 3, 2022
000d22b
docs(nodeplotlib): add next animation
ngfelixl Jan 3, 2022
2f1d6b9
docs: add animation to the root readme file
ngfelixl Jan 3, 2022
407af8b
chore: bump version number
ngfelixl Jan 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
},
"plugins": [],
"extends": []
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {},
"plugins": []
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
}
]
}
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run test
env:
CI: true
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
- run: npm ci
- run: npx nx run-many --target=lint --all
- run: npx nx run-many --target=build --all
- run: npx nx run-many --target=test --all
env:
CI: true
42 changes: 36 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,40 @@
node_modules/
dist/
# See http://help.github.com/ignore-files/ for more about ignoring files.

yarn.lock
# compiled output
/dist
/tmp
/out-tsc

coverage/
# dependencies
/node_modules

**/plotly.js/**
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

**/*.tgz
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Add files here to ignore them from prettier formatting

/dist
/coverage
4 changes: 1 addition & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"printWidth": 120,
"trailingComma": "all",
"singleQuote": true
}
}
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"angular.ng-template",
"nrwl.angular-console",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"dbaeumer.vscode-eslint"
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Felix Lemke
Copyright (c) 2021 Felix Lemke

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
53 changes: 53 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
These are notes for the stream implementation of Nodeplotlib.

## General

- A plot window (**apps/web**) tries to connect to the server via a realtime api (e.g. websockets).
- The server recognizes the count of connected apps.
- If the user executes the `plot` function several times, it will only open a window if there is no
open connection to a **apps/web**.

## Server lifecycle

- The server starts with the execution of the `plot` function if there is no active server running.
- The server stops if all **apps/web** are disconnected (and there were connections before).

## The plot function

- The plot function can either handle a `Plot` or an `Observable<Plot>`.
- It creates an `Observable<Plot>` by using Rxjs' `of` observable constructor.
- The plot streams are saved in a Plots Set.
- If there is an active **apps/web** that listens to the server, it subscribes to all Plots in the Set.
- It does not submit a whole "plots" object, but rather submits all plots one by one. The reason is
realtime data, for which only the updated plot should be transmitted.
- If all **apps/web** are disconnected, it should close the observable subscriptions of the plots and close
the server as mentioned in the **server lifecycle** section.

## The stack function

- Is the `stack` function really needed? Stack served the purpose that only one window opens which
could display several plots.

## The clear function

- The `clear` function is also probably not needed. Just close all windows and it should close the
subscriptions to the plots and streams.

## Backlog

- The user can remove plots from the frontend. If that happened it submits a message to the
backend so that the subscription can be cancelled and the plot stream can be removed from the plots set.

## Frontend only

- The user has the possibility to rearrange plots per drag and drop.
- The user can resize the individual plot windows.

## Development

To start the app for development purposes run

```
npm run build web -- --watch
npm start dev-server
```
Loading