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

Upgrade topbar extensions to JupyterLab 4 #92

Merged
merged 27 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a530d6a
Add logout extension package
mahendrapaipuri Jun 23, 2023
a4cb0c2
Add theme toggler extension package
mahendrapaipuri Jun 23, 2023
00e2e01
Ignore and remove labextension files
mahendrapaipuri Jun 23, 2023
55631b0
Add system monitor package
mahendrapaipuri Jun 23, 2023
ff187f6
Add topbar text package
mahendrapaipuri Jun 23, 2023
3f0aec9
Remove obselete files
mahendrapaipuri Jun 23, 2023
16778ba
Add linters configs
mahendrapaipuri Jun 23, 2023
345552f
Update package.json and yarn.lock
mahendrapaipuri Jun 23, 2023
7b7098a
Update gitignore files
mahendrapaipuri Jun 23, 2023
1eb8ce1
Attempt to modernise github workflows
mahendrapaipuri Jun 23, 2023
fa967b6
Update README
mahendrapaipuri Jun 23, 2023
d5a7b54
Add rootdir for eslint config
mahendrapaipuri Jun 23, 2023
5d7b830
Add .yarnrc.yml file for each package
mahendrapaipuri Jun 23, 2023
40d79e7
Update gitignore for all packages
mahendrapaipuri Jun 23, 2023
cf9e3da
Fix errors in workflow files
mahendrapaipuri Jun 23, 2023
5ed5a8e
Lint source code
mahendrapaipuri Jun 23, 2023
c3a772e
Remove system-monitor extension
mahendrapaipuri Jun 27, 2023
bb6f02f
Update gitignore files
mahendrapaipuri Jun 27, 2023
66e0f7a
Attempt to fix errors in CI
mahendrapaipuri Jun 27, 2023
2cd9251
Setup matrix vars in CI to give extension name
mahendrapaipuri Jun 28, 2023
9054780
Bump coreutils to 6.0.0
mahendrapaipuri Jul 18, 2023
46c7cdb
Attempt to fix packaging workflow
mahendrapaipuri Jul 18, 2023
9833272
Move CI and binder badges to README in root
mahendrapaipuri Jul 19, 2023
fe2bda2
Make linter happy
mahendrapaipuri Jul 19, 2023
7e41578
Address PR comments
mahendrapaipuri Jul 19, 2023
06e51fa
Remove extension suffix from package names
mahendrapaipuri Jul 20, 2023
78085e5
Remove extension suffix from names in CI tests
mahendrapaipuri Jul 20, 2023
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ dist
coverage
**/*.d.ts
tests
venv
.venv
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ module.exports = {
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfigbase.json',
project: 'tsconfig.eslint.json',
sourceType: 'module',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint'],
rules: {
Expand Down
47 changes: 28 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,44 @@ on:
branches:
- main

defaults:
run:
shell: bash -l {0}

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
extension:
- logout
- theme-toggler
- topbar-text

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v2
with:
node-version: '14.x'

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install JupyterLab
run: python -m pip install jupyterlab
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check

- name: Install the topbar extensions
- name: Build the extension
working-directory: packages/${{ matrix.extension }}-extension
run: |
set -eux
python -m pip install .
jupyter labextension list 2>&1 | grep -ie "jupyterlab-topbar-extension.*OK"

- name: Browser check
run: python -m jupyterlab.browser_check
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-${{ matrix.extension }}.*OK"

- name: Lint
run: |
jlpm
jlpm run eslint:check
python -m jupyterlab.browser_check
106 changes: 64 additions & 42 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,41 @@ defaults:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- extension: logout
name: logout
- extension: theme-toggler
name: theme_toggler
- extension: topbar-text
name: topbar_text

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
uses: actions/checkout@v3

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Package the extension
working-directory: packages/${{ matrix.extension }}-extension
run: |
python -m pip install --upgrade pip wheel
python -m pip install setuptools jupyter_packaging "jupyterlab>=3,<4"
- name: Build pypi distributions
run: |
python setup.py sdist bdist_wheel
- name: Build npm distributions
run: |
jlpm lerna exec -- npm pack
cp packages/*/*.tgz dist
- name: Build checksum file
run: |
cd dist
sha256sum * | tee SHA256SUMS
- name: Upload distributions
uses: actions/upload-artifact@v2
set -eux
pip install build
python -m build
pip uninstall -y "jupyterlab_${{ matrix.name }}" jupyterlab

- name: Upload extension packages
uses: actions/upload-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist
name: extension-artifacts
path: packages/${{ matrix.extension }}-extension/dist/jupyterlab_${{ matrix.name }}*
if-no-files-found: error

install:
runs-on: ${{ matrix.os }}-latest
Expand All @@ -56,41 +59,60 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: ['3.6', '3.9']
python: ['3.8', '3.11']
include:
- python: '3.6'
dist: 'jupyterlab-topbar*.tar.gz'
- python: '3.9'
dist: 'jupyterlab_topbar*.whl'
- python: '3.8'
extension: logout
dist: 'jupyterlab_logout*.tar.gz'
- python: '3.11'
extension: logout
dist: 'jupyterlab_logout*.whl'
- python: '3.8'
extension: theme-toggler
dist: 'jupyterlab_theme_toggler*.tar.gz'
- python: '3.11'
extension: theme-toggler
dist: 'jupyterlab_theme_toggler*.whl'
- python: '3.8'
extension: topbar-text
dist: 'jupyterlab_topbar_text*.tar.gz'
- python: '3.11'
extension: topbar-text
dist: 'jupyterlab_topbar_text*.whl'
- os: windows
py_cmd: python
- os: macos
py_cmd: python3
- os: ubuntu
py_cmd: python

steps:
- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: 'x64'
- uses: actions/download-artifact@v2

- uses: actions/download-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist
- name: Install the prerequisites
name: extension-artifacts
path: packages/${{ matrix.extension }}-extension/dist

- name: Install prerequisites
run: |
${{ matrix.py_cmd }} -m pip install pip wheel
- name: Install the package

- name: Install package
run: |
cd dist
cd packages/${{ matrix.extension }}-extension/dist
${{ matrix.py_cmd }} -m pip install -vv ${{ matrix.dist }}

- name: Validate environment
run: |
${{ matrix.py_cmd }} -m pip freeze
${{ matrix.py_cmd }} -m pip check
- name: Validate the install

- name: Validate install
run: |
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-topbar.*enabled.*ok" -

jupyter labextension list 2>&1 | grep -ie "jupyterlab-${{ matrix.extension }}.*OK"
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
*.bundle.*
lib/
node_modules/
*.log
.eslintcache
.stylelintcache
*.egg-info/
.ipynb_checkpoints
tsconfig.tsbuildinfo
jupyterlab-topbar/labextension
*.tsbuildinfo

# Yarn cache
.yarn/

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python
Expand Down
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
**/venv
**/.venv
14 changes: 14 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": [
"stylelint-config-recommended",
"stylelint-config-standard",
"stylelint-prettier/recommended"
],
"rules": {
"no-empty-source": null,
"selector-class-pattern": null,
"property-no-vendor-prefix": null,
"selector-no-vendor-prefix": null,
"value-no-vendor-prefix": null
}
}
2 changes: 0 additions & 2 deletions .yarnrc

This file was deleted.

2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enableImmutableInstalls: false
nodeLinker: node-modules
24 changes: 0 additions & 24 deletions MANIFEST.in

This file was deleted.

Loading