| Name | jupyterlab-empinken-extension JSON |
| Version |
0.6.2
JSON |
| download |
| home_page | None |
| Summary | A JupyterLab extension for colouring notebook cell backgrounds. |
| upload_time | 2024-09-03 17:25:51 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.8 |
| license | MIT License Copyright (c) 2018 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# jupyterlab_empinken_extension
A JupyterLab extension for colouring notebook cell backgrounds.
Builds on [`jupyterlab-celltagsclasses`](https://github.com/parmentelat/jupyterlab-celltagsclasses) and earlier versions of `jupyterlab_empinken_extension`.


The buttons set tags on selected cells and the cell is styled correspondingly.
In v0.6.x:

- [*book* / `book-open-outline` icon](https://pictogrammers.com/library/mdi/icon/book-open-outline/): "activity" [maps to `style-activity` cell tag], by default, a blue background; used to idnetify activity blockls (follows OU VLE theme);
- [*tick* / `check` icon](https://pictogrammers.com/library/mdi/icon/check/): "solution" [maps to `style-solution` cell tag], by default, a green background; used to identify solution cells;
- [*head/mortarboard* ("scholar") / `school-outline` icon](https://pictogrammers.com/library/mdi/icon/school-outline/): "learner" [maps to cell tag `style-learner`], by default, a yellow background; used as a nudge to students ("you should edit / add content to this cell");
- [*quote* / `format-quote-close` icon](https://pictogrammers.com/library/mdi/icon/format-quote-close/): "tutor" [maps to cell tag `style-tutor`], by default, a pink background; used by tutors to highlight feedback cells; used by editors/critical readers to highlight feedback cells to authors.
*Icons from [Material Design Icons](https://pictogrammers.com/library/mdi/)*
Any old style tags (`style-student` rather than `style-learner`, `style-commentate` rather than `style-tutor`) will be lazily updated as and when an empinken button is clicked on a cell tagged in the old style.
In `0.5.6`:
- `A`: "activity" [maps to `style-activity` cell tag], by default, a blue background; used to idnetify activity blockls (follows OU VLE theme);
- `S`: "solution" [maps to `style-solution` cell tag], by default, a green background; used to identify solution cells;
- `L`: "learner" [maps to cell tag `style-learner`], by default, a yellow background; used as a nudge to students ("you should edit / add content to this cell");
- `T`: "tutor" [maps to cell tag `style-tutor`], by default, a pink background; used by tutors to highlight feedback cells; used by editors/critical readers to highlight feedback cells to authors.
Associated tools: in [`tm351_nb_utils`](https://github.com/innovationOUtside/nb_workflow_tools) command lines tools:
- [empinken tags updater](https://github.com/innovationOUtside/nb_workflow_tools/tree/master?tab=readme-ov-file#empinken-updater) — updates tags in notebooks to new style (`style-activity`/`style-solution`/`style-learner`/`style-tutor` format): `upgrade_empinken_tags NOTEBOOKS_PATH`)
## Requirements
- JupyterLab >= 4.0.0
## Initial set-up
```bash
# Create orphan branch
% git checkout --orphan NEWBRANCH
# Clear old files
git rm -rf .
# Use template to create base extenion
copier copy https://github.com/jupyterlab/extension-template .
```
## Install
To install the extension, execute:
```bash
pip install jupyterlab_empinken_extension
```
## Uninstall
To remove the extension, execute:
```bash
pip uninstall jupyterlab_empinken_extension
```
## TH BUILD
`jlpm build`
`hatch build`
## Contributing
### Set up environment
`cd` into dir and run `pipenv install`
Each terminal session, `cd` into dir and run `pipenv shell`.
### Development install
Note: You will need NodeJS to build the extension package.
The `jlpm` command is JupyterLab's pinned version of
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
`yarn` or `npm` in lieu of `jlpm` below.
```bash
# Clone the repo to your local environment
# Change directory to the jupyterlab_empinken_extension directory
# Install package in development mode
pip install -e "."
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
```
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
```bash
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab
```
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
```bash
jupyter lab build --minimize=False
```
### Development uninstall
```bash
pip uninstall jupyterlab_empinken_extension
```
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 `jupyterlab_empinken_extension` within that folder.
### Testing the extension
#### Frontend tests
This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
To execute them, execute:
```sh
jlpm
jlpm test
```
#### Integration tests
This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
More information are provided within the [ui-tests](./ui-tests/README.md) README.
### Packaging the extension
See [RELEASE](RELEASE.md)
Raw data
{
"_id": null,
"home_page": null,
"name": "jupyterlab-empinken-extension",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "jupyterlab_empinken_extension <tony.hirst@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/4d/be/b3599a89fddd32f0df78027db5adb9aa1a12b45040fc75dcc31d5ed5c5f9/jupyterlab_empinken_extension-0.6.2.tar.gz",
"platform": null,
"description": "# jupyterlab_empinken_extension\n\nA JupyterLab extension for colouring notebook cell backgrounds.\n\nBuilds on [`jupyterlab-celltagsclasses`](https://github.com/parmentelat/jupyterlab-celltagsclasses) and earlier versions of `jupyterlab_empinken_extension`.\n\n\n\n\n\nThe buttons set tags on selected cells and the cell is styled correspondingly.\n\nIn v0.6.x:\n\n\n\n- [*book* / `book-open-outline` icon](https://pictogrammers.com/library/mdi/icon/book-open-outline/): \"activity\" [maps to `style-activity` cell tag], by default, a blue background; used to idnetify activity blockls (follows OU VLE theme);\n- [*tick* / `check` icon](https://pictogrammers.com/library/mdi/icon/check/): \"solution\" [maps to `style-solution` cell tag], by default, a green background; used to identify solution cells;\n- [*head/mortarboard* (\"scholar\") / `school-outline` icon](https://pictogrammers.com/library/mdi/icon/school-outline/): \"learner\" [maps to cell tag `style-learner`], by default, a yellow background; used as a nudge to students (\"you should edit / add content to this cell\");\n- [*quote* / `format-quote-close` icon](https://pictogrammers.com/library/mdi/icon/format-quote-close/): \"tutor\" [maps to cell tag `style-tutor`], by default, a pink background; used by tutors to highlight feedback cells; used by editors/critical readers to highlight feedback cells to authors.\n\n*Icons from [Material Design Icons](https://pictogrammers.com/library/mdi/)*\n\nAny old style tags (`style-student` rather than `style-learner`, `style-commentate` rather than `style-tutor`) will be lazily updated as and when an empinken button is clicked on a cell tagged in the old style.\n\nIn `0.5.6`:\n\n- `A`: \"activity\" [maps to `style-activity` cell tag], by default, a blue background; used to idnetify activity blockls (follows OU VLE theme);\n- `S`: \"solution\" [maps to `style-solution` cell tag], by default, a green background; used to identify solution cells;\n- `L`: \"learner\" [maps to cell tag `style-learner`], by default, a yellow background; used as a nudge to students (\"you should edit / add content to this cell\");\n- `T`: \"tutor\" [maps to cell tag `style-tutor`], by default, a pink background; used by tutors to highlight feedback cells; used by editors/critical readers to highlight feedback cells to authors.\n\nAssociated tools: in [`tm351_nb_utils`](https://github.com/innovationOUtside/nb_workflow_tools) command lines tools:\n\n- [empinken tags updater](https://github.com/innovationOUtside/nb_workflow_tools/tree/master?tab=readme-ov-file#empinken-updater) \u2014 updates tags in notebooks to new style (`style-activity`/`style-solution`/`style-learner`/`style-tutor` format): `upgrade_empinken_tags NOTEBOOKS_PATH`)\n\n## Requirements\n\n- JupyterLab >= 4.0.0\n\n## Initial set-up\n\n```bash\n# Create orphan branch\n% git checkout --orphan NEWBRANCH\n\n# Clear old files\ngit rm -rf .\n\n# Use template to create base extenion\ncopier copy https://github.com/jupyterlab/extension-template .\n\n```\n\n## Install\n\nTo install the extension, execute:\n\n```bash\npip install jupyterlab_empinken_extension\n```\n\n## Uninstall\n\nTo remove the extension, execute:\n\n```bash\npip uninstall jupyterlab_empinken_extension\n```\n\n## TH BUILD\n\n`jlpm build`\n\n`hatch build`\n\n## Contributing\n\n### Set up environment\n\n`cd` into dir and run `pipenv install`\n\nEach terminal session, `cd` into dir and run `pipenv shell`.\n\n### Development install\n\nNote: You will need NodeJS to build the extension package.\n\nThe `jlpm` command is JupyterLab's pinned version of\n[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use\n`yarn` or `npm` in lieu of `jlpm` below.\n\n```bash\n# Clone the repo to your local environment\n# Change directory to the jupyterlab_empinken_extension directory\n# Install package in development mode\npip install -e \".\"\n# Link your development version of the extension with JupyterLab\njupyter labextension develop . --overwrite\n# Rebuild extension Typescript source after making changes\n\n```\n\nYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.\n\n```bash\n# Watch the source directory in one terminal, automatically rebuilding when needed\njlpm watch\n# Run JupyterLab in another terminal\njupyter lab\n```\n\nWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).\n\nBy default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:\n\n```bash\njupyter lab build --minimize=False\n```\n\n### Development uninstall\n\n```bash\npip uninstall jupyterlab_empinken_extension\n```\n\nIn development mode, you will also need to remove the symlink created by `jupyter labextension develop`\ncommand. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`\nfolder is located. Then you can remove the symlink named `jupyterlab_empinken_extension` within that folder.\n\n### Testing the extension\n\n#### Frontend tests\n\nThis extension is using [Jest](https://jestjs.io/) for JavaScript code testing.\n\nTo execute them, execute:\n\n```sh\njlpm\njlpm test\n```\n\n#### Integration tests\n\nThis extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).\nMore precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.\n\nMore information are provided within the [ui-tests](./ui-tests/README.md) README.\n\n### Packaging the extension\n\nSee [RELEASE](RELEASE.md)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2018 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "A JupyterLab extension for colouring notebook cell backgrounds.",
"version": "0.6.2",
"project_urls": {
"Bug Tracker": "https://github.com/innovationOUtside/jupyterlab_empinken_extension/issues",
"Homepage": "https://github.com/innovationOUtside/jupyterlab_empinken_extension",
"Repository": "https://github.com/innovationOUtside/jupyterlab_empinken_extension.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5929dc4b729d355ce0fe59c5a70308f6e2fc0ac28765bf2891945b3d9f438c85",
"md5": "9ef5d4ee277a2a94c8d0bd6aca2ac786",
"sha256": "22bcef2dfa8e630b8e3fe149664e99f018c6799311710668955395e8617d7263"
},
"downloads": -1,
"filename": "jupyterlab_empinken_extension-0.6.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9ef5d4ee277a2a94c8d0bd6aca2ac786",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 65696,
"upload_time": "2024-09-03T17:25:49",
"upload_time_iso_8601": "2024-09-03T17:25:49.461147Z",
"url": "https://files.pythonhosted.org/packages/59/29/dc4b729d355ce0fe59c5a70308f6e2fc0ac28765bf2891945b3d9f438c85/jupyterlab_empinken_extension-0.6.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4dbeb3599a89fddd32f0df78027db5adb9aa1a12b45040fc75dcc31d5ed5c5f9",
"md5": "90b20db2d58b604beefcf441c69557a2",
"sha256": "f72b65be20092a585262fb809aa1244090b1de180b889c51bfb8964aef7af3ff"
},
"downloads": -1,
"filename": "jupyterlab_empinken_extension-0.6.2.tar.gz",
"has_sig": false,
"md5_digest": "90b20db2d58b604beefcf441c69557a2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 817201,
"upload_time": "2024-09-03T17:25:51",
"upload_time_iso_8601": "2024-09-03T17:25:51.835869Z",
"url": "https://files.pythonhosted.org/packages/4d/be/b3599a89fddd32f0df78027db5adb9aa1a12b45040fc75dcc31d5ed5c5f9/jupyterlab_empinken_extension-0.6.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-03 17:25:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "innovationOUtside",
"github_project": "jupyterlab_empinken_extension",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "jupyterlab-empinken-extension"
}