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

Central / automatic read function #7

Open
ssomnath opened this issue Sep 10, 2020 · 1 comment
Open

Central / automatic read function #7

ssomnath opened this issue Sep 10, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ssomnath
Copy link
Member

We need a simple read() function that can figure out which Reader to use when the user does not specify a specific Reader object. For this to be a reality, we need every Reader class to implement the can_read() function. In most cases, this will be trivial, all one would need to do is call __super__ and provide the file extension that this Reader handles.

I have already written a version of this in pycroscopy here. We just need to copy the contents and update some links.

@ssomnath ssomnath added enhancement New feature or request help wanted Extra attention is needed labels Sep 10, 2020
@ssomnath ssomnath self-assigned this Sep 29, 2020
@ssomnath
Copy link
Member Author

This function should simply call upon the top-level modules and ask them for a list of available Reader classes. Alternatively, one could simply go over all and find out which of the objects are Reader classes. The main point is that this function should not need to know the Reader classes individually but just know that there may be many that this function will need to iterate over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants