diff --git a/.copier-answers.yml b/.copier-answers.yml index 3e76378..8d5c82a 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -2,17 +2,17 @@ _commit: v4.2.5 _src_path: https://github.com/jupyterlab/extension-template author_email: grosse@hdm-stuttgart.de -author_name: Sandbox Theme +author_name: Malte Grosse data_format: string file_extension: '' has_binder: false has_settings: false kind: theme -labextension_name: sandbox_theme +labextension_name: jupyterlab-sandbox-theme mimetype: '' mimetype_name: '' -project_short_description: Sandbox Theme for JupyterLab -python_name: sandbox_theme +project_short_description: A JupyterLab Sandbox Theme extension. +python_name: jupyterlab_sandbox_theme repository: https://git.sandbox.iuk.hdm-stuttgart.de/grosse/jupyterlab_sandbox_theme test: false viewer_name: '' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3c73e7..6816cf1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: python -m pip install .[test] jupyter labextension list - jupyter labextension list 2>&1 | grep -ie "sandbox_theme.*OK" + jupyter labextension list 2>&1 | grep -ie "jupyterlab-sandbox-theme.*OK" python -m jupyterlab.browser_check - name: Package the extension @@ -45,13 +45,13 @@ jobs: pip install build python -m build - pip uninstall -y "sandbox_theme" jupyterlab + pip uninstall -y "jupyterlab_sandbox_theme" jupyterlab - name: Upload extension packages uses: actions/upload-artifact@v3 with: name: extension-artifacts - path: dist/sandbox_theme* + path: dist/jupyterlab_sandbox_theme* if-no-files-found: error test_isolated: @@ -74,11 +74,11 @@ jobs: sudo rm -rf $(which node) sudo rm -rf $(which node) - pip install "jupyterlab>=4.0.0,<5" sandbox_theme*.whl + pip install "jupyterlab>=4.0.0,<5" jupyterlab_sandbox_theme*.whl jupyter labextension list - jupyter labextension list 2>&1 | grep -ie "sandbox_theme.*OK" + jupyter labextension list 2>&1 | grep -ie "jupyterlab-sandbox-theme.*OK" python -m jupyterlab.browser_check --no-browser-test diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index e5f96ff..ad7f9af 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -26,5 +26,5 @@ jobs: - name: Upload Distributions uses: actions/upload-artifact@v3 with: - name: sandbox_theme-releaser-dist-${{ github.run_number }} + name: jupyterlab_sandbox_theme-releaser-dist-${{ github.run_number }} path: .jupyter_releaser_checkout/dist diff --git a/.gitignore b/.gitignore index 993da34..f7beecb 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,9 @@ node_modules/ *.egg-info/ .ipynb_checkpoints *.tsbuildinfo -sandbox_theme/labextension +jupyterlab_sandbox_theme/labextension # Version file is handled by hatchling -sandbox_theme/_version.py +jupyterlab_sandbox_theme/_version.py # Created by https://www.gitignore.io/api/python # Edit at https://www.gitignore.io/?templates=python diff --git a/.prettierignore b/.prettierignore index c7c51f2..1eef32e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,4 +3,4 @@ node_modules **/lib **/package.json !/package.json -sandbox_theme +jupyterlab_sandbox_theme diff --git a/LICENSE b/LICENSE index 40fd7b0..7b6f638 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2024, Sandbox Theme +Copyright (c) 2024, Malte Grosse All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index 700baea..551f31c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# sandbox_theme +# jupyterlab_sandbox_theme [![Github Actions Status](https://git.sandbox.iuk.hdm-stuttgart.de/grosse/jupyterlab_sandbox_theme/workflows/Build/badge.svg)](https://git.sandbox.iuk.hdm-stuttgart.de/grosse/jupyterlab_sandbox_theme/actions/workflows/build.yml) -Sandbox Theme for JupyterLab +A JupyterLab Sandbox Theme extension. ## Requirements @@ -12,7 +12,7 @@ Sandbox Theme for JupyterLab To install the extension, execute: ```bash -pip install sandbox_theme +pip install jupyterlab_sandbox_theme ``` ## Uninstall @@ -20,7 +20,7 @@ pip install sandbox_theme To remove the extension, execute: ```bash -pip uninstall sandbox_theme +pip uninstall jupyterlab_sandbox_theme ``` ## Contributing @@ -35,7 +35,7 @@ The `jlpm` command is JupyterLab's pinned version of ```bash # Clone the repo to your local environment -# Change directory to the sandbox_theme directory +# Change directory to the jupyterlab_sandbox_theme directory # Install package in development mode pip install -e "." # Link your development version of the extension with JupyterLab @@ -64,12 +64,12 @@ jupyter lab build --minimize=False ### Development uninstall ```bash -pip uninstall sandbox_theme +pip uninstall jupyterlab_sandbox_theme ``` In development mode, you will also need to remove the symlink created by `jupyter labextension develop` command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions` -folder is located. Then you can remove the symlink named `sandbox_theme` within that folder. +folder is located. Then you can remove the symlink named `jupyterlab-sandbox-theme` within that folder. ### Packaging the extension diff --git a/RELEASE.md b/RELEASE.md index 023ff08..e1b3c63 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,4 +1,4 @@ -# Making a new release of sandbox_theme +# Making a new release of jupyterlab_sandbox_theme The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser). diff --git a/install.json b/install.json index ba350e1..7e67115 100644 --- a/install.json +++ b/install.json @@ -1,5 +1,5 @@ { "packageManager": "python", - "packageName": "sandbox_theme", - "uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package sandbox_theme" + "packageName": "jupyterlab_sandbox_theme", + "uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyterlab_sandbox_theme" } diff --git a/sandbox_theme/__init__.py b/jupyterlab_sandbox_theme/__init__.py similarity index 78% rename from sandbox_theme/__init__.py rename to jupyterlab_sandbox_theme/__init__.py index 60c9838..bdc6403 100644 --- a/sandbox_theme/__init__.py +++ b/jupyterlab_sandbox_theme/__init__.py @@ -5,12 +5,12 @@ except ImportError: # in editable mode with pip. It is highly recommended to install # the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs import warnings - warnings.warn("Importing 'sandbox_theme' outside a proper installation.") + warnings.warn("Importing 'jupyterlab_sandbox_theme' outside a proper installation.") __version__ = "dev" def _jupyter_labextension_paths(): return [{ "src": "labextension", - "dest": "sandbox_theme" + "dest": "jupyterlab-sandbox-theme" }] diff --git a/package.json b/package.json index 7b57f99..40bf863 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jupyterlab-sandbox-theme", "version": "0.1.4", - "description": "Sandbox Theme for JupyterLab", + "description": "A JupyterLab Sandbox Theme extension.", "keywords": [ "jupyter", "jupyterlab", @@ -13,7 +13,7 @@ }, "license": "BSD-3-Clause", "author": { - "name": "Sandbox Theme", + "name": "Malte Grosse", "email": "grosse@hdm-stuttgart.de" }, "files": [ @@ -37,7 +37,7 @@ "clean": "jlpm clean:lib", "clean:lib": "rimraf lib tsconfig.tsbuildinfo", "clean:lintcache": "rimraf .eslintcache .stylelintcache", - "clean:labextension": "rimraf sandbox_theme/labextension sandbox_theme/_version.py", + "clean:labextension": "rimraf jupyterlab_sandbox_theme/labextension jupyterlab_sandbox_theme/_version.py", "clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache", "eslint": "jlpm eslint:check --fix", "eslint:check": "eslint . --cache --ext .ts,.tsx", @@ -89,7 +89,7 @@ }, "jupyterlab": { "extension": true, - "outputDir": "sandbox_theme/labextension", + "outputDir": "jupyterlab_sandbox_theme/labextension", "themePath": "style/index.css" }, "eslintIgnore": [ diff --git a/pyproject.toml b/pyproject.toml index bdf2fa5..339fa2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0 build-backend = "hatchling.build" [project] -name = "sandbox_theme" +name = "jupyterlab_sandbox_theme" readme = "README.md" license = { file = "LICENSE" } requires-python = ">=3.8" @@ -33,23 +33,23 @@ source = "nodejs" fields = ["description", "authors", "urls"] [tool.hatch.build.targets.sdist] -artifacts = ["sandbox_theme/labextension"] +artifacts = ["jupyterlab_sandbox_theme/labextension"] exclude = [".github", "binder"] [tool.hatch.build.targets.wheel.shared-data] -"sandbox_theme/labextension" = "share/jupyter/labextensions/sandbox_theme" -"install.json" = "share/jupyter/labextensions/sandbox_theme/install.json" +"jupyterlab_sandbox_theme/labextension" = "share/jupyter/labextensions/jupyterlab-sandbox-theme" +"install.json" = "share/jupyter/labextensions/jupyterlab-sandbox-theme/install.json" [tool.hatch.build.hooks.version] -path = "sandbox_theme/_version.py" +path = "jupyterlab_sandbox_theme/_version.py" [tool.hatch.build.hooks.jupyter-builder] dependencies = ["hatch-jupyter-builder>=0.5"] build-function = "hatch_jupyter_builder.npm_builder" ensured-targets = [ - "sandbox_theme/labextension/package.json", + "jupyterlab_sandbox_theme/labextension/package.json", ] -skip-if-exists = ["sandbox_theme/labextension/static/style.js"] +skip-if-exists = ["jupyterlab_sandbox_theme/labextension/static/style.js"] [tool.hatch.build.hooks.jupyter-builder.build-kwargs] build_cmd = "build:prod" @@ -59,7 +59,7 @@ npm = ["jlpm"] build_cmd = "install:extension" npm = ["jlpm"] source_dir = "src" -build_dir = "sandbox_theme/labextension" +build_dir = "jupyterlab_sandbox_theme/labextension" [tool.jupyter-releaser.options] version_cmd = "hatch version" diff --git a/src/index.ts b/src/index.ts index 758945b..ee8571e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,22 +2,22 @@ import { ILabShell, JupyterFrontEnd, JupyterFrontEndPlugin} from '@jupyterlab/ap import { IThemeManager, ISplashScreen} from '@jupyterlab/apputils'; import { LabIcon, jupyterFaviconIcon, jupyterIcon, jupyterlabWordmarkIcon } from '@jupyterlab/ui-components'; + import { Widget } from '@lumino/widgets'; - - import { Logo,FavIconIdle,FavIconBusy} from './images'; + /** * Initialization data for the sandbox_theme extension. */ const plugin: JupyterFrontEndPlugin = { - id: 'sandbox_theme:plugin', + id: 'jupyterlab-sandbox-theme:plugin', description: 'Sandbox Theme for JupyterLab', autoStart: true, requires: [IThemeManager,ILabShell,ISplashScreen], activate: (app: JupyterFrontEnd, manager: IThemeManager, shell: ILabShell) => { console.log('JupyterLab extension sandbox_theme is activated!'); - const style = 'sandbox_theme/index.css'; + const style = 'jupyterlab-sandbox-theme/index.css'; const logo_svg = Logo const logo_icon = new LabIcon({ name: 'ui-components:sandbox', svgstr: logo_svg }); diff --git a/src/typings.d.ts b/src/typings.d.ts deleted file mode 100644 index 1f7b23e..0000000 --- a/src/typings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.svg' { - const script: string; - export default script; - } \ No newline at end of file diff --git a/style/images/logo.svg b/style/images/logo.svg deleted file mode 100644 index 6f5a665..0000000 --- a/style/images/logo.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 165ec7b..3e1f7e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3305,6 +3305,37 @@ __metadata: languageName: node linkType: hard +"jupyterlab-sandbox-theme@workspace:.": + version: 0.0.0-use.local + resolution: "jupyterlab-sandbox-theme@workspace:." + dependencies: + "@jupyterlab/application": ^4.0.0 + "@jupyterlab/apputils": ^4.0.0 + "@jupyterlab/builder": ^4.0.0 + "@types/json-schema": ^7.0.11 + "@types/react": ^18.0.26 + "@types/react-addons-linked-state-mixin": ^0.14.22 + "@typescript-eslint/eslint-plugin": ^6.1.0 + "@typescript-eslint/parser": ^6.1.0 + css-loader: ^6.7.1 + eslint: ^8.36.0 + eslint-config-prettier: ^8.8.0 + eslint-plugin-prettier: ^5.0.0 + npm-run-all: ^4.1.5 + prettier: ^3.0.0 + rimraf: ^5.0.1 + source-map-loader: ^1.0.2 + style-loader: ^3.3.1 + stylelint: ^15.10.1 + stylelint-config-recommended: ^13.0.0 + stylelint-config-standard: ^34.0.0 + stylelint-csstree-validator: ^3.0.0 + stylelint-prettier: ^4.0.0 + typescript: ~5.0.2 + yjs: ^13.5.0 + languageName: unknown + linkType: soft + "keyv@npm:^4.5.3": version: 4.5.4 resolution: "keyv@npm:4.5.4" @@ -4401,37 +4432,6 @@ __metadata: languageName: node linkType: hard -"sandbox_theme@workspace:.": - version: 0.0.0-use.local - resolution: "sandbox_theme@workspace:." - dependencies: - "@jupyterlab/application": ^4.0.0 - "@jupyterlab/apputils": ^4.0.0 - "@jupyterlab/builder": ^4.0.0 - "@types/json-schema": ^7.0.11 - "@types/react": ^18.0.26 - "@types/react-addons-linked-state-mixin": ^0.14.22 - "@typescript-eslint/eslint-plugin": ^6.1.0 - "@typescript-eslint/parser": ^6.1.0 - css-loader: ^6.7.1 - eslint: ^8.36.0 - eslint-config-prettier: ^8.8.0 - eslint-plugin-prettier: ^5.0.0 - npm-run-all: ^4.1.5 - prettier: ^3.0.0 - rimraf: ^5.0.1 - source-map-loader: ^1.0.2 - style-loader: ^3.3.1 - stylelint: ^15.10.1 - stylelint-config-recommended: ^13.0.0 - stylelint-config-standard: ^34.0.0 - stylelint-csstree-validator: ^3.0.0 - stylelint-prettier: ^4.0.0 - typescript: ~5.0.2 - yjs: ^13.5.0 - languageName: unknown - linkType: soft - "sanitize-html@npm:~2.7.3": version: 2.7.3 resolution: "sanitize-html@npm:2.7.3"