Skip to content

Commit fe64b32

Browse files
authored
Fix linter (#2)
* Fix linter * Upgrade yarn.lock * Fix CI * More rename fix * Use yarn as node runner * Select more specifically packages * More ci fixes * More MANIFEST fix * More fix to MANIFEST.in
1 parent fb6d9cb commit fe64b32

Some content is hidden

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

58 files changed

+2209
-1801
lines changed

.github/workflows/build.yml

Lines changed: 73 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -4,93 +4,92 @@ on:
44
push:
55
branches: main
66
pull_request:
7-
branches: '*'
7+
branches: main
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
- name: Install node
16-
uses: actions/setup-node@v1
17-
with:
18-
node-version: '14.x'
19-
- name: Install Python
20-
uses: actions/setup-python@v2
21-
with:
22-
python-version: '3.8'
23-
architecture: 'x64'
24-
25-
26-
- name: Setup pip cache
27-
uses: actions/cache@v2
28-
with:
29-
path: ~/.cache/pip
30-
key: pip-3.8-${{ hashFiles('package.json') }}
31-
restore-keys: |
32-
pip-3.8-
33-
pip-
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Install node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: '14.x'
19+
- name: Install Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.8'
23+
architecture: 'x64'
24+
25+
- name: Setup pip cache
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.cache/pip
29+
key: pip-3.8-${{ hashFiles('package.json') }}
30+
restore-keys: |
31+
pip-3.8-
32+
pip-
33+
34+
- name: Get yarn cache directory path
35+
id: yarn-cache-dir-path
36+
run: echo "::set-output name=dir::$(yarn cache dir)"
37+
- name: Setup yarn cache
38+
uses: actions/cache@v2
39+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
40+
with:
41+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
42+
key: yarn-${{ hashFiles('**/yarn.lock') }}
43+
restore-keys: |
44+
yarn-
3445
35-
- name: Get yarn cache directory path
36-
id: yarn-cache-dir-path
37-
run: echo "::set-output name=dir::$(yarn cache dir)"
38-
- name: Setup yarn cache
39-
uses: actions/cache@v2
40-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
41-
with:
42-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
43-
key: yarn-${{ hashFiles('**/yarn.lock') }}
44-
restore-keys: |
45-
yarn-
46-
47-
- name: Install dependencies
48-
run: python -m pip install -U jupyterlab~=3.1 check-manifest
49-
- name: Build the extension
50-
run: |
51-
set -eux
52-
jlpm
53-
jlpm run eslint:check
54-
python -m pip install .
46+
- name: Install dependencies
47+
run: python -m pip install -U jupyterlab~=3.1 check-manifest
48+
- name: Build the extension
49+
run: |
50+
set -eux
51+
jlpm
52+
jlpm run lint:check
53+
python -m pip install .
5554
56-
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*OK"
57-
python -m jupyterlab.browser_check
55+
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*OK"
56+
python -m jupyterlab.browser_check
5857
59-
check-manifest -v
58+
check-manifest -v
6059
61-
pip install build
62-
python -m build --sdist
63-
cp dist/*.tar.gz myextension.tar.gz
64-
pip uninstall -y jupyter_ui_demo jupyterlab
65-
rm -rf myextension
60+
pip install build
61+
python -m build --sdist
62+
cp dist/*.tar.gz myextension.tar.gz
63+
pip uninstall -y jupyter_ui_demo jupyterlab
64+
rm -rf myextension
6665
67-
- uses: actions/upload-artifact@v2
68-
with:
69-
name: myextension-sdist
70-
path: myextension.tar.gz
66+
- uses: actions/upload-artifact@v2
67+
with:
68+
name: myextension-sdist
69+
path: myextension.tar.gz
7170

7271
test_isolated:
7372
needs: build
7473
runs-on: ubuntu-latest
7574

7675
steps:
77-
- name: Checkout
78-
uses: actions/checkout@v2
79-
- name: Install Python
80-
uses: actions/setup-python@v2
81-
with:
82-
python-version: '3.8'
83-
architecture: 'x64'
84-
- uses: actions/download-artifact@v2
85-
with:
86-
name: myextension-sdist
87-
- name: Install and Test
88-
run: |
89-
set -eux
90-
# Remove NodeJS, twice to take care of system and locally installed node versions.
91-
sudo rm -rf $(which node)
92-
sudo rm -rf $(which node)
93-
pip install myextension.tar.gz
94-
pip install jupyterlab
95-
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*OK"
96-
python -m jupyterlab.browser_check --no-chrome-test
76+
- name: Checkout
77+
uses: actions/checkout@v2
78+
- name: Install Python
79+
uses: actions/setup-python@v2
80+
with:
81+
python-version: '3.8'
82+
architecture: 'x64'
83+
- uses: actions/download-artifact@v2
84+
with:
85+
name: myextension-sdist
86+
- name: Install and Test
87+
run: |
88+
set -eux
89+
# Remove NodeJS, twice to take care of system and locally installed node versions.
90+
sudo rm -rf $(which node)
91+
sudo rm -rf $(which node)
92+
pip install myextension.tar.gz
93+
pip install jupyterlab
94+
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*OK"
95+
python -m jupyterlab.browser_check --no-chrome-test

.github/workflows/ci.yml

Lines changed: 124 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,127 @@ name: toolkit-ci
33
on: pull_request
44

55
jobs:
6-
test:
7-
runs-on: ubuntu-latest
8-
timeout-minutes: 10
9-
steps:
10-
- name: Checkout 🛎️
11-
uses: actions/checkout@v2
12-
13-
- name: Setup Node 💾
14-
uses: actions/setup-node@v2
15-
with:
16-
node-version: '14'
17-
18-
- name: Install Dependencies 📥
19-
run: yarn install
20-
21-
- name: Run Tests 🧪
22-
run: yarn run test
23-
working-directory: packages/components
24-
25-
lint:
26-
runs-on: ubuntu-latest
27-
timeout-minutes: 10
28-
steps:
29-
- name: Checkout 🛎️
30-
uses: actions/checkout@v2
31-
32-
- name: Setup Node 💾
33-
uses: actions/setup-node@v2
34-
with:
35-
node-version: '14'
36-
37-
- name: Install Dependencies 📥
38-
run: yarn install
39-
40-
- name: Run Lint Check 🔍
41-
run: yarn run eslint:check
42-
43-
- name: Run Format Check 🌸
44-
run: yarn run prettier:check
45-
46-
build-toolkit:
47-
runs-on: ubuntu-latest
48-
timeout-minutes: 10
49-
steps:
50-
- name: Checkout 🛎️
51-
uses: actions/checkout@v2
52-
53-
- name: Setup Node 💾
54-
uses: actions/setup-node@v2
55-
with:
56-
node-version: '14'
57-
58-
- name: Install Dependencies 📥
59-
run: yarn install
60-
61-
- name: Build Toolkit 🏗
62-
run: yarn run build
63-
64-
build-docs:
65-
runs-on: ubuntu-latest
66-
timeout-minutes: 10
67-
steps:
68-
- name: Checkout 🛎️
69-
uses: actions/checkout@v2
70-
71-
- name: Setup Node 💾
72-
uses: actions/setup-node@v2
73-
with:
74-
node-version: '14'
75-
76-
- name: Install Dependencies 📥
77-
run: yarn install
78-
79-
- name: Build Docs 🏗
80-
run: yarn run build:docs
81-
working-directory: packages/components
6+
test:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 10
9+
steps:
10+
- name: Checkout 🛎️
11+
uses: actions/checkout@v2
12+
13+
- name: Setup Node 💾
14+
uses: actions/setup-node@v2
15+
with:
16+
node-version: '14'
17+
18+
- name: Get yarn cache directory path
19+
id: yarn-cache-dir-path
20+
run: echo "::set-output name=dir::$(yarn cache dir)"
21+
- name: Setup yarn cache
22+
uses: actions/cache@v2
23+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
24+
with:
25+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26+
key: yarn-${{ hashFiles('**/yarn.lock') }}
27+
restore-keys: |
28+
yarn-
29+
30+
- name: Install Dependencies 📥
31+
run: yarn install
32+
33+
- name: Run Tests 🧪
34+
run: yarn run test
35+
working-directory: packages/components
36+
37+
lint:
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 10
40+
steps:
41+
- name: Checkout 🛎️
42+
uses: actions/checkout@v2
43+
44+
- name: Setup Node 💾
45+
uses: actions/setup-node@v2
46+
with:
47+
node-version: '14'
48+
49+
- name: Get yarn cache directory path
50+
id: yarn-cache-dir-path
51+
run: echo "::set-output name=dir::$(yarn cache dir)"
52+
- name: Setup yarn cache
53+
uses: actions/cache@v2
54+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
55+
with:
56+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
57+
key: yarn-${{ hashFiles('**/yarn.lock') }}
58+
restore-keys: |
59+
yarn-
60+
61+
- name: Install Dependencies 📥
62+
run: yarn install
63+
64+
- name: Run Lint Check 🔍
65+
run: yarn run lint:check
66+
67+
- name: Run Format Check 🌸
68+
run: yarn run format:check
69+
70+
build-toolkit:
71+
runs-on: ubuntu-latest
72+
timeout-minutes: 10
73+
steps:
74+
- name: Checkout 🛎️
75+
uses: actions/checkout@v2
76+
77+
- name: Setup Node 💾
78+
uses: actions/setup-node@v2
79+
with:
80+
node-version: '14'
81+
82+
- name: Get yarn cache directory path
83+
id: yarn-cache-dir-path
84+
run: echo "::set-output name=dir::$(yarn cache dir)"
85+
- name: Setup yarn cache
86+
uses: actions/cache@v2
87+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
88+
with:
89+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
90+
key: yarn-${{ hashFiles('**/yarn.lock') }}
91+
restore-keys: |
92+
yarn-
93+
94+
- name: Install Dependencies 📥
95+
run: yarn install
96+
97+
- name: Build Toolkit 🏗
98+
run: yarn run lerna run --scope @jupyter-notebook/web-components --scope @jupyter-notebook/react-components build
99+
100+
build-docs:
101+
runs-on: ubuntu-latest
102+
timeout-minutes: 10
103+
steps:
104+
- name: Checkout 🛎️
105+
uses: actions/checkout@v2
106+
107+
- name: Setup Node 💾
108+
uses: actions/setup-node@v2
109+
with:
110+
node-version: '14'
111+
112+
- name: Get yarn cache directory path
113+
id: yarn-cache-dir-path
114+
run: echo "::set-output name=dir::$(yarn cache dir)"
115+
- name: Setup yarn cache
116+
uses: actions/cache@v2
117+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
118+
with:
119+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
120+
key: yarn-${{ hashFiles('**/yarn.lock') }}
121+
restore-keys: |
122+
yarn-
123+
124+
- name: Install Dependencies 📥
125+
run: yarn install
126+
127+
- name: Build Docs 🏗
128+
run: yarn run build:docs
129+
working-directory: packages/components

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ jupyter_ui_demo
77
build/
88
dist/
99
storybook-static/
10+
packages/components/docs/api-report.md
1011

1112
# Misc
1213
.DS_Store

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The benefit of using a code formatter like prettier is that it removes the topic
2626
code style from the conversation when reviewing pull requests, thereby
2727
speeding up the review process.
2828

29-
You may use the prettier npm script (e.g.
29+
You may use the prettier npm script (e.g.
3030
`yarn prettier`) to format the entire code base.
3131
We recommend installing a prettier extension for your code editor and
3232
configuring it to format your code with a keyboard shortcut or

0 commit comments

Comments
 (0)