Closed Lencripe closed 10 months ago
@DragaDoncila Please review.
Also @jni you probs want to review (and approve workflow π )
I don't love that napari.yaml got reformatted too... Do you know what tool did that? (It shouldn't be yapf but I don't actually know.)
Sorry, wrong button π
The tests are failing because you need to move the tensorstore dependency from install_requires
to options.extras_require / testing
, rather than deleting it. After that I think this is ready to go!
Hi Juan I initially tried to change the syntax of the code using my IDE however I later realised it wasn't using the yapf formatter so that may explain the changes made to the napery.yaml file. I have however reverted those changes by checking out the napari.yaml from an earlier commit.
I spent sometime yesterday reading through pre-commit's documentation and I finally managed to fix my weird error π₯³which as it turns out was not related to pre-commit at all π however the information I learnt should be useful when I start working on the pre-commit & GitHub actions for Napari-graph.I've also moved tensorstore dependency to testing so hopefully the tests pass this time π€πΎ.
Hmmm, ok, so it looks like there's more changes to be made. Sorry, I am not very familiar with tox, which is used by the cookiecutter template for plugins to set up all of the testing configurations. So right now it only installs the dependencies, not the testing dependencies. That's a problem! π
In order to get the extras, you can add an extras =
testing
to tox.ini
, as done in napari here:
https://github.com/napari/napari/blob/c871c319247b79d4c5cc9270c0fec04740aed9d0/tox.ini#L79-L83
Another issue is that the solution isn't quite what we're after: we don't want to have open_tensorstore
not use tensorstore. What we want is the following:
open_zarr
function that does the same thing as open tensorstore, but with zarr.import tensorstore
at the top of the file, which will fail if a user doesn't have tensorstore installed, move the import inside the open_tensorstore
function, using this pattern:try:
import tensorstore
except ModuleNotFoundError as e:
msg = 'You must install the optional tensorstore library to open a zarr file with it.'
raise ModuleNotFoundError(msg) from e
Does this all make sense?
I think this PR is superseded by https://github.com/jni/zarpaint/pull/44. We can probably safely close this now.
Thank you for all your early work pushing this forward @Lencripe, it is much appreciated
Indeed, and thanks @GenevieveBuckley for the reminder here. π
Tensorstore not required after the zarr update.