Skip to content
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
8 changes: 5 additions & 3 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ jobs:
CIBW_ENVIRONMENT_LINUX: >
LD_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64:$LD_LIBRARY_PATH"
NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CMAKE_ARGS="-DREQUIRE_ALLEXTRAS=ON"
CIBW_ARCHS: auto64
CIBW_TEST_REQUIRES: numpy pandas pyarrow pytest bfio imagecodecs
CIBW_TEST_COMMAND: pytest -vv {project}/tests/python
Expand Down Expand Up @@ -448,6 +449,7 @@ jobs:
CIBW_ENVIRONMENT_LINUX: >
LD_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64:$LD_LIBRARY_PATH"
NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CMAKE_ARGS="-DREQUIRE_ALLEXTRAS=ON"
CIBW_ARCHS: auto64
CIBW_TEST_REQUIRES: numpy pandas pyarrow pytest bfio imagecodecs
CIBW_TEST_COMMAND: pytest -vv {project}/tests/python
Expand Down Expand Up @@ -506,7 +508,7 @@ jobs:
CIBW_BUILD: ${{ matrix.cibw_build }}-*
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_ALL_WINDOWS: xcopy /E /I /y local_install C:\TEMP\nyxus_bld\local_install
CIBW_ENVIRONMENT_WINDOWS: PATH="C:\\TEMP\\nyxus_bld\\local_install\\bin;$PATH" NYXUS_DEP_DIR="C:\\TEMP\\nyxus_bld\\local_install"
CIBW_ENVIRONMENT_WINDOWS: PATH="C:\\TEMP\\nyxus_bld\\local_install\\bin;$PATH" NYXUS_DEP_DIR="C:\\TEMP\\nyxus_bld\\local_install" CMAKE_ARGS="-DREQUIRE_ALLEXTRAS=ON"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
CIBW_ARCHS: auto64
CIBW_TEST_REQUIRES: numpy pandas pyarrow pytest bfio imagecodecs
Expand Down Expand Up @@ -579,7 +581,7 @@ jobs:
LDFLAGS="-isysroot $SDKROOT -lc++ -lc++abi -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
PIP_ONLY_BINARY="imagecodecs"
ARROW_HAVE_LIBATOMIC=OFF
CMAKE_ARGS="-DUSE_STATIC_ARROW=ON"
CMAKE_ARGS="-DUSE_STATIC_ARROW=ON -DREQUIRE_ALLEXTRAS=ON"
REPAIR_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64"
NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
Expand Down Expand Up @@ -655,7 +657,7 @@ jobs:
CMAKE_C_COMPILER="$CC" CMAKE_CXX_COMPILER="$CXX"
CXXFLAGS="-isysroot $SDKROOT -stdlib=libc++"
LDFLAGS="-isysroot $SDKROOT -lc++ -lc++abi"
CMAKE_ARGS="-DUSE_STATIC_ARROW=ON"
CMAKE_ARGS="-DUSE_STATIC_ARROW=ON -DREQUIRE_ALLEXTRAS=ON"
REPAIR_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64"
NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:
CIBW_BEFORE_ALL_LINUX: dnf -y install llvm libevent-devel openssl-devel &&
mkdir -p /tmp/nyxus_bld &&
cp -a local_install /tmp/nyxus_bld
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64:$LD_LIBRARY_PATH" NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64:$LD_LIBRARY_PATH" NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install" CMAKE_ARGS="-DREQUIRE_ALLEXTRAS=ON"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_REQUIRES: numpy pandas pyarrow pytest bfio imagecodecs
CIBW_TEST_COMMAND: pytest {project}/tests/python
Expand Down Expand Up @@ -271,7 +271,7 @@ jobs:
CIBW_BEFORE_ALL_LINUX: dnf -y install llvm libevent-devel openssl-devel &&
mkdir -p /tmp/nyxus_bld &&
cp -a local_install /tmp/nyxus_bld
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64:$LD_LIBRARY_PATH" NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64:$LD_LIBRARY_PATH" NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install" CMAKE_ARGS="-DREQUIRE_ALLEXTRAS=ON"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_REQUIRES: numpy pandas pyarrow pytest bfio imagecodecs
CIBW_TEST_COMMAND: pytest {project}/tests/python
Expand Down Expand Up @@ -335,7 +335,7 @@ jobs:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_ALL_WINDOWS: xcopy /E /I /y local_install C:\TEMP\nyxus_bld\local_install
CIBW_ENVIRONMENT_WINDOWS: PATH="C:\\TEMP\\nyxus_bld\\local_install\\bin;$PATH" NYXUS_DEP_DIR="C:\\TEMP\\nyxus_bld\\local_install"
CIBW_ENVIRONMENT_WINDOWS: PATH="C:\\TEMP\\nyxus_bld\\local_install\\bin;$PATH" NYXUS_DEP_DIR="C:\\TEMP\\nyxus_bld\\local_install" CMAKE_ARGS="-DREQUIRE_ALLEXTRAS=ON"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_REQUIRES: numpy pandas pyarrow pytest bfio imagecodecs
Expand Down Expand Up @@ -416,7 +416,7 @@ jobs:
LDFLAGS="-isysroot $SDKROOT -lc++ -lc++abi -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
PIP_ONLY_BINARY="imagecodecs"
ARROW_HAVE_LIBATOMIC=OFF
CMAKE_ARGS="-DUSE_STATIC_ARROW=ON"
CMAKE_ARGS="-DUSE_STATIC_ARROW=ON -DREQUIRE_ALLEXTRAS=ON"
REPAIR_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64"
NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
Expand Down Expand Up @@ -503,7 +503,7 @@ jobs:
CXXFLAGS="-isysroot $SDKROOT -stdlib=libc++ -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
LDFLAGS="-isysroot $SDKROOT -lc++ -lc++abi -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
ARROW_HAVE_LIBATOMIC=OFF
CMAKE_ARGS="-DUSE_STATIC_ARROW=ON"
CMAKE_ARGS="-DUSE_STATIC_ARROW=ON -DREQUIRE_ALLEXTRAS=ON"
REPAIR_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64"
NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
Expand Down
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ option(USE_ARROW "Use Arrow" OFF)
option(USE_STATIC_ARROW "Link Arrow/Parquet statically and keep their symbols private (macOS)" OFF)
option(ALLEXTRAS "Building with all I/O support" OFF)
option(NOEXTRAS "Building with Only Tiff and Pybind11(For Python package)" ON)
option(REQUIRE_ALLEXTRAS "Fail the configure when an ALLEXTRAS part is unavailable" OFF)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake-modules")

Expand Down Expand Up @@ -502,6 +503,20 @@ message(STATUS "Z5 | ${Z5_REQUESTED} | ${USE_Z5}")
message(STATUS "Arrow | ${ARROW_REQUESTED} | ${USE_ARROW}")
message(STATUS "Dicom | ${DCMTK_REQUESTED} | ${USE_DCMTK}")
message(STATUS "CUDA | ${CUDA_REQUESTED} | ${USEGPU}")

# Release wheels set this, so that none of them can ship without a file format.
if(REQUIRE_ALLEXTRAS)
set(NYXUS_PARTS_OFF "")
foreach(part USE_Z5 USE_ARROW USE_DCMTK)
if(NOT ${part})
list(APPEND NYXUS_PARTS_OFF ${part})
endif()
endforeach()
if(NYXUS_PARTS_OFF)
message(FATAL_ERROR "REQUIRE_ALLEXTRAS is set and these parts are off: ${NYXUS_PARTS_OFF}")
endif()
endif()

## Running Tests
if (RUN_GTEST)
# Download and unpack googletest at configure time
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ conda install nyxus -c conda-forge
```

The conda-forge package has no build for Apple Silicon Macs or Linux aarch64; use `pip` there.
On Windows, the PyPI wheels do not read OME-Zarr or compressed NIfTI (`.nii.gz`), and the
conda-forge packages of 0.11.0 need Visual Studio installed (they were built in Debug mode).
On Windows, the PyPI wheels older than 0.12.0 do not read OME-Zarr or compressed NIfTI
(`.nii.gz`), and the conda-forge packages of 0.11.0, 0.12.0 and 0.12.1 need Visual Studio installed
(they were built in Debug mode).
GPU wheels, the Docker image and building from source are described in
[Installation](https://nyxus.readthedocs.io/en/latest/installation.html).

Expand Down
18 changes: 1 addition & 17 deletions ci-utils/install_prereq_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,6 @@ popd
popd

if "%BUILD_Z5_DEP%" == "1" (
for /l %%x in (1, 1, 5) do (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why are we dropping these instead of updating the URL?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Answered The URL mixes two versions (release/1.79.0/source/boost_1_88_0.zip) and returns 404, so the 0.12.0 and 0.12.1 Windows wheels were already built without Boost, and they read OME-Zarr and .nii.gz. z5 3.0.1 and Arrow 20 build without it, so a corrected URL would add a full Boost build for no change in the wheels.

curl -L https://archives.boost.io/release/1.79.0/source/boost_1_88_0.zip -o boost_1_88_0.zip
if exist boost_1_88_0.zip (
goto :continue_boost
)
)
:continue_boost
tar -xf boost_1_88_0.zip
pushd boost_1_88_0
call bootstrap.bat
.\b2 headers --prefix=../local_install
.\b2 -j %NUMBER_OF_PROCESSORS% variant=release link=shared runtime-link=shared threading=multi install --prefix=../local_install
xcopy /E /I /y boost ..\local_install\include\boost
popd

curl -L https://github.com/Blosc/c-blosc/archive/refs/tags/v1.21.6.zip -o v1.21.6.zip
tar -xf v1.21.6.zip
pushd c-blosc-1.21.6
Expand Down Expand Up @@ -106,7 +91,6 @@ if "%BUILD_Z5_DEP%" == "1" (
)


set _ROOTDIR=%ROOTDIR:\=/%
if "%BUILD_ARROW%" == "1" (

curl -L https://github.com/apache/arrow/archive/refs/tags/apache-arrow-20.0.0.zip -o arrow-apache-arrow-20.0.0.zip
Expand All @@ -115,7 +99,7 @@ if "%BUILD_ARROW%" == "1" (
pushd cpp
mkdir build
pushd build
cmake .. -A x64 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_INSTALL_PREFIX=../../../local_install/ -DCMAKE_PREFIX_PATH=%ABS_INSTALL% -DARROW_PARQUET=ON -DARROW_WITH_SNAPPY=ON -DARROW_BUILD_TESTS=OFF -DBOOST_ROOT=%_ROOTDIR%/boost_1_88_0
cmake .. -A x64 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_INSTALL_PREFIX=../../../local_install/ -DCMAKE_PREFIX_PATH=%ABS_INSTALL% -DARROW_PARQUET=ON -DARROW_WITH_SNAPPY=ON -DARROW_BUILD_TESTS=OFF
cmake --build . --config Release --target install --parallel 4
popd
popd
Expand Down
7 changes: 6 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
for line in _f if line.startswith('version:'))
version = '.'.join(release.split('.')[:2])

# Read the Docs builds a tag from the release it names and every other version from a branch,
# which runs ahead of the latest release. The index page states which of the two it describes.
if os.environ.get('READTHEDOCS_VERSION_TYPE') == 'tag':
tags.add('release_docs')


# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -61,7 +66,7 @@
# -- Options for HTML output -------------------------------------------------

html_theme = 'pydata_sphinx_theme'
# The pages describe the development head, not a release, so the title carries no version number.
# The index page states the version the pages describe, so the title carries no version number.
html_title = 'Nyxus'
html_theme_options = {
'github_url': 'https://github.com/PolusAI/nyxus',
Expand Down
7 changes: 5 additions & 2 deletions docs/source/devguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1214,8 +1214,11 @@ Documentation
-------------

The documentation is a Sphinx site in ``docs/source``. It does not need the compiled module:
``conf.py`` mocks ``nyxus.backend``. The pages describe the development head, so their title
carries no version number.
``conf.py`` mocks ``nyxus.backend``. The title carries no version number; the index page states
the version instead. ``conf.py`` reads the latest release from ``CITATION.cff`` into ``|release|``.
A Read the Docs build of a tag (``READTHEDOCS_VERSION_TYPE=tag``) says it describes that release,
and every other build, a local one included, says it describes the development version newer than
it.

Building
^^^^^^^^
Expand Down
11 changes: 11 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ volumes and 6 image quality features. It runs from the command line or from Pyth
TIFF, OME-TIFF, OME-Zarr, NIfTI and DICOM files (OME-TIFF and OME-Zarr with up to five
dimensions), and assembles ROIs that span several image tiles.

.. only:: release_docs

This documentation describes Nyxus |release|.

.. only:: not release_docs

This documentation describes the development version of Nyxus on the ``main`` branch, which
is newer than the latest release, |release|. Features and options added since |release| are
not in the packages on PyPI and conda-forge until the next release; :doc:`release_notes` lists
what each release contains.

ROIs larger than the memory budget are processed out of core when they come from files; which
features then keep their in-memory values is listed under :ref:`large-images`.

Expand Down
18 changes: 8 additions & 10 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ The PyPI wheels are built for CPython 3.10, 3.11, 3.12 and 3.13 on these platfor
PyPI has no source distribution, so where no wheel fits, ``pip`` falls back to an older release
without a warning, or stops with ``No matching distribution found for nyxus``:

* Release 0.11.0 has no wheel for CPython 3.13 on Linux x86_64, so ``pip install nyxus`` installs
0.10.0 there. Use Python 3.10 to 3.12, conda-forge or a source build to get 0.11.0. This is a known
issue (`#525 <https://github.com/PolusAI/nyxus/issues/525>`__).
* On Linux with a glibc older than 2.28 (for example CentOS 7 or Ubuntu 18.04), ``pip`` installs
0.8.3, the last release built for ``manylinux2014``, on x86_64 with Python 3.8 to 3.12, and an
even older release with Python 3.6 or 3.7. With Python 3.13 or on aarch64 it stops with ``No
Expand Down Expand Up @@ -82,7 +79,7 @@ output, in addition to TIFF, OME-TIFF and NIfTI. They also read OME-Zarr and com

* The Windows wheels on PyPI (``nyxus`` 0.9.3 and 0.11.0, and ``nyxus-cuda12x`` 0.9.3) were built
without OME-Zarr support, and so without ``.nii.gz``: they refuse OME-Zarr and fail on
``.nii.gz`` files. This is a known issue (`#527 <https://github.com/PolusAI/nyxus/issues/527>`__).
``.nii.gz`` files. The ``nyxus`` Windows wheels of 0.12.0 and later read both.
* The first conda-forge Windows builds of 0.11.0 (build number 0, a build string ending in ``_0``
in ``conda list nyxus``) read none of OME-Zarr, ``.nii.gz`` and DICOM; conda installs one of
them into an environment that holds ``libarrow`` 19 or 20.
Expand All @@ -92,8 +89,8 @@ libraries it finds (see `Building from source`_).

.. warning::

The conda-forge Windows packages of 0.11.0 were built in Debug mode: their extension module
imports the Visual Studio debug runtime (``MSVCP140D.dll``, ``VCRUNTIME140D.dll``,
The conda-forge Windows packages of 0.11.0, 0.12.0 and 0.12.1 were built in Debug mode: their
extension module imports the Visual Studio debug runtime (``MSVCP140D.dll``, ``VCRUNTIME140D.dll``,
``ucrtbased.dll``), which only an installation of Visual Studio provides, not the Visual C++
redistributable. Without Visual Studio, ``import nyxus`` fails. This is a known issue
(`#528 <https://github.com/PolusAI/nyxus/issues/528>`__).
Expand Down Expand Up @@ -337,10 +334,6 @@ Getting the dependencies
uses for ``.zip`` files. The script does not stop when a step fails, so check its output for
errors before building.

The script's Boost download, in its OME-Zarr part, currently fails: the URL returns HTTP
404. The Windows release wheels built with the script since 0.9.3 have no OME-Zarr support.
This is a known issue (`#527 <https://github.com/PolusAI/nyxus/issues/527>`__).

The dependency DLLs in ``local_install\bin`` must be on ``PATH`` when you run the
command-line program. Python does not search ``PATH`` for an extension module's DLLs, so in
Python call ``os.add_dll_directory(r"<source tree>\local_install\bin")`` before
Expand Down Expand Up @@ -403,6 +396,11 @@ CMake options
- ``OFF``
- Turns ``USE_Z5``, ``USE_DCMTK`` and ``USE_ARROW`` on. It takes precedence over
``NOEXTRAS``. ``setup.py`` always passes it.
* - ``REQUIRE_ALLEXTRAS``
- ``OFF``
- Stops the configure with an error when ``USE_Z5``, ``USE_DCMTK`` or ``USE_ARROW`` is off.
Without it, a part whose libraries are missing is dropped with a warning. The ``nyxus``
wheels on PyPI are built with it; the ``nyxus-cuda11x`` and ``nyxus-cuda12x`` wheels are not.
* - ``USE_Z5``
- ``OFF``
- OME-Zarr input. Also enables compressed NIfTI (``.nii.gz``), which needs the zlib that this
Expand Down
2 changes: 1 addition & 1 deletion docs/source/supported_formats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ run with that error.

OME-Zarr and DICOM support are optional parts of a source build (see the CMake options in
:doc:`installation`). The PyPI and conda packages include both, except that the Windows wheels
on PyPI have no OME-Zarr support since 0.9.3, and the first conda-forge Windows builds of
on PyPI of 0.9.3 and 0.11.0 have no OME-Zarr support, and the first conda-forge Windows builds of
0.11.0 (build number 0) have neither. Reading ``.nii.gz`` needs zlib, which a build includes
together with OME-Zarr support, so those packages do not read ``.nii.gz`` either.

Expand Down
4 changes: 2 additions & 2 deletions docs/source/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ A build without an optional part refuses its files or outputs:
available. Please install Nyxus with Arrow enabled to use this functionality.`` and the call
raises ``RuntimeError``.

The PyPI and conda packages include all of them, except that the Windows wheels on PyPI have no
OME-Zarr support since 0.9.3 (see :doc:`installation`). The first conda-forge Windows builds of
The PyPI and conda packages include all of them, except that the Windows wheels on PyPI of 0.9.3
and 0.11.0 have no OME-Zarr support (see :doc:`installation`). The first conda-forge Windows builds of
0.11.0 (build number 0) also lack OME-Zarr, ``.nii.gz`` and DICOM; conda installs one of them into
an environment that holds ``libarrow`` 19 or 20.
:ref:`installation-check` shows how to check a build.
Expand Down
Loading