vitessce


Namevitessce JSON
Version 3.2.6 PyPI version JSON
download
home_pageNone
SummaryJupyter widget facilitating interactive visualization of spatial single-cell data with Vitessce
upload_time2024-05-01 21:51:45
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2020 Gehlenborg Lab 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 ipython jupyter widgets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # vitessce-python

[![PyPI](https://img.shields.io/pypi/v/vitessce)](https://pypi.org/project/vitessce)
[![docs](https://img.shields.io/badge/docs-📖-57B4E9.svg)](https://vitessce.github.io/vitessce-python/)

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/vitessce/vitessce-python/main?filepath=docs/notebooks/widget_pbmc.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/vitessce/vitessce-python/blob/main/docs/notebooks/widget_on_colab.ipynb)


Python API and Jupyter widget facilitating interactive visualization of spatial single-cell data with [Vitessce](https://github.com/vitessce/vitessce).


## Installation

To install with pip:

    $ pip install vitessce[all]

## Getting started

Explore our [example notebooks](./docs/notebooks/).
These contain demos of different use cases and integrations with single-cell data analysis packages.


## Development

For a development installation (requires NodeJS and NPM),

    $ git clone https://github.com/vitessce/vitessce-python.git
    $ cd vitessce-python
    $ conda env create -f environment.yml
    $ conda activate vitessce-python-dev
    $ pip install -e ".[dev,docs,all]"

### Conda environments

In this repository, there are multiple conda environments for different purposes:

- `vitessce-python-dev` (defined in [environment.yml](./environment.yml)) is used for the development of the `vitessce` package itself
- `vitessce-python-notebooks` (defined in [docs/notebooks/environment.yml](./docs/notebooks/environment.yml)) is used for running the example notebooks in the `docs/notebooks/` directory (see [`docs/notebooks/README.md`](./docs/notebooks#readme) for more information)
- `vitessce-python-binder` (defined in [binder/environment.yml](./binder/environment.yml)) is the environment used by Binder upon opening notebooks from this repository

## Linting and testing

```sh
flake8
pytest
```

### Formatting

One file:

```sh
autopep8 --in-place --aggressive ./path/to/file.py
```

All `.py` files:

```sh
find . -name '*.py' -exec autopep8 --in-place --aggressive '{}' \;
```


## Documentation

```sh
make html
```


## Deployment

To deploy a new version, increment the version of the Python package in [`pyproject.toml`](./pyproject.toml).

Then, when you push or merge the code with the incremented versions to `main`, the GitHub Action `deploy.yml` workflow will build and push the package to PyPI.

## Troubleshooting

### Check JavaScript console

Check the JavaScript console in the web browser for error messages. To do so, shift+right click in Jupyter, then click Inspect element. You may need to enable your browser's develop mode in its preferences for this option to appear when you right-click.

### Check your Python environment

Check that you have activated the correct conda or other virtual environment as you expect.
When sharing errors, it can be helpful to share the current versions of packages in the environment, e.g., by `conda list` or `pip list`.

### Restart Kernel and Clear All Outputs, then refresh the browser tab

To ensure that older widget JavaScript output is not causing conflicts with newer JavaScript output (which may persist via notebook outputs even without running notebook cells), clear old outputs by Kernel -> Restart Kernel and Clear All Outputs. Then refresh the browser tab (containing Jupyter) to ensure all JavaScript outputs are fresh.

This is also typically required when running `!pip install vitessce[all]` from within a Jupyter notebook cell in the same session as running `vc.widget()` for the first time.
The Kernel restart/Output clearing is required when a new Jupyter widget is installed in the environment, otherwise Jupyter will not yet recognize the newly-installed widget (as the notebook was opened with a different set of Jupyter widgets installed, and widget discovery is performed only at certain stages in the notebook lifecycle).

### Check the widget configuration

If the widget renders successfully, you can get its current configuration by

```py
vw = vc.widget()
vw
```

```py
vw.config
```

### Usage when Jupyter is running on a remote machine

If Jupyter is running on a remote machine, then use `proxy=True`. You may need to specify `host_name` as well (`widget` should be able to detect this but the plain `display` cannot).

```py
vw = vc.widget(proxy=True)
vw
```

or 

```py
vc.display(proxy=True, host_name="http://localhost:8888")
```

### Ensure that Vitessce and Jupyter are installed in the same environment

With the environment activated, run `pip list` on the command line:

```
Package                       Version
----------------------------- -----------
...
jupyterlab                    3.x.x
...
vitessce                      3.x.x
```





## Resources

- [ipywidget docs: Building a Custom Widget](https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Custom.html)
- [ipywidget docs: Low Level Widget Tutorial](https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Low%20Level.html)
- [ipywidget example: ipyleaflet](https://github.com/jupyter-widgets/ipyleaflet)
- [ipywidget example (with React): ipymaterialui](https://github.com/maartenbreddels/ipymaterialui)
- [ipywidget example (with React): higlass-python](https://github.com/higlass/higlass-python)
- [ipywidget cookiecutter](https://github.com/jupyter-widgets/widget-cookiecutter)
- [Sphinx: Getting Started](https://www.sphinx-doc.org/en/master/usage/quickstart.html)
- [Read the Docs Sphinx Theme](https://github.com/readthedocs/sphinx_rtd_theme)
- [jupyter server proxy](https://jupyter-server-proxy.readthedocs.io/en/latest/arbitrary-ports-hosts.html)

## Getting/Offering Help

If you have a specific bug or feature request, please feel free to open an [issue](https://github.com/vitessce/vitessce-python/issues/new).  Otherwise our [discussions](https://github.com/vitessce/vitessce-python/discussions) section is a great place to get help or offer it.  If you aren't sure if something is a bug or not, don't have all the reproduction steps, or just have a general question, feel free to open a discussion post.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "vitessce",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "ipython, jupyter, widgets",
    "author": null,
    "author_email": "Mark Keller <mark_keller@hms.harvard.edu>",
    "download_url": "https://files.pythonhosted.org/packages/d8/4f/8b66f210c47c14ac1050445266a582513ebc8d8a95963b45dea6f0656e26/vitessce-3.2.6.tar.gz",
    "platform": null,
    "description": "# vitessce-python\n\n[![PyPI](https://img.shields.io/pypi/v/vitessce)](https://pypi.org/project/vitessce)\n[![docs](https://img.shields.io/badge/docs-\ud83d\udcd6-57B4E9.svg)](https://vitessce.github.io/vitessce-python/)\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/vitessce/vitessce-python/main?filepath=docs/notebooks/widget_pbmc.ipynb)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/vitessce/vitessce-python/blob/main/docs/notebooks/widget_on_colab.ipynb)\n\n\nPython API and Jupyter widget facilitating interactive visualization of spatial single-cell data with [Vitessce](https://github.com/vitessce/vitessce).\n\n\n## Installation\n\nTo install with pip:\n\n    $ pip install vitessce[all]\n\n## Getting started\n\nExplore our [example notebooks](./docs/notebooks/).\nThese contain demos of different use cases and integrations with single-cell data analysis packages.\n\n\n## Development\n\nFor a development installation (requires NodeJS and NPM),\n\n    $ git clone https://github.com/vitessce/vitessce-python.git\n    $ cd vitessce-python\n    $ conda env create -f environment.yml\n    $ conda activate vitessce-python-dev\n    $ pip install -e \".[dev,docs,all]\"\n\n### Conda environments\n\nIn this repository, there are multiple conda environments for different purposes:\n\n- `vitessce-python-dev` (defined in [environment.yml](./environment.yml)) is used for the development of the `vitessce` package itself\n- `vitessce-python-notebooks` (defined in [docs/notebooks/environment.yml](./docs/notebooks/environment.yml)) is used for running the example notebooks in the `docs/notebooks/` directory (see [`docs/notebooks/README.md`](./docs/notebooks#readme) for more information)\n- `vitessce-python-binder` (defined in [binder/environment.yml](./binder/environment.yml)) is the environment used by Binder upon opening notebooks from this repository\n\n## Linting and testing\n\n```sh\nflake8\npytest\n```\n\n### Formatting\n\nOne file:\n\n```sh\nautopep8 --in-place --aggressive ./path/to/file.py\n```\n\nAll `.py` files:\n\n```sh\nfind . -name '*.py' -exec autopep8 --in-place --aggressive '{}' \\;\n```\n\n\n## Documentation\n\n```sh\nmake html\n```\n\n\n## Deployment\n\nTo deploy a new version, increment the version of the Python package in [`pyproject.toml`](./pyproject.toml).\n\nThen, when you push or merge the code with the incremented versions to `main`, the GitHub Action `deploy.yml` workflow will build and push the package to PyPI.\n\n## Troubleshooting\n\n### Check JavaScript console\n\nCheck the JavaScript console in the web browser for error messages. To do so, shift+right click in Jupyter, then click Inspect element. You may need to enable your browser's develop mode in its preferences for this option to appear when you right-click.\n\n### Check your Python environment\n\nCheck that you have activated the correct conda or other virtual environment as you expect.\nWhen sharing errors, it can be helpful to share the current versions of packages in the environment, e.g., by `conda list` or `pip list`.\n\n### Restart Kernel and Clear All Outputs, then refresh the browser tab\n\nTo ensure that older widget JavaScript output is not causing conflicts with newer JavaScript output (which may persist via notebook outputs even without running notebook cells), clear old outputs by Kernel -> Restart Kernel and Clear All Outputs. Then refresh the browser tab (containing Jupyter) to ensure all JavaScript outputs are fresh.\n\nThis is also typically required when running `!pip install vitessce[all]` from within a Jupyter notebook cell in the same session as running `vc.widget()` for the first time.\nThe Kernel restart/Output clearing is required when a new Jupyter widget is installed in the environment, otherwise Jupyter will not yet recognize the newly-installed widget (as the notebook was opened with a different set of Jupyter widgets installed, and widget discovery is performed only at certain stages in the notebook lifecycle).\n\n### Check the widget configuration\n\nIf the widget renders successfully, you can get its current configuration by\n\n```py\nvw = vc.widget()\nvw\n```\n\n```py\nvw.config\n```\n\n### Usage when Jupyter is running on a remote machine\n\nIf Jupyter is running on a remote machine, then use `proxy=True`. You may need to specify `host_name` as well (`widget` should be able to detect this but the plain `display` cannot).\n\n```py\nvw = vc.widget(proxy=True)\nvw\n```\n\nor \n\n```py\nvc.display(proxy=True, host_name=\"http://localhost:8888\")\n```\n\n### Ensure that Vitessce and Jupyter are installed in the same environment\n\nWith the environment activated, run `pip list` on the command line:\n\n```\nPackage                       Version\n----------------------------- -----------\n...\njupyterlab                    3.x.x\n...\nvitessce                      3.x.x\n```\n\n\n\n\n\n## Resources\n\n- [ipywidget docs: Building a Custom Widget](https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Custom.html)\n- [ipywidget docs: Low Level Widget Tutorial](https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Low%20Level.html)\n- [ipywidget example: ipyleaflet](https://github.com/jupyter-widgets/ipyleaflet)\n- [ipywidget example (with React): ipymaterialui](https://github.com/maartenbreddels/ipymaterialui)\n- [ipywidget example (with React): higlass-python](https://github.com/higlass/higlass-python)\n- [ipywidget cookiecutter](https://github.com/jupyter-widgets/widget-cookiecutter)\n- [Sphinx: Getting Started](https://www.sphinx-doc.org/en/master/usage/quickstart.html)\n- [Read the Docs Sphinx Theme](https://github.com/readthedocs/sphinx_rtd_theme)\n- [jupyter server proxy](https://jupyter-server-proxy.readthedocs.io/en/latest/arbitrary-ports-hosts.html)\n\n## Getting/Offering Help\n\nIf you have a specific bug or feature request, please feel free to open an [issue](https://github.com/vitessce/vitessce-python/issues/new).  Otherwise our [discussions](https://github.com/vitessce/vitessce-python/discussions) section is a great place to get help or offer it.  If you aren't sure if something is a bug or not, don't have all the reproduction steps, or just have a general question, feel free to open a discussion post.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2020 Gehlenborg Lab  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": "Jupyter widget facilitating interactive visualization of spatial single-cell data with Vitessce",
    "version": "3.2.6",
    "project_urls": {
        "repository": "https://github.com/vitessce/vitessce-python"
    },
    "split_keywords": [
        "ipython",
        " jupyter",
        " widgets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "701f48617a37d38f7a9cb318f84608a5e6645372a92476af8fc80caa440262eb",
                "md5": "b8e23e78f69b7f736d7a947a77bb31f8",
                "sha256": "259c145a56536a70b581c81dd04428a5a0a7e373a24eef193b7cfe9eae09a1e2"
            },
            "downloads": -1,
            "filename": "vitessce-3.2.6-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b8e23e78f69b7f736d7a947a77bb31f8",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 57811,
            "upload_time": "2024-05-01T21:51:43",
            "upload_time_iso_8601": "2024-05-01T21:51:43.969708Z",
            "url": "https://files.pythonhosted.org/packages/70/1f/48617a37d38f7a9cb318f84608a5e6645372a92476af8fc80caa440262eb/vitessce-3.2.6-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d84f8b66f210c47c14ac1050445266a582513ebc8d8a95963b45dea6f0656e26",
                "md5": "6326397a02c4bf645ac56e38b3f80baa",
                "sha256": "19cbbc009513cf4119de3b095d1dc64b27ae26e6ce76949d9efe9f6070e63c67"
            },
            "downloads": -1,
            "filename": "vitessce-3.2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "6326397a02c4bf645ac56e38b3f80baa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 57704,
            "upload_time": "2024-05-01T21:51:45",
            "upload_time_iso_8601": "2024-05-01T21:51:45.643471Z",
            "url": "https://files.pythonhosted.org/packages/d8/4f/8b66f210c47c14ac1050445266a582513ebc8d8a95963b45dea6f0656e26/vitessce-3.2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-01 21:51:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vitessce",
    "github_project": "vitessce-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "vitessce"
}
        
Elapsed time: 0.25650s