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

reader_kwargs should differentiate between different readers #1396

Closed
gerritholl opened this issue Oct 13, 2020 · 0 comments · Fixed by #1397
Closed

reader_kwargs should differentiate between different readers #1396

gerritholl opened this issue Oct 13, 2020 · 0 comments · Fixed by #1397

Comments

@gerritholl
Copy link
Collaborator

Feature Request

Is your feature request related to a problem? Please describe.

I'm creating a Scene that contains both ABI L1B and GLM files. I'm experimenting with #1321 and trying to get ABI L1B from a remote filesystem but GLM files locally. This means I need to pass different values for the same keyword argument to the ABI reader than to the GLM reader, in particular a different value for file_system. However, currently the Scene class passes the same reader_kwargs to each reader.

Describe the solution you'd like

I would like an API where the user can specify the reader_kwargs separately for each reader, possibly with an interface like:

Scene(filenames={reader1: files_reader1, reader2: files_reader2}, reader_kwargs={reader1: kwargs_reader1, reader2: kwargs_reader2})

Describe any changes to existing user workflow

This could be implemented with little to no backward compatibility problems, although there may be problems in corner cases. If multiple readers are passed, the Scene class could guess whether the old or new API for reader_kwargs is passed. If the keys for reader_kwargs correspond exactly to the readers and the values are all dictionaries, it can guess that reader_kwargs is very likely provided separately for each reader. It would seem very unlikely that this guess is ever incorrect.

Additional context

A workaround would be for me to create each Scene object separately, then merge them.

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

Successfully merging a pull request may close this issue.

1 participant