Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix install "all extras" for Python 3.12 #1219

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/webknossos-py/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ For extended file format conversation support it is necessary to install the opt
pip install "webknossos[all]"
```

If you have issues with installing the `pylibczirw` package on macOS, try:
For working with Zeiss CZI microscopy data utilizing the`pylibczirw` package run:

```bash
pip install --extra-index-url https://pypi.scm.io/simple/ "webknossos[all]"
pip install --extra-index-url https://pypi.scm.io/simple/ "webknossos[czi]"
```
1 change: 1 addition & 0 deletions webknossos/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ For upgrade instructions, please check the respective _Breaking Changes_ section
### Added

### Changed
Removed the CZI installation extra from `pip install webknossos[all]` by default. Users need to manually install it with `pip install --extra-index-url https://pypi.scm.io/simple/ webknossos[czi]`. [#1219](https://github.com/scalableminds/webknossos-libs/pull/1219)

### Fixed

Expand Down
4 changes: 3 additions & 1 deletion webknossos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ You can install it from [pypi](https://pypi.org/project/webknossos/), e.g. via p
pip install webknossos
```

To install `webknossos` with the depencies for all examples, support for CZI files, and BioFormats conversions, run: `pip install webknossos[all]`.
To install `webknossos` with the dependencies for all examples, support for more file types, and BioFormats conversions, run: `pip install webknossos[all]`.

For working with Zeiss CZI microscopy data use `pip install --extra-index-url https://pypi.scm.io/simple/ webknossos[czi]`.

By default `webknossos` can only distribute any computations through multiprocessing or Slurm. For Kubernetes or Dask install these additional dependencies:

Expand Down
5 changes: 4 additions & 1 deletion webknossos/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ classifiers = [
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries",
"Typing :: Typed",
"Programming Language :: Python :: 3.9",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes
Screenshot 2024-11-22 at 13 38 52

Screenshot 2024-11-22 at 13 40 59

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, shields.io can somehow parse the requires_python argument from the pyprpoject.toml and display a range instead of each version. However, that would not add this info to Pypi.org website where I typicall find it easier to spot at the first glance.

Code: https://img.shields.io/badge/dynamic/json?query=info.requires_python&label=python&url=https%3A%2F%2Fpypi.org%2Fpypi%2Fwebknossos%2Fjson

"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

requires-python = ">=3.9,<3.13"
Expand Down Expand Up @@ -81,7 +85,6 @@ all = [
"webknossos[tifffile]",
"webknossos[imagecodecs]",
"webknossos[bioformats]",
"webknossos[czi]",
"webknossos[examples]",
]

Expand Down
2 changes: 1 addition & 1 deletion webknossos/webknossos/dataset/_utils/pims_czi_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pylibCZIrw import czi as pyczi
except ImportError as e:
raise ImportError(
"Cannot import pylibCZIrw, please install it e.g. using 'webknossos[czi]'"
"Cannot import pylibCZIrw, please install it e.g. using pip install --extra-index-url https://pypi.scm.io/simple/ webknossos[czi]"
) from e

PIXEL_TYPE_TO_DTYPE = {
Expand Down
2 changes: 1 addition & 1 deletion webknossos/webknossos/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ def from_images(

Note:
This method needs extra packages like tifffile or pylibczirw.
Install with `python -m pip install "webknossos[all]"`.
Install with `pip install "webknossos[all]"` and `pip install --extra-index-url https://pypi.scm.io/simple/ "webknossos[czi]"`.
"""

input_upath = UPath(input_path)
Expand Down
Loading