Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

BOSS backend #59

Merged
merged 16 commits into from
Mar 5, 2019
Merged

BOSS backend #59

merged 16 commits into from
Mar 5, 2019

Conversation

jstriebel
Copy link
Contributor

@jstriebel jstriebel commented Mar 1, 2019

This PR adds image-data support for the BOSS backend.
I would recommend to review the files in this order:

  • token_repository
  • client
  • models
  • backend

The BOSS API is documented here:
https://docs.theboss.io/docs

TODO

  • replace personal login credentials with scmboy

  • ready for review

fixes #2

follow-up issues #60, #61, #62, #63 (not all important, though)

@jstriebel jstriebel self-assigned this Mar 1, 2019
*(f"{l}:{r}" for l, r in zip(*range_box)),
]
)
async with await self.auth_get(url, token_key) as r:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are multiple dataformats supported:
https://docs.theboss.io/docs/cutout-get#section-getting-data-volumes

I also tried application/blosc-python, which is simpler to implement, but uses pickle internally, which makes it slower. image/jpeg might be an option to save bandwidth, but I think raw data is fine for now. Opinions?

@jstriebel jstriebel marked this pull request as ready for review March 4, 2019 14:44
@jstriebel jstriebel requested a review from fm3 March 4, 2019 14:44
"domain": "https://api.boss.neurodata.io",
"collection": "kasthuri",
"experiment": "kasthuri11",
"username": "jstriebel",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@normanrz I would like to check in one or two datasets, so that there is immediately something to try out. Could you create a user on neurodata.io with scmboy for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

or @hotzenklotz? ^

Copy link
Member

Choose a reason for hiding this comment

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

Hmm. I think it is reasonable to ask people to create an account when they want to use the boss integration. I wouldn't want to put credentials into the repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When using it with wk, one will be asked via the frontend anyways. This one would be rather for development, where I would find it useful if we have one or two demo-datasets in the repo, that are working out-of-the box (for dev & review).
The credentials can not be used for anything, except retrieving data from neurodata.io and possibly exceeding a rate-limit, if there is one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could also read credentials from an gitignored .env file as a fallback. That would make it easier to develop locally without caring about checking in personal credentials by accident or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I implemented the second option now (env vars), this seems quite useful.

Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your explanations in person :)

@jstriebel jstriebel merged commit df2781d into master Mar 5, 2019
@jstriebel jstriebel deleted the boss branch March 5, 2019 13:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for BOSS backend
3 participants