Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ingestion vs. Handling #1

Open
dylanmcreynolds opened this issue Jul 13, 2020 · 0 comments
Open

Ingestion vs. Handling #1

dylanmcreynolds opened this issue Jul 13, 2020 · 0 comments
Assignees

Comments

@dylanmcreynolds
Copy link

Currently, the setup.py in this uses the databroker.handler entrypoint to register ingestors. It should be switched to databroker.ingestor.

Along those lines though, talking with @ihumphrey , maybe this repo could serve dual-duty. The repo already exists as a place to put ingestors that have common dependencies that we don't really want in every xicam instance (as discussed with @ronpandolfi ). An ingestor and a handler are distinct, but for common file types, their dependencies will be almost identical. So, for a given type, maybe we can define an ingestor (a generator of documents) and a handler (a callable that provides a numpy array for a given spec.) Maybe a class with both a call and an ingest method? They would be related based on the spec field of the resource document. I ingest tiffs and set resource.spec='TIFF', then 'TIFF' is added to the list of specs that the related handler handles.

FWIW,

Ingestors vs handlers are a little confusing. I know of three distinct use

  1. I have files I want in databroker / mongo. I therefore need a document stream. Create an ingestor, serialize documents. to mongo.
  2. I have files I want to open in xicam, but I don't care about mongo. Create an ingestor to generate a document stream, xicam uses that generator when the user selects a file
  3. I have things that have been ingested into databroker, and that has a spec like "TIFF" or "fccd". Now, I open a dataset in xicam. I registered a handler for that spec already,so it gets invoked when I need to produce a numpy array from the data file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants