The base project was generated from the TypeScript Cookiecutter Template.
# Create a new environment
conda create -n ipyp5 -c conda-forge jupyterlab notebook nodejs python
# After the environment is created, activate it
conda activate ipyp5
# Install the widget in editable mode
python -m pip install -e .
To install and enable the notebook extension:
jupyter nbextension install --py --sys-prefix ipyp5
jupyter nbextension enable --py --sys-prefix ipyp5
To install the JupyterLab extension:
jupyter labextension install .
The ipyp5
widget can be test in both the classic notebook and JupyterLab.
When testing in JupyterLab you can activate the watch mode:
jupyter lab --watch
Black is used to format the Python code.
To have the code automatically formatted before each commit:
- Install pre-commit
- Run
pre-commit run
- In one terminal window, run:
jupyter lab --watch --no-browser
- In a second terminal window, run:
yarn run watch
. - Open JupyterLab using the link return in step 1
- When making changes to the Python code, restart the kernel
TODO