Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for JupyterLab 3, Router, Settings, etc. #14

Merged
merged 63 commits into from
Jan 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
abcf483
add url hack, reorg components, start hoisting meet, add manager
bollwyvl Jul 9, 2020
1f71b10
resolve yarn.lock
bollwyvl Jul 19, 2020
62479d0
actually emit meet when changed
bollwyvl Jul 19, 2020
9bd65aa
more work on typings
bollwyvl Jul 19, 2020
95a99cd
get rid of vendored api script
bollwyvl Jan 15, 2021
60610a3
use jitsi domain from config
bollwyvl Jan 15, 2021
7972cb8
tweak router
bollwyvl Jan 15, 2021
2a3bb50
resolve yarn
bollwyvl Jan 15, 2021
f3d88a8
hoist more namespaces, etc
bollwyvl Jan 16, 2021
f4e3972
use more real estate on main area view
bollwyvl Jan 16, 2021
ff1ea12
split ci into build, dist
bollwyvl Jan 16, 2021
d6c7144
upgrade linters, etc
bollwyvl Jan 16, 2021
2bade7b
more ci work
bollwyvl Jan 16, 2021
225cf97
install lab for jlpm
bollwyvl Jan 16, 2021
2da51a5
more work on build
bollwyvl Jan 16, 2021
c946444
fix pip dep
bollwyvl Jan 16, 2021
05e7fcb
fix whl path
bollwyvl Jan 16, 2021
151bc69
back to findlinks
bollwyvl Jan 16, 2021
f02da81
add reqs file for ci hashing
bollwyvl Jan 16, 2021
eb45faf
fix reqs path
bollwyvl Jan 16, 2021
b77f4c8
try other name
bollwyvl Jan 16, 2021
5b55ae1
try more pip things
bollwyvl Jan 16, 2021
f461a5c
try more explicit relative path
bollwyvl Jan 16, 2021
f0e7ad7
try more verbose install
bollwyvl Jan 16, 2021
b4bcdc9
don't rely on globs, import smoke test
bollwyvl Jan 16, 2021
e6d78d7
try ls
bollwyvl Jan 16, 2021
ee0a8f8
use ls
bollwyvl Jan 16, 2021
ca0e182
upload correct path
bollwyvl Jan 16, 2021
3ec8fa1
try installing both dists
bollwyvl Jan 16, 2021
7efe454
fix workflow
bollwyvl Jan 16, 2021
b77c4eb
try adding data_files
bollwyvl Jan 16, 2021
199b30f
try fixing labextension tarball path
bollwyvl Jan 16, 2021
7f10de4
explore more deps, bump cache epoch
bollwyvl Jan 16, 2021
a085de9
try caching built lab
bollwyvl Jan 16, 2021
bfc018f
more app dir, cache keys
bollwyvl Jan 16, 2021
714b62c
try pip3
bollwyvl Jan 16, 2021
ca48e8b
more pip3
bollwyvl Jan 16, 2021
5cabebd
more pip3
bollwyvl Jan 17, 2021
ab6d48e
try python3
bollwyvl Jan 17, 2021
f159765
parametrize the python command
bollwyvl Jan 17, 2021
c2ebf61
use case-insensitive comparison
bollwyvl Jan 17, 2021
6093ebe
some os-specific pip cache locations
bollwyvl Jan 17, 2021
94c66a6
give up on browser check
bollwyvl Jan 17, 2021
4d32631
more ci tweaks
bollwyvl Jan 17, 2021
4854680
get rid of build env file, hoist lab version to hash keys
bollwyvl Jan 17, 2021
4a136cd
normalize cache names
bollwyvl Jan 17, 2021
2b0f520
normalize lab pins, bump cache epoch
bollwyvl Jan 17, 2021
cb8d349
Merge pull request #1 from bollwyvl/add-url-router
bollwyvl Jan 17, 2021
73b864e
Add settings (#2)
bollwyvl Jan 18, 2021
c8d12f9
update for jupyterlab 3 (#3)
bollwyvl Jan 18, 2021
982daae
some binder tweaks (#4)
bollwyvl Jan 18, 2021
12019cf
more docs, hoist API info to types
bollwyvl Jan 18, 2021
6850401
improve build checks and warnings
bollwyvl Jan 18, 2021
d9766cf
jlpm clean also cleans webpacked extension
bollwyvl Jan 18, 2021
e706444
pretty icon for launcher, improve disconnect button
bollwyvl Jan 18, 2021
5d7d784
hide more banners, hoist defaults to config
bollwyvl Jan 18, 2021
a84904b
linting, move prettier config to package.json
bollwyvl Jan 18, 2021
ee8bd12
more docs
bollwyvl Jan 18, 2021
c664f23
more docs and types
bollwyvl Jan 18, 2021
3e95461
fix up schema some more
bollwyvl Jan 18, 2021
8b5ed75
more work on hiding public rooms by default
bollwyvl Jan 18, 2021
8b5774f
watch the room subject for widget title
bollwyvl Jan 18, 2021
acf9ee5
add initialized promise
bollwyvl Jan 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 19 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,40 @@ module.exports = {
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:react/recommended',
'plugin:react/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json'
},
globals: {
"JSX": "readonly"
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
'@typescript-eslint/interface-name-prefix': [
'@typescript-eslint/naming-convention': [
'error',
{ prefixWithI: 'always' }
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true
}
}
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-ts-ignore': 'warn',
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/triple-slash-reference': 'warn',
Expand All @@ -42,7 +55,8 @@ module.exports = {
'no-undef': 'warn',
'no-case-declarations': 'warn',
'no-useless-escape': 'off',
'prefer-const': 'off'
'prefer-const': 'off',
'react/prop-types': 'warn'
},
settings: {
react: {
Expand Down
75 changes: 0 additions & 75 deletions .github/workflows/build.yml

This file was deleted.

186 changes: 186 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
name: CI

on:
push:
branches: master
pull_request:
branches: '*'

env:
CACHE_EPOCH: 4
APP_DIR: --app-dir ./.lab

jobs:
build:
name: build
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: ["ubuntu"]
python-version: ["3.9"]
node-version: ["14.x"]
lab-version: ["3"]
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Select Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Select Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'

- name: Cache (Python)
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-build-${{ hashFiles('setup.py') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-build-

- name: Install Python packaging dependencies
run: pip3 install -U --user pip wheel setuptools

- name: Install Python dev dependencies
run: pip3 install "jupyterlab==${{ matrix.lab-version }}.*"

- name: Validate Python Environment
run: |
set -eux
pip3 freeze | tee .pip-frozen
pip3 check

- name: Cache (JS)
uses: actions/cache@v2
with:
path: '**/node_modules'
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.node-version }}-${{ matrix.lab-version }}-node-build-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.node-version }}-${{ matrix.lab-version }}-node-build-

- name: Install JS dependencies
run: jlpm --ignore-optional --frozen-lockfile

- name: Lint Lab Extension, etc.
run: jlpm run lint:check

- name: Build npm tarball
run: |
set -eux
mkdir dist
jlpm build
mv $(npm pack) dist

- name: Build Python distributions
run: python3 setup.py sdist bdist_wheel

- name: Generate distribution hashes
run: |
set -eux
cd dist
sha256sum * | tee SHA256SUMS

- name: Upload distributions
uses: actions/upload-artifact@v2
with:
name: jupyter-videochat ${{ github.run_number }} dist
path: ./dist

test:
needs: [build]
name: test ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
# fail-fast: false
matrix:
python-version: ["3.6", "3.9"]
os: ["ubuntu", "windows", "macos"]
lab-version: ["3"]
include:
# use python as marker for node/distribution test coverage
- python-version: "3.6"
artifact-glob: "*.tar.gz"
- python-version: "3.9"
artifact-glob: "*.whl"
# os-specific settings
- os: windows
python-cmd: python
pip-cache: ~\AppData\Local\pip\Cache
- os: ubuntu
python-cmd: python3
pip-cache: ~/.cache/pip
- os: macos
python-cmd: python3
pip-cache: ~/Library/Caches/pip

defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Select Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'

- name: Cache (Python)
uses: actions/cache@v2
with:
path: ${{ matrix.pip-cache }}
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-test-${{ hashFiles('setup.py') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-test-

- name: Install Python packaging dependencies
run: |
set -eux
pip3 install -U --user pip wheel setuptools

- name: Download distributions
uses: actions/download-artifact@v2
with:
name: jupyter-videochat ${{ github.run_number }} dist
path: ./dist

- name: Install Python distribution
run: |
set -eux
cd dist
pip3 install -v ${{ matrix.artifact-glob }}

- name: Validate Python environment
run:
set -eux
pip3 freeze | tee .pip-frozen
pip3 check

- name: Import smoke test
run: |
set -eux
cd dist
${{ matrix.python-cmd }} -c "import jupyter_videochat; print(jupyter_videochat.__version__)"

- name: Validate Server Extension
run: |
set -eux
jupyter server extension list 1>serverextensions 2>&1
cat serverextensions
cat serverextensions | grep -i "jupyter_videochat.*OK"

- name: Validate Lab Extension
run: |
set -eux
jupyter labextension list $APP_DIR 1>labextensions 2>&1
cat labextensions
cat labextensions | grep -i "jupyterlab-videochat.*OK"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,9 @@ dmypy.json
.pyre/

# End of https://www.gitignore.io/api/python

# built npm tarballs
*.tgz

# built labextension
jupyter_videochat/labextension
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules
**/node_modules
**/lib
**/package.json
**/build
**/dist
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.