When we started development of AFMSlicer it required us to use the in-development version of TopoStats which was
undergoing refactoring to introduce dataclasses. This is a bottleneck because cloning the TopoStats
repository requires downloading 1.10Gb of data1.
These have now been merged into main and a release made to the Python Package Index
(PyPI). Here the source files and built wheels are ~240kb which is significantly
smaller than cloning the whole repository and so will install faster (but with a caveat, see below!)
As such we should now be able to switch out relying on installing TopoStats from GitHub to instead use the version on
PyPI which will increase the install time.
Changes
Current in pyproject.toml we have...
dependencies = [
...
"topostats @ git+https://github.com/AFM-SPM/TopoStats",
...
]
We will require the Topostats >=2.4.2 version as a minimum and so we should switch to...
dependencies = [
...
"topostats>=2.4.2",
...
]
Caveat
The caveat here is that TopoStats pulls in a dependency of Tensorflow which is used for
unet classification of entangled molecules (if I remember correctly!). The pre-built wheels/binaries for Tensorflow are
themselves considerable in size (typically around ~590Mb!) and so these still require downloading and installing even
though we have reduced the download required to install TopoStats itself. I have in the past suggested that this
dependency be broken out and made optional (see 916 Split ML functionality into optional
dependencies) and will investigate doing so to improve the user
experience of installing AFMSlicer (and in turn napari-AFMSlicer) as currently Tensorflow is not required by AFMSlicer
at all.
When we started development of AFMSlicer it required us to use the in-development version of TopoStats which was
undergoing refactoring to introduce dataclasses. This is a bottleneck because cloning the TopoStats
repository requires downloading 1.10Gb of data1.
These have now been merged into
mainand a release made to the Python Package Index(PyPI). Here the source files and built wheels are ~240kb which is significantly
smaller than cloning the whole repository and so will install faster (but with a caveat, see below!)
As such we should now be able to switch out relying on installing TopoStats from GitHub to instead use the version on
PyPI which will increase the install time.
Changes
Current in
pyproject.tomlwe have...We will require the Topostats
>=2.4.2version as a minimum and so we should switch to...Caveat
The caveat here is that TopoStats pulls in a dependency of Tensorflow which is used for
unet classification of entangled molecules (if I remember correctly!). The pre-built wheels/binaries for Tensorflow are
themselves considerable in size (typically around ~590Mb!) and so these still require downloading and installing even
though we have reduced the download required to install TopoStats itself. I have in the past suggested that this
dependency be broken out and made optional (see 916 Split ML functionality into optional
dependencies) and will investigate doing so to improve the user
experience of installing AFMSlicer (and in turn napari-AFMSlicer) as currently Tensorflow is not required by AFMSlicer
at all.
Footnotes
At various points in development files were mistakenly included in the repository history, there has been a
long-standing issue to remove this bloat which saw some
attention @tobyallwood but it was never merged to
mainto actually remove the bloat. ↩