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

allow data source to accept input from another data source #42

mikofski opened this Issue Jul 29, 2016 · 1 comment


None yet
1 participant

mikofski commented Jul 29, 2016

suppose we have django model reader, but we want a file field from the model. How do we open and read the file.

  • a django model file field hdf5 reader? - this requires several nearly identical reader for each file type. what if a django model has more one file field with maybe even different types
  • file readers that can take input from another data source? - this seems likely
  • a data source field that calls a data reader? - unlikely solution, how would this work? would it create a new separate data source or add data to the current data source?

@mikofski mikofski self-assigned this Jul 29, 2016

@mikofski mikofski changed the title from make file readers abstract or allow readers to nest somehow to allow data source to accept input from another data source Aug 1, 2016


This comment has been minimized.


mikofski commented Mar 8, 2017

how about adding an attribute to the DataParameter() that points to a related data source - IE the source that defines the data itself

class RelatedData(DataSource):
    axis_tilt = DataParameter(units='deg')
    gcr = DataParameter()

    class Meta:
        data_reader = RelatedDataReader
        related_data = MyData

class MyData(DataSource):
    layout = DataParameter(related_data=RelatedData)
    other_data = DataParameter()

Now when MyData is read, it will pass the contents of layout to RelatedData to parse

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