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 jupyter_theme_editor for jupyterlab 4 using the migration script. #13

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 19 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.0.5
_src_path: https://github.com/jupyterlab/extension-template
author_email: haudin.florence@gmail.com
author_name: Florence Haudin
data_format: string
file_extension: ''
has_binder: true
has_settings: true
kind: server
labextension_name: jupyter-theme-editor
mimetype: ''
mimetype_name: ''
project_short_description: Extension to create a theme
python_name: jupyter_theme_editor
repository: https://github.com/jupyterlab-contrib/jupyterlab-theme-editor.git
test: true
viewer_name: ''

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 }}
54 changes: 35 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,34 @@ 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
jlpm run test

#- name: Test the extension
#run: |
#set -eux
#jlpm run test

- name: Build the extension
run: |
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
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
53 changes: 0 additions & 53 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,4 @@

<!-- <START NEW CHANGELOG ENTRY> -->

## 0.3.0

([Full Changelog](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/compare/v0.2.1...d18e1d4b15caefb361ce57107b55a3ab4aa8c7fc))

### Merged PRs

- Update the style of the react json schema form. [#11](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/pull/11) ([@HaudinFlorence](https://github.com/HaudinFlorence))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/graphs/contributors?from=2023-03-21&to=2023-03-23&type=c))

[@HaudinFlorence](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-theme-editor+involves%3AHaudinFlorence+updated%3A2023-03-21..2023-03-23&type=Issues)

<!-- <END NEW CHANGELOG ENTRY> -->

## 0.2.1

([Full Changelog](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/compare/v0.2.0...c7140a1b4df0a6c2ba493a2787addc187bfa4c25))

### Merged PRs

- Update parameters [#10](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/pull/10) ([@HaudinFlorence](https://github.com/HaudinFlorence))
- Use the settings editor to store the theme editor parameters [#6](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/pull/6) ([@HaudinFlorence](https://github.com/HaudinFlorence))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/graphs/contributors?from=2023-03-09&to=2023-03-21&type=c))

[@github-actions](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-theme-editor+involves%3Agithub-actions+updated%3A2023-03-09..2023-03-21&type=Issues) | [@HaudinFlorence](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-theme-editor+involves%3AHaudinFlorence+updated%3A2023-03-09..2023-03-21&type=Issues)

## 0.2.0

([Full Changelog](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/compare/f3f699d9e0b38ceed7d7203a7f0d74aa13948f91...accf396092a3be78d2014af377adbfb0cab7d197))

### Enhancements made

- Create theme exporter [#7](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/pull/7) ([@HaudinFlorence](https://github.com/HaudinFlorence))
- Create a theme-editor [#1](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/pull/1) ([@fcollonval](https://github.com/fcollonval))

### Documentation improvements

- Update URLs [#2](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/pull/2) ([@fcollonval](https://github.com/fcollonval))

### Other merged PRs

- Add releaser workflows [#9](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/pull/9) ([@fcollonval](https://github.com/fcollonval))
- Add status badge [#8](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/pull/8) ([@fcollonval](https://github.com/fcollonval))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterlab-contrib/jupyterlab-theme-editor/graphs/contributors?from=2022-09-22&to=2023-03-09&type=c))

[@fcollonval](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-theme-editor+involves%3Afcollonval+updated%3A2022-09-22..2023-03-09&type=Issues) | [@github-actions](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-theme-editor+involves%3Agithub-actions+updated%3A2022-09-22..2023-03-09&type=Issues) | [@HaudinFlorence](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-theme-editor+involves%3AHaudinFlorence+updated%3A2022-09-22..2023-03-09&type=Issues)
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
Loading