{"id":18020667,"url":"https://github.com/vitessce/vitessce-python","last_synced_at":"2025-04-05T17:09:43.940Z","repository":{"id":38094405,"uuid":"292108501","full_name":"vitessce/vitessce-python","owner":"vitessce","description":"Python API and Jupyter widget for Vitessce","archived":false,"fork":false,"pushed_at":"2025-02-03T18:42:59.000Z","size":36689,"stargazers_count":44,"open_issues_count":109,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T16:07:58.461Z","etag":null,"topics":["data-visualization","gehlenborglab","hidivelab","ipywidget","jupyter-widget","jupyterlab-extension","kharchenkolab","single-cell","vitessce"],"latest_commit_sha":null,"homepage":"https://python-docs.vitessce.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitessce.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-01T21:11:52.000Z","updated_at":"2025-03-01T22:41:06.000Z","dependencies_parsed_at":"2024-07-08T23:04:03.257Z","dependency_job_id":"bd7c9896-11ae-43a7-b557-c1575f208318","html_url":"https://github.com/vitessce/vitessce-python","commit_stats":{"total_commits":407,"total_committers":8,"mean_commits":50.875,"dds":"0.22850122850122845","last_synced_commit":"94193c0e20af448c6889b610dc9f9d82a6eec164"},"previous_names":["vitessce/vitessce-jupyter"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitessce%2Fvitessce-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitessce%2Fvitessce-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitessce%2Fvitessce-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitessce%2Fvitessce-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitessce","download_url":"https://codeload.github.com/vitessce/vitessce-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369953,"owners_count":20927928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-visualization","gehlenborglab","hidivelab","ipywidget","jupyter-widget","jupyterlab-extension","kharchenkolab","single-cell","vitessce"],"created_at":"2024-10-30T06:07:03.821Z","updated_at":"2025-04-05T17:09:43.911Z","avatar_url":"https://github.com/vitessce.png","language":"Python","readme":"# 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-📖-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    $ uv sync --extra dev --extra docs --extra all\n\n\n## Linting and testing\n\n```sh\nuv run flake8\nuv run pytest\n```\n\n### Formatting\n\nOne file:\n\n```sh\nuv run autopep8 --in-place --aggressive ./path/to/file.py\n```\n\nAll `.py` files:\n\n```sh\nfind . -name '*.py' -exec uv run autopep8 --in-place --aggressive '{}' \\;\n```\n\n\n## Documentation\n\n```sh\nuv run make 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 -\u003e 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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitessce%2Fvitessce-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitessce%2Fvitessce-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitessce%2Fvitessce-python/lists"}