Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Nov 20, 2024
1 parent d3809b2 commit bf6089f
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 114 deletions.
104 changes: 52 additions & 52 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,72 +15,72 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- 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 dependencies
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check
- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check
- name: Build the extension
run: |
set -eux
python -m pip install .[test]
- name: Build the extension
run: |
set -eux
jlpm dev
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyter-suggestions.*OK"
python -m jupyterlab.browser_check
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyter-suggestions.*OK"
python -m jupyterlab.browser_check
- name: Package the extension
run: |
set -eux
- name: Package the extension
run: |
set -eux
pip install build
python -m build
pip uninstall -y "jupyterlab_suggestions" jupyterlab
pip install hatch
yarn build:packages
- name: Upload extension packages
uses: actions/upload-artifact@v4
with:
name: extension-artifacts
path: dist/jupyterlab_suggestions*
if-no-files-found: error
- name: Upload extension packages
uses: actions/upload-artifact@v4
with:
name: extension-artifacts
path: |
python/*/dist/jupyter_suggestions*
if-no-files-found: error

test_isolated:
needs: build
runs-on: ubuntu-latest

steps:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- uses: actions/download-artifact@v4
with:
name: extension-artifacts
- name: Install and Test
run: |
set -eux
# Remove NodeJS, twice to take care of system and locally installed node versions.
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install "jupyterlab>=4.0.0,<5" jupyterlab_suggestions*.whl
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyter-suggestions.*OK"
python -m jupyterlab.browser_check --no-browser-test
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- uses: actions/download-artifact@v4
with:
name: extension-artifacts
- name: Install and Test
run: |
set -eux
# Remove NodeJS, twice to take care of system and locally installed node versions.
sudo rm -rf $(which node)
sudo rm -rf $(which node)
cp ./jupyter_suggestions_core/dist/jupyter_suggestions*.whl .
pip install "jupyterlab>=4.0.0,<5" jupyter_suggestions*.whl
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyter-suggestions.*OK"
python -m jupyterlab.browser_check --no-browser-test
check_links:
name: Check Links
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:

version_spec: next
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
Expand Down
47 changes: 0 additions & 47 deletions .github/workflows/deploy.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ node_modules
**/package.json
!/package.json
jupyterlab_suggestions
**/*.js
**/*.d.ts
**/labextension/*
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nodeLinker: node-modules
enableImmutableInstalls: false
5 changes: 1 addition & 4 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
"npmClient": "yarn",
"version": "independent",
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"packages": [
"packages/*",
"python/jupyter_suggestions_core"
]
"packages": ["packages/*", "python/jupyter_suggestions_core"]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
"prettier:check": "jlpm prettier:base --check",
"stylelint": "jlpm stylelint:check --fix",
"stylelint:check": "stylelint --cache \"style/**/*.css\""
"stylelint:check": "stylelint --cache \"**/style/**/*.css\""
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0",
Expand Down Expand Up @@ -91,7 +91,7 @@
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"project": "tsconfig.eslint.json",
"sourceType": "module"
},
"plugins": [
Expand Down
16 changes: 10 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0.3.2"]
requires = [
"hatchling>=1.5.0",
"jupyterlab>=4.0.0,<5",
"hatch-nodejs-version>=0.3.2",
]

[project]
classifiers = [
Expand All @@ -18,14 +22,17 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
dynamic = ["version", "description", "authors", "urls", "keywords"]
license = {file = "LICENSE"}
license = { file = "LICENSE" }
name = "jupyterlab_suggestions_root"
readme = "README.md"
requires-python = ">=3.9"

[tool.hatch.version]
path = "python/jupyter_suggestions/jupyter_suggestions/__init__.py"

[tool.jupyter-releaser]
skip = ["check-python"]

[tool.jupyter-releaser.options]
python_packages = [
"python/jupyter_suggestions:jupyter_suggestions",
Expand All @@ -34,10 +41,7 @@ python_packages = [
version_cmd = "python scripts/bump-version.py"

[tool.jupyter-releaser.hooks]
before-build-npm = [
"jlpm",
"jlpm build:prod",
]
before-build-npm = ["jlpm", "jlpm build:prod"]
before-bump-version = ["python -m pip install hatch 'jupyterlab>=4.0.0'"]

[tool.check-wheel-contents]
Expand Down
6 changes: 4 additions & 2 deletions python/jupyter_suggestions/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = []
dependencies = [
"jupyter_suggestions_core==0.1.0"
]
dynamic = ["version", "description", "authors", "urls", "keywords"]
license = {file = "LICENSE"}
name = "jupyterlab_suggestions"
name = "jupyter_suggestions"
readme = "README.md"
requires-python = ">=3.9"

Expand Down
4 changes: 4 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfigbase",
"include": ["packages/**/*", "python/**/*"]
}

0 comments on commit bf6089f

Please sign in to comment.