Skip to content

Commit 1dd7dcd

Browse files
authored
Merge develop into master for 0.6.0 (#62)
1 parent 88a68bd commit 1dd7dcd

Some content is hidden

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

44 files changed

+5561
-2184
lines changed

.eslintrc.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ module.exports = {
33
browser: true,
44
es6: true,
55
commonjs: true,
6-
node: true
6+
node: true,
77
},
88
root: true,
99
extends: [
1010
'eslint:recommended',
1111
'plugin:@typescript-eslint/eslint-recommended',
1212
'plugin:@typescript-eslint/recommended',
1313
'prettier/@typescript-eslint',
14-
'plugin:react/recommended'
14+
'plugin:react/recommended',
1515
],
1616
parser: '@typescript-eslint/parser',
1717
parserOptions: {
18-
project: 'tsconfig.json'
18+
project: 'tsconfig.json',
1919
},
2020
globals: {
21-
"JSX": "readonly"
21+
JSX: 'readonly',
2222
},
2323
plugins: ['@typescript-eslint'],
2424
rules: {
@@ -30,9 +30,9 @@ module.exports = {
3030
format: ['PascalCase'],
3131
custom: {
3232
regex: '^I[A-Z]',
33-
match: true
34-
}
35-
}
33+
match: true,
34+
},
35+
},
3636
],
3737
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
3838
'@typescript-eslint/no-use-before-define': 'off',
@@ -56,11 +56,11 @@ module.exports = {
5656
'no-case-declarations': 'warn',
5757
'no-useless-escape': 'off',
5858
'prefer-const': 'off',
59-
'react/prop-types': 'warn'
59+
'react/prop-types': 'warn',
6060
},
6161
settings: {
6262
react: {
63-
version: 'detect'
64-
}
65-
}
63+
version: 'detect',
64+
},
65+
},
6666
};

.github/workflows/ci.yml

Lines changed: 178 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: master
5+
branches:
6+
- master
7+
- develop
68
pull_request:
79
branches: '*'
810

@@ -15,31 +17,31 @@ jobs:
1517
runs-on: ${{ matrix.os }}-latest
1618
strategy:
1719
matrix:
18-
os: ["ubuntu"]
19-
python-version: ["3.9"]
20-
node-version: ["14.x"]
21-
lab-version: ["3"]
20+
os: ['ubuntu']
21+
python-version: ['3.10']
22+
node-version: ['16.x']
23+
lab-version: ['3.3']
2224
steps:
2325
- name: Checkout
24-
uses: actions/checkout@v1
26+
uses: actions/checkout@v3
2527

2628
- name: Select Node ${{ matrix.node-version }}
27-
uses: actions/setup-node@v1
29+
uses: actions/setup-node@v2
2830
with:
2931
node-version: ${{ matrix.node-version }}
3032

3133
- name: Select Python ${{ matrix.python-version }}
32-
uses: actions/setup-python@v1
34+
uses: actions/setup-python@v3
3335
with:
3436
python-version: ${{ matrix.python-version }}
3537
architecture: 'x64'
3638

3739
- name: Cache (Python)
38-
uses: actions/cache@v2
40+
uses: actions/cache@v3
3941
with:
4042
path: ~/.cache/pip
4143
key: |
42-
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-build-${{ hashFiles('setup.py') }}
44+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-build-${{ hashFiles('setup.py', 'setup.cfg') }}
4345
restore-keys: |
4446
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-build-
4547
@@ -56,7 +58,7 @@ jobs:
5658
pip3 check
5759
5860
- name: Cache (JS)
59-
uses: actions/cache@v2
61+
uses: actions/cache@v3
6062
with:
6163
path: '**/node_modules'
6264
key: |
@@ -67,9 +69,6 @@ jobs:
6769
- name: Install JS dependencies
6870
run: jlpm --ignore-optional --frozen-lockfile
6971

70-
- name: Lint Lab Extension, etc.
71-
run: jlpm run lint:check
72-
7372
- name: Build npm tarball
7473
run: |
7574
set -eux
@@ -87,27 +86,105 @@ jobs:
8786
sha256sum * | tee SHA256SUMS
8887
8988
- name: Upload distributions
90-
uses: actions/upload-artifact@v2
89+
uses: actions/upload-artifact@v3
9190
with:
9291
name: jupyter-videochat ${{ github.run_number }} dist
9392
path: ./dist
9493

94+
- name: Upload labextension
95+
uses: actions/upload-artifact@v3
96+
with:
97+
name: jupyter-videochat ${{ github.run_number }} labextension
98+
path: ./jupyter_videochat/labextension
99+
100+
lint:
101+
needs: [build]
102+
name: lint
103+
runs-on: ${{ matrix.os }}-latest
104+
strategy:
105+
matrix:
106+
os: ['ubuntu']
107+
python-version: ['3.10']
108+
node-version: ['16.x']
109+
lab-version: ['3.3']
110+
steps:
111+
- name: Checkout
112+
uses: actions/checkout@v3
113+
114+
- name: Select Node ${{ matrix.node-version }}
115+
uses: actions/setup-node@v2
116+
with:
117+
node-version: ${{ matrix.node-version }}
118+
119+
- name: Select Python ${{ matrix.python-version }}
120+
uses: actions/setup-python@v3
121+
with:
122+
python-version: ${{ matrix.python-version }}
123+
architecture: 'x64'
124+
125+
- name: Cache (Python)
126+
uses: actions/cache@v3
127+
with:
128+
path: ~/.cache/pip
129+
key: |
130+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-lint-${{ hashFiles('setup.cfg') }}
131+
restore-keys: |
132+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-lint-
133+
134+
- name: Install Python packaging dependencies
135+
run: pip3 install -U --user pip wheel setuptools
136+
137+
- name: Install Python dev dependencies
138+
run: pip3 install "jupyterlab==${{ matrix.lab-version }}.*"
139+
140+
- name: Cache (JS)
141+
uses: actions/cache@v3
142+
with:
143+
path: '**/node_modules'
144+
key: |
145+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.node-version }}-${{ matrix.lab-version }}-node-build-${{ hashFiles('yarn.lock') }}
146+
restore-keys: |
147+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.node-version }}-${{ matrix.lab-version }}-node-build-
148+
149+
- name: Install JS dependencies
150+
run: jlpm --ignore-optional --frozen-lockfile
151+
152+
- name: Download built labextension
153+
uses: actions/download-artifact@v3
154+
with:
155+
name: jupyter-videochat ${{ github.run_number }} labextension
156+
path: ./jupyter_videochat/labextension
157+
158+
- name: Python Dev Install
159+
run: |
160+
set -eux
161+
pip3 install -e .[lint]
162+
163+
- name: Lint Lab Extension, etc.
164+
run: jlpm run lint:check
165+
166+
- name: Lint Python
167+
run: |-
168+
isort --check setup.py docs jupyter_videochat
169+
black --check setup.py docs jupyter_videochat
170+
95171
test:
96172
needs: [build]
97173
name: test ${{ matrix.os }} py${{ matrix.python-version }}
98174
runs-on: ${{ matrix.os }}-latest
99175
strategy:
100176
# fail-fast: false
101177
matrix:
102-
python-version: ["3.6", "3.9"]
103-
os: ["ubuntu", "windows", "macos"]
104-
lab-version: ["3"]
178+
python-version: ['3.7', '3.10']
179+
os: ['ubuntu', 'windows', 'macos']
105180
include:
106181
# use python as marker for node/distribution test coverage
107-
- python-version: "3.6"
108-
artifact-glob: "*.tar.gz"
109-
- python-version: "3.9"
110-
artifact-glob: "*.whl"
182+
- python-version: '3.7'
183+
artifact-glob: '*.tar.gz'
184+
lab-version: '3.0'
185+
- python-version: '3.10'
186+
artifact-glob: '*.whl'
187+
lab-version: '3.3'
111188
# os-specific settings
112189
- os: windows
113190
python-cmd: python
@@ -123,70 +200,82 @@ jobs:
123200
run:
124201
shell: bash -l {0}
125202
steps:
126-
- name: Checkout
127-
uses: actions/checkout@v1
128-
129-
- name: Select Python ${{ matrix.python-version }}
130-
uses: actions/setup-python@v1
131-
with:
132-
python-version: ${{ matrix.python-version }}
133-
architecture: 'x64'
134-
135-
- name: Cache (Python)
136-
uses: actions/cache@v2
137-
with:
138-
path: ${{ matrix.pip-cache }}
139-
key: |
140-
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-test-${{ hashFiles('setup.py') }}
141-
restore-keys: |
142-
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-test-
143-
144-
- name: Install Python packaging dependencies
145-
run: |
146-
set -eux
147-
pip3 install -U --user pip wheel setuptools
148-
149-
- name: Download distributions
150-
uses: actions/download-artifact@v2
151-
with:
152-
name: jupyter-videochat ${{ github.run_number }} dist
153-
path: ./dist
154-
155-
- name: Install Python distribution
156-
run: |
157-
set -eux
158-
cd dist
159-
pip3 install -v ${{ matrix.artifact-glob }}
160-
161-
- name: Validate Python environment
162-
run:
163-
set -eux
164-
pip3 freeze | tee .pip-frozen
165-
pip3 check
166-
167-
- name: Import smoke test
168-
run: |
169-
set -eux
170-
cd dist
171-
${{ matrix.python-cmd }} -c "import jupyter_videochat; print(jupyter_videochat.__version__)"
172-
173-
- name: Validate Server Extension (server)
174-
run: |
175-
set -eux
176-
jupyter server extension list --debug 1>serverextensions 2>&1
177-
cat serverextensions
178-
cat serverextensions | grep -i "jupyter_videochat.*OK"
179-
180-
- name: Validate Server Extension (notebook)
181-
run: |
182-
set -eux
183-
jupyter serverextension list --debug 1>server_extensions 2>&1
184-
cat server_extensions
185-
cat server_extensions | grep -i "jupyter_videochat.*OK"
186-
187-
- name: Validate Lab Extension
188-
run: |
189-
set -eux
190-
jupyter labextension list --debug 1>labextensions 2>&1
191-
cat labextensions
192-
cat labextensions | grep -i "jupyterlab-videochat.*OK"
203+
- name: Checkout
204+
uses: actions/checkout@v3
205+
206+
- name: Select Python ${{ matrix.python-version }}
207+
uses: actions/setup-python@v3
208+
with:
209+
python-version: ${{ matrix.python-version }}
210+
architecture: 'x64'
211+
212+
- name: Cache (Python)
213+
uses: actions/cache@v3
214+
with:
215+
path: ${{ matrix.pip-cache }}
216+
key: |
217+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-test-${{ hashFiles('setup.py', 'setup.cfg') }}
218+
restore-keys: |
219+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-test-
220+
221+
- name: Install Python packaging dependencies
222+
run: |
223+
set -eux
224+
pip3 install -U --user pip wheel setuptools
225+
226+
- name: Download distributions
227+
uses: actions/download-artifact@v3
228+
with:
229+
name: jupyter-videochat ${{ github.run_number }} dist
230+
path: ./dist
231+
232+
- name: Install Python distribution
233+
run: |
234+
set -eux
235+
cd dist
236+
pip3 install -v ${{ matrix.artifact-glob }} "jupyterlab==${{ matrix.lab-version }}.*" notebook
237+
238+
- name: Validate Python environment
239+
run: set -eux pip3 freeze | tee .pip-frozen pip3 check
240+
241+
- name: Import smoke test
242+
run: |
243+
set -eux
244+
cd dist
245+
${{ matrix.python-cmd }} -c "import jupyter_videochat; print(jupyter_videochat.__version__)"
246+
247+
- name: Validate Server Extension (server)
248+
run: |
249+
set -eux
250+
jupyter server extension list --debug 1>serverextensions 2>&1
251+
cat serverextensions
252+
cat serverextensions | grep -i "jupyter_videochat.*OK"
253+
254+
- name: Validate Server Extension (notebook)
255+
run: |
256+
set -eux
257+
jupyter serverextension list --debug 1>server_extensions 2>&1
258+
cat server_extensions
259+
cat server_extensions | grep -i "jupyter_videochat.*OK"
260+
261+
- name: Validate Lab Extension
262+
run: |
263+
set -eux
264+
jupyter labextension list --debug 1>labextensions 2>&1
265+
cat labextensions
266+
cat labextensions | grep -i "jupyterlab-videochat.*OK"
267+
268+
- name: Install (docs)
269+
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu'
270+
run: pip install -r docs/requirements.txt
271+
272+
- name: Build (docs)
273+
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu'
274+
env:
275+
DOCS_IN_CI: 1
276+
run: sphinx-build -W -b html docs docs/_build
277+
278+
- name: Check (links)
279+
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu'
280+
run: |
281+
pytest-check-links docs/_build -p no:warnings --links-ext=html --check-anchors --check-links-ignore "^https?://"

0 commit comments

Comments
 (0)