Update/dash 3d image partitioning - #802
Open
budescode wants to merge 4 commits into
Open
Conversation
Declare the ten direct dependencies in pyproject.toml, lock with uv and regenerate requirements.txt from uv.lock so pip users still work. Bump dash 1.14.0 -> 4.4.1, plotly 4.8.2 -> 7.0.0, numpy 1.18.5 -> 2.5.2, scikit-image 0.17.2 -> 0.26.0, nilearn 0.6.2 -> 0.14.1, nibabel 3.1.0 -> 5.4.2, cairosvg 2.4.2 -> 2.9.0, Pillow 8.2.0 -> 12.3.0 and gunicorn 20.0.4 -> 26.2.0. Python 3.12 or newer is required. Install the plotly-common helper modules as part of the project so PYTHONPATH is no longer needed. Ignore .venv.
Import html and dcc from dash, call app.run instead of the removed app.run_server, use nibabel's get_fdata in place of the removed get_data, pass channel_axis=None to slic instead of the removed multichannel argument, and import ImageUriValidator from its new location in _plotly_utils.
run_dev.py starts the dev server with LOAD_SUPERPIXEL set and, on Apple Silicon, the Homebrew library path cairosvg needs. It works the same on any OS. run_app.sh sets the same library path and starts gunicorn via python -m, because the venv's gunicorn wrapper is a /bin/sh script when the path contains spaces and macOS strips DYLD_* variables when launching system binaries.
Install the cairo system library via brew, apt or dnf, create the environment in .venv with the built-in venv module instead of virtualenv, require Python 3.12 or newer, run pip as python -m pip so it cannot fall through to a global install, and make the abort guards actually exit. Update the README setup and run instructions to match.
Author
|
@robertclaus Please can you review? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for app: none (dependency update, no linked issue)
App pull request
About
Brings dash-3d-image-partitioning from its 2020 dependencies to current
versions and makes it installable with uv or pip from a fresh clone.
regenerates requirements.txt from uv.lock. Python 3.12 or newer.
scikit-image 0.17.2 -> 0.26.0, nilearn 0.6.2 -> 0.14.1,
nibabel 3.1.0 -> 5.4.2, cairosvg 2.4.2 -> 2.9.0, Pillow 8.2.0 -> 12.3.0
and gunicorn 20.0.4 -> 26.2.0.
from dash import html, dcc,app.run, nibabelget_fdata, scikit-imagechannel_axis, and the newlocation of plotly's
ImageUriValidator.PYTHONPATHis no longer needed.run_dev.py, a cross-platform launcher that setsLOAD_SUPERPIXELand, on Apple Silicon, the Homebrew library path cairosvg needs.
run_app.shset the same path and start gunicorn viapython -m../setup: installs the cairo system library, uses the built-invenvmodule in.venv, checks the Python version, and actually abortswhen it says it will.
Cairo remains a native dependency. It is installed by
./setupon macOS,Debian/Ubuntu and Fedora. Windows is not covered.
Workflow
elements necessary for successful deployment are in place.
existing gallery app, I've summarized the changes requested in the
appropriate Streambed issue and confirm that they have been applied.
the GitHub repository for the source code in the portal description.
DashR gallery, the app in this PR mimics, as closely as possible,
the style and functionality of the existing app.
assets/folder.The pre-review review
I have addressed all of the following questions:
any dead and/or irrelevant code.)
readable and, where it isn't, it has been commented appropriately.)
lessen the volume of code that needs to be maintained.)
Post PR (at merge time)
#patch- An app has been updated or fixed#minor- A new app has been added, or an app has been significantly reworked#major- Breaking changes, make sure to discuss with dash-core before using this tag