widget-ts-cookiecutter

(โ˜… 128)

A highly opinionated cookiecutter template for ipywidget extensions.

  • .gitignore
  • cookiecutter.json
  • LICENSE
  • pytest.ini
  • README.md

# Installation Guide

1. Get the code
git clone https://github.com/jupyter-widgets/widget-ts-cookiecutter

Downloads the entire project code from GitHub to your computer.

cd widget-ts-cookiecutter

Moves into the project folder you just downloaded.

2. Official Install Script

Easy Recommended
Prerequisites
  • Python 3 Python is required to use pip.
pip install build twine

Installs the package published on PyPI directly โ€” no need to clone the source.

pip install cookiecutter

Installs the package published on PyPI directly โ€” no need to clone the source.

โœ… After installing, open a new terminal and run the program's version command (e.g. --version) to confirm it worked.

Pulled directly from this repo's README.

3. Node.js

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Node.js Node.js must be installed to use npm. The LTS version is recommended.
conda create -n {{ cookiecutter.python_package_name }}-dev -c conda-forge nodejs yarn python jupyterlab

Runs the Python script (or module).

yarn test

Type this command into your terminal and run it.

yarn run build

Type this command into your terminal and run it.

yarn run watch

Type this command into your terminal and run it.

npm login

Type this command into your terminal and run it.

โœ… After running the command, open the address shown in the terminal (usually something like http://localhost:3000) in your browser.

Pulled directly from this repo's README.

4. Python

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Python 3 On Windows, be sure to check 'Add Python to PATH' during installation.
pip install -e ".[test, examples]"

Installs the Python libraries listed in requirements.txt (or similar).

jupyter labextension develop --overwrite .

Type this command into your terminal and run it.

jupyter nbextension install --sys-prefix --symlink --overwrite --py <your python package name>

Runs the Python script (or module).

jupyter nbextension enable --sys-prefix --py <your python package name>

Runs the Python script (or module).

jupyter lab

Launches Jupyter in your browser so you can open and run the notebook (.ipynb) files.

โœ… If it runs without errors and prints output in the terminal, it worked.

Pulled directly from this repo's README.

// repository documentation