Skip to content

Commit

Permalink
Support jupyterlite-core 0.2.0a0 (#58)
Browse files Browse the repository at this point in the history
* start bumping

* add compatibility matrix to readme
  • Loading branch information
bollwyvl authored Sep 21, 2023
1 parent 37d61df commit 57ec58c
Show file tree
Hide file tree
Showing 18 changed files with 13,245 additions and 10,691 deletions.
11 changes: 0 additions & 11 deletions .eslintignore

This file was deleted.

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

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: Check Release
on:
push:
branches: ['main']
branches:
- main
- 0.1.x
pull_request:
branches: ['*']
branches:
- '*'

jobs:
check_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- 0.1.x
pull_request:
branches:
- '*'
Expand All @@ -19,7 +20,7 @@ jobs:

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

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
Expand Down
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

21 changes: 21 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
enableImmutableInstalls: false
enableInlineBuilds: false
enableTelemetry: false
httpTimeout: 60000
nodeLinker: node-modules
npmRegistryServer: https://registry.npmjs.org/
installStatePath: ./build/.cache/yarn/install-state.gz
cacheFolder: ./build/.cache/yarn/cache
logFilters:
- code: YN0006
level: discard
- code: YN0002
level: discard
- code: YN0007
level: discard
- code: YN0013
level: discard
- code: YN0019
level: discard
- code: YN0008
level: discard
74 changes: 68 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
## Requirements

- `python >=3.8`
- `jupyterlite >=0.1.0b19`

### Compatibility

| status | `jupyterlite-pyodide-kernel` | `jupyterlite-core` | `jupyterlab` | `notebook` | `retrolab` |
| :---------------------------: | :--------------------------: | :----------------: | :----------: | :--------: | ---------- |
| [alpha](#prerelease-versions) | `0.2.*` | `0.2.*` | `4.0.*` | `7.0.*` | - |
| stable | `0.1.*` | `0.1.*` | `3.5.*` | - | `0.3.*` |

Installing the matching version of JupyterLab with your package manager can help ensure
matching labextension assets and kernel dependencies, even though this kernel does not
yet work in a full, `jupyter_server`-hosted client such as JupyterLab or Notebook.

## Install

Expand All @@ -26,12 +36,44 @@ To install the Pyodide kernel labextension and the CLI addons for `jupyter lite`
pip install jupyterlite-pyodide-kernel
```

Then build your JupyterLite site:
or with `conda`, `mamba`, `micromamba`, etc.

```bash
conda install -c conda-forge jupyterlite-pyodide-kernel
```

> For more options see the [development install](#development-install) or [contributing
> guide][contrib].
## Usage

Build a JupyterLite site:

```bash
jupyter lite build
```

Some new CLI options are also available:

```bash
jupyter lite --help
```

This should show something like this:

```bash
--piplite-wheels=<typedtuple-item-1>...
Local paths or URLs of piplite-compatible wheels to copy and index
Default: ()
Equivalent to: [--PipliteAddon.piplite_urls]
--pyodide=<Unicode>
Local path or URL of a pyodide distribution tarball
Default: ''
Equivalent to: [--PyodideAddon.pyodide_url]
```

## Learn more

⚠️ The documentation for advanced configuration is available from the main JupyterLite
documentation site:

Expand All @@ -47,17 +89,37 @@ documentation site:
To remove the extension, run:

```bash
pip uninstall jupyterlite-pyodide-kernel
pip uninstall jupyterlite-pyodide-kernel # or howver you installed it
```

## Prerelease Versions

To install pre-release versions with `pip`:

```bash
pip install --upgrade --pre jupyterlite-pyodide-kernel
```

Or, similarly for the `conda` ecosystem, for `alpha` packages:

```bash
conda install \
-c conda-forge/label/jupyterlite_core_alpha \
-c conda-forge/label/jupyterlite_pyodide_kernel_alpha \
-c conda-forge \
jupyterlite-pyodide-kernel
```

> Note: `_beta` and `_rc` packages would follow a similar channel naming convention
## Development Install

Below is an short overview of getting up and running quickly. Please see the
[contributing guide][contrib] for full details.

### Development Requirements

**Recommended** a Python virtual environment provided by a tool of choice, e.g.
**Recommended** a Python virtual environment provided by a tool of choice, e.g. one of:

- `virtualenv`
- `mamba`
Expand All @@ -66,7 +128,7 @@ Below is an short overview of getting up and running quickly. Please see the
Ensure the local development environment has:

- `git`
- `nodejs 18`
- `nodejs 20`
- `python >=3.8`

### Development Quick Start
Expand All @@ -78,7 +140,7 @@ npm run quickstart
```

Then, serve the built demo site, documentation, and test reports with Python's built-in
http server:
HTTP server:

```bash
jlpm serve
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</a>
</li>
<li>
<a href="./_static/retro/notebooks/index.html?path=intro.ipynb" target="_blank" title="try RetroLab, a single-document app">
<a href="./_static/notebooks/index.html?path=intro.ipynb" target="_blank" title="try RetroLab, a single-document app">
<i class="fa-solid fa-book"></i>
Retro
</a>
Expand Down
2 changes: 1 addition & 1 deletion jupyterlite_pyodide_kernel/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""source of truth for ``jupyterlite-pyodide-kernel``` version."""
__version__ = "0.1.1"
__version__ = "0.2.0a0"
3 changes: 1 addition & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"npmClient": "jlpm",
"version": "independent",
"useWorkspaces": true
"version": "independent"
}
97 changes: 84 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupyterlite/pyodide-kernel-root",
"version": "0.0.1",
"version": "0.2.0-alpha.0",
"private": true,
"workspaces": {
"packages": [
Expand All @@ -18,14 +18,14 @@
"clean:cache": "rimraf node_modules/.cache build/.lite-cache examples/.jupyterlite.doit.db",
"clean:dist": "rimraf dist",
"clean": "lerna run --stream clean",
"deduplicate": "yarn-deduplicate -s fewer --fail",
"deduplicate": "yarn-berry-deduplicate -s fewer --fail",
"dist:npm": "lerna run --stream dist",
"dist:pypi": "pyproject-build .",
"dist": "jlpm dist:pypi && jlpm dist:npm",
"docs:lite": "cd examples && jupyter lite build",
"docs:sphinx": "sphinx-build -W -b html docs build/docs",
"docs": "jlpm docs:lite && jlpm docs:sphinx",
"eslint:check": "eslint . --cache --ext .ts,.tsx",
"eslint:check": "eslint . --cache --cache-location=./build/.cache/eslint --ext .ts,.tsx",
"eslint": "jlpm eslint:check --fix",
"lint": "jlpm lint:js && jlpm lint:py",
"lint:check": "jlpm lint:js:check && jlpm lint:py:check",
Expand All @@ -46,15 +46,86 @@
"test": "jlpm test:py"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"lerna": "^6.5.1",
"prettier": "^2.8.0",
"rimraf": "^3.0.2",
"typescript": "~4.9.3",
"yarn-deduplicate": "^6.0.1"
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"eslint": "^8.49.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"lerna": "^7.2.0",
"prettier": "^3.0.3",
"rimraf": "^5.0.1",
"typescript": "~5.2.2",
"yarn-berry-deduplicate": "^6.1.1"
},
"prettier": {
"singleQuote": true,
"printWidth": 88,
"proseWrap": "always"
},
"eslintConfig": {
"ignorePatterns": [
"**/__tests__/",
"**/_pypi.ts",
"**/*.d.ts",
"**/lib/",
"build/",
"coverage",
"dist/",
"docs/",
"node_modules/",
"tests/"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfigbase.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": [
"PascalCase"
],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "none"
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": false
}
],
"curly": [
"error",
"all"
],
"eqeqeq": "error",
"prefer-arrow-callback": "error"
}
}
}
Loading

0 comments on commit 57ec58c

Please sign in to comment.