Fix display parameters#596
Open
dale-wahl wants to merge 1 commit into
Open
Conversation
…layable_parameters moving displayable parameters to dataset class itself; also ensuring type is not set arbitrarily without also setting a `producer_type`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All I wanted to do was get the appropriate parameters of a filtered dataset. In order to properly display a filter's properties, we need to look up that processor that produced it.
get_own_processor? Not here.DataSet.type==BasicProcessor.typeisTrue99% of the time. But a DataSet's type represents the result file and how it is structured (e.g. extension,map_item, etc.). Filters, merge dataset, and a couple other places are processors that manage to create a dataset of a differenttypethen themselves.This goes about codifying this slight difference by an
adopt_typemethod that allows a DataSet's type to be changed while also recording aproducer_typeparameter. We could also fold in any other necessities here if needed. I block settingtypedirectly to avoid issues down the line. While I was at it, I added aget_displayable_parameterswhich is what I was really after that resolves which processortypeto use. I think this is pretty clean and straightforward, but I wanted a PR so it is seen at the very least.Slightly related and possibly a candidate to fold into this:
DataSet.datasource. I honestly did not know we had that. It is essentially thetypeagain but only exists if the DataSet is also a datasource. It does not appear extensively used.