Skip to content

Commit

Permalink
Merge pull request #14 from HaudinFlorence/migrate_extension
Browse files Browse the repository at this point in the history
Migrate extension
  • Loading branch information
HaudinFlorence committed Jun 12, 2023
2 parents b0b0813 + d065bee commit a7fd5cf
Show file tree
Hide file tree
Showing 32 changed files with 11,984 additions and 12,955 deletions.
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

25 changes: 4 additions & 21 deletions .github/workflows/binder-on-pr.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
# Reference https://mybinder.readthedocs.io/en/latest/howto/gh-actions-badges.html
name: Binder Badge
on:
pull_request_target:
types: [opened]

permissions:
pull-requests: write


jobs:
binder:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: comment on PR with Binder link
uses: actions/github-script@v3
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
var PR_HEAD_REF = process.env.PR_HEAD_REF;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=lab) :point_left: Launch a Binder on branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_`
})
env:
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}

github_token: ${{ secrets.github_token }}
46 changes: 31 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
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~=3.1
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check
- name: Test the extension
run: |
set -eux
Expand All @@ -36,6 +36,10 @@ jobs:
set -eux
python -m pip install .[test]
#pytest -vv -r ap --cov jupyter_theme_editor
jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyter_theme_editor.*OK"
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyter-theme-editor.*OK"
python -m jupyterlab.browser_check
Expand All @@ -49,7 +53,7 @@ jobs:
pip uninstall -y "jupyter_theme_editor" jupyterlab
- name: Upload extension packages
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: extension-artifacts
path: dist/jupyter_theme_editor*
Expand All @@ -61,13 +65,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: extension-artifacts
- name: Install and Test
Expand All @@ -77,12 +81,15 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install "jupyterlab~=3.1" jupyter_theme_editor*.whl
pip install "jupyterlab>=4.0.0,<5" jupyter_theme_editor*.whl
jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyter_theme_editor.*OK"
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyter-theme-editor.*OK"
python -m jupyterlab.browser_check --no-chrome-test
python -m jupyterlab.browser_check --no-browser-test
integration-tests:
name: Integration tests
Expand All @@ -94,20 +101,20 @@ jobs:

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

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

- name: Download extension package
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: extension-artifacts

- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab~=3.1" jupyter_theme_editor*.whl
python -m pip install "jupyterlab>=4.0.0,<5" jupyter_theme_editor*.whl
- name: Install dependencies
working-directory: ui-tests
Expand All @@ -116,7 +123,7 @@ jobs:
run: jlpm install

- name: Set up browser cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/pw-browsers
Expand All @@ -133,9 +140,18 @@ jobs:
- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: jupyter_theme_editor-playwright-tests
path: |
ui-tests/test-results
ui-tests/playwright-report
check_links:
name: Check Links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
3 changes: 2 additions & 1 deletion .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Check Release
on:
push:
Expand All @@ -20,7 +19,9 @@ jobs:
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:

token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
uses: actions/upload-artifact@v3
with:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/enforce-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Enforce PR label

on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]
jobs:
enforce-label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: enforce-triage-label
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1
11 changes: 7 additions & 4 deletions .github/workflows/update-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ permissions:
pull-requests: write

jobs:


update-snapshots:
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please update playwright snapshots') }}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -29,7 +27,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- 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: Install extension
run: |
set -eux
jlpm
Expand All @@ -41,4 +45,3 @@ jobs:
# Playwright knows how to start JupyterLab server
start_server_script: 'null'
test_folder: ui-tests

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.bundle.*
lib/
node_modules/
*.log
.eslintcache
.stylelintcache
*.egg-info/
Expand Down Expand Up @@ -119,3 +120,6 @@ dmypy.json

# OSX files
.DS_Store

# Yarn cache
.yarn/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
**/node_modules
**/lib
**/package.json
!/package.json
jupyter_theme_editor
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

12 changes: 0 additions & 12 deletions .stylelintrc

This file was deleted.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enableImmutableInstalls: false

nodeLinker: node-modules
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2022, Florence Haudin
Copyright (c) 2023, Florence Haudin
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
27 changes: 0 additions & 27 deletions MANIFEST.in

This file was deleted.

Loading

0 comments on commit a7fd5cf

Please sign in to comment.