Skip to content

feat: Handle FMS (/allen/programs) paths - #508

Open
ShrimpCryptid wants to merge 2 commits into
mainfrom
fix/handle-fms-paths
Open

ShrimpCryptid wants to merge 2 commits into
mainfrom
fix/handle-fms-paths

Conversation

@ShrimpCryptid

Copy link
Copy Markdown
Contributor

Problem

Adds support for remapping FMS paths to their S3 bucket equivalent.
Estimated review size: tiny, 5 minutes

@toloudis toloudis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, both my comments are nits

});

it("maps FMS file paths", () => {
expect(remapUri("/allen/programs/allencell/data/proj0/folder/some-data.ome.zarr")).toBe(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is it possible someone coming from a Windows'y world would put this in with a double-forward-slash at the beginning? or do we handle that elsewhere?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We do handle this in vole-app currently, yes. I could also copy in the code that handles that if we want to repeat it in both places.

Comment thread src/utils/url_utils.ts Outdated
// remap /allen/aics/... to https://vast-files.int.allencell.org/...
newUrl = newUrl.replace(VAST_FILES_PREFIX, VAST_FILES_URL);
} else if (newUrl.startsWith(FMS_FILES_PREFIX)) {
// remap /allen/programs/allencell/data/proj0/... to https://s3.us-west-2.amazonaws.com/production.files.allencell.org/...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this comment is really adding value 🥲 . I might consider "remap absolute FMS filepaths to urls", and even with that, it's kinda easy to get that from what the code says.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data-loading enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants