Skip to content

Commit 9e0fb9f

Browse files
committed
ran copier migration script
1 parent 7221bd4 commit 9e0fb9f

25 files changed

+675
-350
lines changed

.copier-answers.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: v4.3.8
3+
_src_path: https://github.com/jupyterlab/extension-template
4+
author_email: ''
5+
author_name: QuantStack
6+
has_binder: true
7+
has_settings: false
8+
kind: server
9+
labextension_name: jupyterlab-snippets
10+
project_short_description: Snippets Extension for JupyterLab
11+
python_name: jupyterlab_snippets
12+
repository: https://github.com/QuantStack/jupyterlab-snippets.git
13+
test: false
14+

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/binder-on-pr.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Binder Badge
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
6+
jobs:
7+
binder:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
13+
with:
14+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build.yml

Lines changed: 73 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,97 @@ name: Build
22

33
on:
44
push:
5-
branches: master
5+
branches: main
66
pull_request:
77
branches: '*'
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
build:
1115
runs-on: ubuntu-latest
16+
1217
steps:
1318
- name: Checkout
14-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
20+
21+
- name: Base Setup
22+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23+
24+
- name: Install dependencies
25+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
26+
27+
- name: Lint the extension
28+
run: |
29+
set -eux
30+
jlpm
31+
jlpm run lint:check
32+
33+
- name: Build the extension
34+
run: |
35+
set -eux
36+
python -m pip install .[test]
37+
38+
jupyter server extension list
39+
jupyter server extension list 2>&1 | grep -ie "jupyterlab_snippets.*OK"
40+
41+
jupyter labextension list
42+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-snippets.*OK"
43+
python -m jupyterlab.browser_check
44+
45+
- name: Package the extension
46+
run: |
47+
set -eux
48+
49+
pip install build
50+
python -m build
51+
pip uninstall -y "jupyterlab_snippets" jupyterlab
1552
16-
- name: Install node
17-
uses: actions/setup-node@v1
53+
- name: Upload extension packages
54+
uses: actions/upload-artifact@v4
1855
with:
19-
node-version: '14.x'
56+
name: extension-artifacts
57+
path: dist/jupyterlab_snippets*
58+
if-no-files-found: error
2059

60+
test_isolated:
61+
needs: build
62+
runs-on: ubuntu-latest
63+
64+
steps:
2165
- name: Install Python
22-
uses: actions/setup-python@v2
66+
uses: actions/setup-python@v5
2367
with:
2468
python-version: '3.9'
2569
architecture: 'x64'
26-
27-
- name: Setup pip cache
28-
uses: actions/cache@v2
70+
- uses: actions/download-artifact@v4
2971
with:
30-
path: ~/.cache/pip
31-
key: pip-3.7-${{ hashFiles('package.json') }}
32-
restore-keys: |
33-
pip-3.7-
34-
pip-
35-
36-
- name: Get yarn cache directory path
37-
id: yarn-cache-dir-path
38-
run: echo "::set-output name=dir::$(yarn cache dir)"
39-
40-
- name: Setup yarn cache
41-
uses: actions/cache@v2
42-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
43-
with:
44-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
45-
key: yarn-${{ hashFiles('**/yarn.lock') }}
46-
restore-keys: |
47-
yarn-
48-
49-
- name: Install dependencies
50-
run: python -m pip install -U jupyterlab~=3.0 jupyter-packaging~=0.10
51-
52-
- name: Build the extension
72+
name: extension-artifacts
73+
- name: Install and Test
5374
run: |
54-
jlpm
55-
jlpm run eslint:check
56-
python -m pip install .
75+
set -eux
76+
# Remove NodeJS, twice to take care of system and locally installed node versions.
77+
sudo rm -rf $(which node)
78+
sudo rm -rf $(which node)
79+
80+
pip install "jupyterlab>=4.0.0,<5" jupyterlab_snippets*.whl
5781
82+
83+
jupyter server extension list
5884
jupyter server extension list 2>&1 | grep -ie "jupyterlab_snippets.*OK"
85+
86+
jupyter labextension list
5987
jupyter labextension list 2>&1 | grep -ie "jupyterlab-snippets.*OK"
88+
python -m jupyterlab.browser_check --no-browser-test
6089
61-
python -m jupyterlab.browser_check
90+
91+
check_links:
92+
name: Check Links
93+
runs-on: ubuntu-latest
94+
timeout-minutes: 15
95+
steps:
96+
- uses: actions/checkout@v4
97+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
98+
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

.github/workflows/check-release.yml

Lines changed: 13 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,30 @@
11
name: Check Release
22
on:
33
push:
4-
branches:
5-
- main
4+
branches: ["main"]
65
pull_request:
7-
branches:
8-
- main
6+
branches: ["*"]
97

10-
permissions:
11-
contents: write
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
1211

1312
jobs:
1413
check_release:
1514
runs-on: ubuntu-latest
1615
steps:
1716
- name: Checkout
18-
uses: actions/checkout@v2
19-
20-
- name: Install Python
21-
uses: actions/setup-python@v2
22-
with:
23-
python-version: 3.9
24-
architecture: 'x64'
25-
26-
- name: Install node
27-
uses: actions/setup-node@v2
28-
with:
29-
node-version: '14.x'
30-
31-
- name: Get pip cache dir
32-
id: pip-cache
33-
run: |
34-
echo "::set-output name=dir::$(pip cache dir)"
35-
36-
- name: Cache pip
37-
uses: actions/cache@v1
38-
with:
39-
path: ${{ steps.pip-cache.outputs.dir }}
40-
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
41-
restore-keys: |
42-
${{ runner.os }}-pip-
43-
44-
- name: Cache checked links
45-
uses: actions/cache@v2
46-
with:
47-
path: ~/.cache/pytest-link-check
48-
key: ${{ runner.os }}-linkcheck-${{ hashFiles('**/.md') }}-md-links
49-
restore-keys: |
50-
${{ runner.os }}-linkcheck-
51-
52-
- name: Upgrade packaging dependencies
53-
run: |
54-
pip install --upgrade pip setuptools wheel jupyter-packaging~=0.10 --user
55-
56-
- name: Install Dependencies
57-
run: |
58-
pip install .
59-
17+
uses: actions/checkout@v4
18+
- name: Base Setup
19+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
6020
- name: Check Release
61-
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
21+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
6222
with:
23+
6324
token: ${{ secrets.GITHUB_TOKEN }}
6425

6526
- name: Upload Distributions
66-
uses: actions/upload-artifact@v2
27+
uses: actions/upload-artifact@v4
6728
with:
68-
name: jupyterlab-snippets-releaser-dist-${{ github.run_number }}
69-
path: .jupyter_releaser_checkout/dist
29+
name: jupyterlab_snippets-releaser-dist-${{ github.run_number }}
30+
path: .jupyter_releaser_checkout/dist

.github/workflows/enforce-label.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Enforce PR label
2+
3+
on:
4+
pull_request:
5+
types: [labeled, unlabeled, opened, edited, synchronize]
6+
jobs:
7+
enforce-label:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- name: enforce-triage-label
13+
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1

.github/workflows/prep-release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "Step 1: Prep Release"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version_spec:
6+
description: "New Version Specifier"
7+
default: "next"
8+
required: false
9+
branch:
10+
description: "The branch to target"
11+
required: false
12+
post_version_spec:
13+
description: "Post Version Specifier"
14+
required: false
15+
# silent:
16+
# description: "Set a placeholder in the changelog and don't publish the release."
17+
# required: false
18+
# type: boolean
19+
since:
20+
description: "Use PRs with activity since this date or git reference"
21+
required: false
22+
since_last_stable:
23+
description: "Use PRs with activity since the last stable git tag"
24+
required: false
25+
type: boolean
26+
jobs:
27+
prep_release:
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: write
31+
steps:
32+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
33+
34+
- name: Prep Release
35+
id: prep-release
36+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
version_spec: ${{ github.event.inputs.version_spec }}
40+
# silent: ${{ github.event.inputs.silent }}
41+
post_version_spec: ${{ github.event.inputs.post_version_spec }}
42+
branch: ${{ github.event.inputs.branch }}
43+
since: ${{ github.event.inputs.since }}
44+
since_last_stable: ${{ github.event.inputs.since_last_stable }}
45+
46+
- name: "** Next Step **"
47+
run: |
48+
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"

0 commit comments

Comments
 (0)