Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2b94805
bennaaym/labgraph_monitor: set up typescript template for labgraph mo…
bennaaym Feb 10, 2022
5b2cc11
bennaaym/labgraph_monitor: graph layout set up using mock data
bennaaym Feb 11, 2022
80c42a9
bennaaym/labgraph_monitor: organize the graph layout using dagre
bennaaym Feb 11, 2022
a411e88
bennaaym/labgraph_monitor: graph style updated
bennaaym Feb 11, 2022
712a69b
bennaaym/labgraph_monitor: SettingPanel initial implementation
bennaaym Feb 11, 2022
7289e37
bennaaym/labgraph_monitor: SettingPanel updated
bennaaym Feb 11, 2022
ac5d453
bennaaym/labgraph_monitor: UIContext implemented
bennaaym Feb 12, 2022
f1a115f
bennaaym/labgraph_monitor: GraphSettings component initial implementa…
bennaaym Feb 13, 2022
32c99de
bennaaym/labgraph_monitor: mock examples added
bennaaym Feb 13, 2022
2220577
bennaaym/labgraph_monitor: GraphSettings connect form added
bennaaym Feb 13, 2022
377aed5
bennaaym/labgraph_monitor: websocket connection set up with the backe…
bennaaym Feb 14, 2022
41de247
bennaaym/labgraph_monitor: optimize rendering, render only if the pre…
bennaaym Feb 14, 2022
26c8022
bennaaym/labgraph_monitor: NodeSetting, EdgeSetting comonent updated …
bennaaym Feb 15, 2022
a689772
bennaaym/labgraph_monitor: EdgeSetting component updated
bennaaym Feb 15, 2022
033ee90
bennaaym/labgraph_monitor: migrate ConfigContext to redux store
bennaaym Feb 16, 2022
56327cb
bennaaym/labgraph_monitor: migrating WSContext to redux store
bennaaym Feb 16, 2022
203f52e
bennaaym/labgraph_monitor: copyright header added
bennaaym Feb 16, 2022
cc5529e
bennaaym/labgraph: updated .husky script to detect changes only insid…
bennaaym Feb 16, 2022
09598cf
bennaaym/labgraph_monitor: first unittest added, test Home component
bennaaym Feb 18, 2022
b421b4a
bennaaym/labgraph_monitor: unittest added
bennaaym Feb 18, 2022
b72e544
bennaaym/labgraph_monitor: adding documentation comments
bennaaym Feb 18, 2022
8e68cb5
bennaaym/labgraph_monitor: README updated
bennaaym Feb 18, 2022
1983088
bennaaym/labgraph: update from graph/ to Graph/ issue resolved
bennaaym Feb 18, 2022
0666023
bennaaym/labgraph_monitor: github action added
bennaaym Feb 18, 2022
538147a
Delete extensions/prototypes/labgraph_monitor/src/components/graph di…
bennaaym Feb 18, 2022
3bb54ee
Delete extensions/prototypes/labgraph_monitor/src/pages/home directory
bennaaym Mar 2, 2022
b3c97de
bennaaym/labgraph_monitor: directories refactored, README updated, ty…
bennaaym Mar 12, 2022
4739bd6
bennaaym/labgraph_monitor: WSContext updated
bennaaym Mar 12, 2022
64c8342
bennaaym/labgraph_monitor: github action updated
bennaaym Mar 12, 2022
5938270
bennaaym/labgraph_monitor: public/ updated
bennaaym Mar 12, 2022
3d2d640
bennaaym/labgraph_monitor: get rid of inline-style | add interface fo…
bennaaym Mar 12, 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
22 changes: 22 additions & 0 deletions .github/workflows/labgraph_monitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
cd extensions/prototypes/labgraph_monitor
yarn
- name: Run labgraph_monitor tests
run: |
cd extensions/prototypes/labgraph_monitor
yarn test --watchAll=false
yarn build
2 changes: 2 additions & 0 deletions extensions/prototypes/labgraph_monitor/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
public
18 changes: 18 additions & 0 deletions extensions/prototypes/labgraph_monitor/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["react-app", "react-app/jest", "prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
],
"no-console": [
"warn",
{
"allow": ["warn", "error"]
}
]
}
}
3 changes: 2 additions & 1 deletion extensions/prototypes/labgraph_monitor/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/node_modules
/.pnp
.pnp.js
/public

# testing
/coverage
Expand All @@ -22,3 +21,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

package-lock.json
8 changes: 8 additions & 0 deletions extensions/prototypes/labgraph_monitor/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is .husky file a compulsory file for this commit?

Copy link
Contributor Author

@bennaaym bennaaym Mar 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently I'm using prettier, eslint, husky to automate formatting, identifying patterns which keeps the code consistent and production-ready.
I believe that aligns with the approach that LabGraph is using with python by using flake8. The point of using husky is to automate the process through git-hooks, my current code will run a check whenever a contributor tries to add a new commit(pre-commit git-hook) that will prevent bad commits from being committed if there are any (e.g: unwanted console.log(), unused packages, unformatted code ...).
The husky script will run only if there is a change in the extensions/prototypes/labgraph_monitor directory.

. "$(dirname "$0")/_/husky.sh"
cd ./extensions/prototypes/labgraph_monitor
SRC_PATTERN="extensions/prototypes/labgraph_monitor"
git diff --cached --name-only | if grep --quiet "$SRC_PATTERN"
then
yarn check-code
fi
2 changes: 2 additions & 0 deletions extensions/prototypes/labgraph_monitor/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public
node_modules
7 changes: 7 additions & 0 deletions extensions/prototypes/labgraph_monitor/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 4,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick Question, is this tab width also consistent with the formatting on the Python side?

Copy link
Contributor Author

@bennaaym bennaaym Mar 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently, flake8 show a warning if the tab size isn't a multiple of 4 however the code can be always committed (that might need to be automated more). For typescript Airbnb guidelines suggest using 2 as tab size however I changed it to 4 to keep it consistent with Python.

ref: 949ffc9

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'm used to the Airbnb spec with 2, and probably most Front End contributors would be as well. However, if the repo wants to be consistent for both React and Python then yea I guess thats okay.

"semi": true,
"singleQuote": true,
"endOfLine": "auto"
}
21 changes: 0 additions & 21 deletions extensions/prototypes/labgraph_monitor/App.css

This file was deleted.

161 changes: 0 additions & 161 deletions extensions/prototypes/labgraph_monitor/App.js

This file was deleted.

Loading