Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit f15c0ed

Browse files
authored
SparseZoo Table UI (#69)
Added a simple dynamic table for sparsezoo models. Core Features: -View models by domain and subdomain. -Pagination of models -Filtering based on fields
1 parent 5962b41 commit f15c0ed

Some content is hidden

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

65 files changed

+14437
-1
lines changed

.github/workflows/quality-check.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v2
8-
- name: "⚙️ Install dependencies"
8+
- uses: actions/setup-node@v2
9+
with:
10+
node-version: '14'
11+
- name: "⚙️ Install python dependencies"
912
run: pip3 install .[dev]
13+
- name: "⚙️ Install js dependencies"
14+
run: yarn install
1015
- name: "🧹 Running quality checks"
1116
run: make quality

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ BUILDDIR := $(PWD)
44
PYCHECKDIRS := examples tests src utils scripts notebooks
55
PYCHECKGLOBS := 'examples/**/*.py' 'scripts/**/*.py' 'src/**/*.py' 'tests/**/*.py' 'utils/**/*.py' setup.py
66
DOCDIR := docs
7+
JSCHECKDIRS := src public
8+
JSCHECKGLOBS := 'public/**/*.html' 'public/**/*.js' 'public/**/*.css' 'src/**/*.html' 'src/**/*.jsx' 'tests/**/*.jsx'
79
MDCHECKGLOBS := 'docs/**/*.md' 'docs/**/*.rst' 'examples/**/*.md' 'notebooks/**/*.md' 'scripts/**/*.md'
810
MDCHECKFILES := CODE_OF_CONDUCT.md CONTRIBUTING.md DEVELOPING.md README.md
911
SPARSEZOO_TEST_MODE := "true"
@@ -42,6 +44,8 @@ quality:
4244
black --check $(PYCHECKDIRS);
4345
isort --check-only $(PYCHECKDIRS);
4446
flake8 $(PYCHECKDIRS);
47+
@echo "Running js/jsx quality checks";
48+
yarn prettier --check $(JSCHECKDIRS);
4549

4650
# style the code according to accepted standards for the repo
4751
style:
@@ -50,6 +54,8 @@ style:
5054
@echo "Running python styling";
5155
black $(PYCHECKDIRS);
5256
isort $(PYCHECKDIRS);
57+
@echo "Running js/jsx styling";
58+
yarn prettier --write $(JSCHECKDIRS);
5359

5460
# run tests for the repo
5561
test:
@@ -68,6 +74,10 @@ docsupdate:
6874

6975
# creates wheel file
7076
build:
77+
@echo "Building UI";
78+
yarn install;
79+
yarn build;
80+
@echo "Building python package";
7181
python3 setup.py sdist bdist_wheel $(BUILD_ARGS)
7282

7383
# clean package

package.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"name": "sparsezoo",
3+
"version": "0.2.0",
4+
"private": true,
5+
"repository": "[email protected]:neuralmagic/sparsezoo.git",
6+
"author": "Neuralmagic, Inc.",
7+
"license": "Apache",
8+
"dependencies": {
9+
"@material-ui/core": "^4.11.3",
10+
"@material-ui/icons": "^4.11.2",
11+
"@reduxjs/toolkit": "^1.5.1",
12+
"jwt-decode": "^3.1.2",
13+
"lodash": "^4.17.21",
14+
"prop-types": "^15.7.2",
15+
"react": "^17.0.2",
16+
"react-copy-to-clipboard": "^5.0.3",
17+
"react-dom": "^17.0.2",
18+
"react-redux": "^7.2.3",
19+
"react-router-dom": "^5.2.0",
20+
"react-scripts": "^4.0.3",
21+
"react-transition-group": "^4.4.1",
22+
"redux": "^4.0.5",
23+
"universal-cookie": "^4.0.4"
24+
},
25+
"devDependencies": {
26+
"prettier": "^2.2.1"
27+
},
28+
"scripts": {
29+
"lint": "yarn prettier --write src/ui",
30+
"start": "REACT_APP_SPARSEZOO_API_URL=$SPARSEZOO_API_URL react-scripts start",
31+
"build": "NODE_ENV=production REACT_APP_SPARSEZOO_API_URL=$SPARSEZOO_API_URL && react-scripts build"
32+
},
33+
"eslintConfig": {
34+
"extends": [
35+
"react-app",
36+
"react-app/jest"
37+
]
38+
},
39+
"browserslist": {
40+
"production": [
41+
">0.2%",
42+
"not dead",
43+
"not op_mini all"
44+
],
45+
"development": [
46+
"last 1 chrome version",
47+
"last 1 firefox version",
48+
"last 1 safari version"
49+
]
50+
},
51+
"prettier": {
52+
"printWidth": 88,
53+
"tabWidth": 2,
54+
"useTabs": false,
55+
"semi": true,
56+
"singleQuote": false,
57+
"quoteProps": "as-needed",
58+
"trailingComma": "es5",
59+
"bracketSpacing": true,
60+
"jsxBracketSameLine": false,
61+
"arrowParens": "always"
62+
}
63+
}
12.6 KB
Loading
54 KB
Loading
11.4 KB
Loading
444 Bytes
Loading
1.04 KB
Loading

public/assets/favicon/favicon.ico

15 KB
Binary file not shown.

public/index.html

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!--
2+
Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing,
11+
software distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
17+
<!DOCTYPE html>
18+
<html lang="en">
19+
<head>
20+
<meta charset="utf-8" />
21+
<link rel="icon" href="%PUBLIC_URL%/assets/favicon/favicon.ico" />
22+
<meta name="viewport" content="width=device-width, initial-scale=1" />
23+
<meta
24+
name="description"
25+
content="Tables for display SparseZoo models. Developed by Neural Magic."
26+
/>
27+
<link
28+
rel="apple-touch-icon"
29+
href="%PUBLIC_URL%/assets/favicon/apple-touch-icon.png"
30+
/>
31+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
32+
<title>SparseZoo Table</title>
33+
<style>
34+
#root {
35+
position: absolute;
36+
padding: 0;
37+
top: 0;
38+
bottom: 0;
39+
left: 0;
40+
right: 0;
41+
width: 100%;
42+
height: 100%;
43+
}
44+
</style>
45+
</head>
46+
<body>
47+
<noscript>You need to enable JavaScript to run this app.</noscript>
48+
<div id="root"></div>
49+
</body>
50+
</html>

0 commit comments

Comments
 (0)