Skip to content

Commit

Permalink
Merge pull request #62 from ngfelixl/release/nx
Browse files Browse the repository at this point in the history
Release/nx
  • Loading branch information
ngfelixl authored Jan 3, 2022
2 parents 6e92905 + 407af8b commit a1b2eff
Show file tree
Hide file tree
Showing 136 changed files with 37,179 additions and 4,805 deletions.
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

0 comments on commit a1b2eff

Please sign in to comment.