Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
docs: add development documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt committed May 11, 2023
1 parent 1bf5bfc commit 77a3905
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@
[![License](https://img.shields.io/pypi/l/gosling.svg?color=green)](https://github.com/higlass/higlass-widget/raw/main/LICENSE)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/higlass/higlass-widget/blob/main/notebooks/Widget.ipynb)


```
pip install higlass-widget
```

### Development

```bash
pip install -e .
```

If you are using the classic Jupyter Notebook you need to install the nbextension:
This project uses [`hatch`](https://github.com/pypa/hatch), which installs and sync
all dependencies from `pyproject.toml` automatically.

```bash
jupyter nbextension install --py --symlink --sys-prefix higlass_widget
jupyter nbextension enable --py --sys-prefix higlass_widget
```sh
hatch shell
```

Note for developers:
Alternatively, you can create and manage your own virtual environments and install
an editable version of `higlass-widget`:

- the `-e` pip option allows one to modify the Python code in-place. Restart the kernel in order to see the changes.
- the `--symlink` argument on Linux or OS X allows one to modify the JavaScript code in-place. This feature is not available with Windows.
```sh
pip install -e ".[dev]"
```

For developing with JupyterLab:
Finally, you can now run the notebooks with:

```
jupyter labextension develop --overwrite higlass_widget
```sh
jupyterlab
```

`higlass_widget.HiGlassWidget` is built with [`anywidget`](https://github.com/manzt/anywidget).
You can edit the contents of `higlass_widget/widget.js` and changes will be reflected automatically
in your active Jupyter notebook.

### Release

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ dependencies = [
dev = [
"black[jupyter]",
"ruff",
"jupyterlab"
"jupyterlab",
"watchfiles",
]

[project.urls]
Expand Down

0 comments on commit 77a3905

Please sign in to comment.