Skip to content

Commit

Permalink
Add empty frontend component
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhad6 committed Jan 4, 2024
1 parent 67c3aac commit 46ceae6
Show file tree
Hide file tree
Showing 11 changed files with 2,090 additions and 8 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Yarn cache
uses: actions/cache@v3
with:
path: .yarn/cache
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-${{ runner.os }}-
- name: Check formatting (Black)
run: hatch run lint:black ${{ env.PYTHON_PACKAGE_NAME }} --check

Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ jobs:
- name: Install Hatch
run: pipx install hatch==${{ env.HATCH_VERSION }}

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Yarn cache
uses: actions/cache@v3
with:
path: .yarn/cache
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-${{ runner.os }}-
- name: Build package
run: hatch build

Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

# Build
dist/
labextension/

# Python
__pycache__/
.ipynb_checkpoints/

# Yarn
node_modules/
.yarn/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.10.0
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.3] (Jan 3 2024)

### Added

- Empty frontend plugin so that this extension appears in the extension list within
JupyterLab.

### Changed

- Changed type hint in `DisplayNamePasswordIdentityProvider` to be compatible with newest
Expand Down
5 changes: 5 additions & 0 deletions install.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"packageManager": "python",
"packageName": "jupyterlab-display-name",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyterlab-display-name."
}
3 changes: 3 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Required in order to build a valid JupyterLab extension

export default { id: "jupyterlab-display-name:plugin", activate() {} };
30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "jupyterlab-display-name",
"version": "0.1.3",
"description": "JupyterLab server extension that adds a display name field to the login page.",
"contributors": [
{
"name": "Alex Hadley",
"email": "contact@alexhadley.net"
}
],
"license": "BSD-3-Clause",
"keywords": [
"jupyter",
"jupyterlab",
"jupyterlab-extension"
],
"homepage": "https://github.com/PainterQubits/jupyterlab-display-name",
"repository": "github:PainterQubits/jupyterlab-display-name",
"main": "lib/index.js",
"jupyterlab": {
"extension": true,
"outputDir": "labextension"
},
"scripts": {
"build": "jupyter labextension build ."
},
"dependencies": {
"@jupyterlab/builder": "^4.0.10"
}
}
31 changes: 23 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-nodejs-version", "jupyterlab>=4.0.10,<5"]
build-backend = "hatchling.build"

[project]
name = "jupyterlab-display-name"
version = "0.1.3"
description = "JupyterLab server extension that adds a display name field to the login page."
authors = [{ name = "Alex Hadley", email = "contact@alexhadley.com" }]
license = { file = "LICENSE" }
readme = "README.md"
keywords = ["jupyter", "jupyterlab", "jupyterlab-extension"]
classifiers = [
"Framework :: Jupyter",
"Framework :: Jupyter :: JupyterLab",
"Framework :: Jupyter :: JupyterLab :: 4",
"Framework :: Jupyter :: JupyterLab :: Extensions",
"Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
Expand All @@ -24,17 +21,35 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.9"
dynamic = ["version", "description", "authors", "urls", "keywords"]
dependencies = ["jupyter_server>=2.12.1,<3", "tornado>=6.4,<7"]

[project.urls]
Homepage = "https://github.com/PainterQubits/jupyterlab-display-name"
Repository = "https://github.com/PainterQubits/jupyterlab-display-name"
[tool.hatch.version]
source = "nodejs"

[tool.hatch.metadata.hooks.nodejs]
fields = ["description", "authors", "urls", "keywords"]

[tool.hatch.build.targets.sdist]
artifacts = ["labextension"]

[tool.hatch.build.targets.wheel]
packages = ["jupyterlab_display_name"]

[tool.hatch.build.targets.wheel.shared-data]
"jupyter_server_config.json" = "etc/jupyter/jupyter_server_config.d/jupyterlab_display_name.json"
"labextension" = "share/jupyter/labextensions/jupyterlab-display-name"
"install.json" = "share/jupyter/labextensions/jupyterlab-display-name/install.json"

[tool.hatch.build.hooks.jupyter-builder]
dependencies = ["hatch-jupyter-builder>=0.8.3"]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = ["labextension/package.json"]
skip-if-exists = ["labextension/package.json"]

[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
build_cmd = "build"
npm = ["jlpm"]

[tool.hatch.envs.default]
description = "For running JupyterLab in development"
Expand Down
Loading

0 comments on commit 46ceae6

Please sign in to comment.