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.
This Pull Request aims at providing an alternative experience for addind a new dataset in the server mode (
cirro serve
) when the server machine has a directory where datasets must be browsed from.Precisely, by providing the option
--datadir <some directory>
tocirro serve
, the text input "URL" is replaced by a select input with the valid datasets within<some directory>
(whether they are first children or not; I usedos.walk
to find all interesting datasets, which can be files or specialy formatted directories such as .zarr ones). The UI looks like this with the new option:I didn't have to change many files to do so, and both my manuel tests and the existing
pytest
tests passed. However, I have two important comments:For most of them, I simply checked for the extension. For Xenium, which accepts the MEX format, I had to add some extra lines of code to verify the extensions of the files that are inside the MEX-candidate, since the MEX directory properly said has no special extension. Feel free to inspect
cirrocumulus/api.py
to see if the included logic seems fine.