-
Notifications
You must be signed in to change notification settings - Fork 26
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
Dimension links #469
Dimension links #469
Conversation
For linking later.
- Replace alias range dimension test with self-link test. - Test RangeDimension -> DataArray link
Deprecation warning FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
For both Range and Set dimensions
Using group redirect method is unnecessary for SampledDimensions since they don't support linking
Return unit directly for DataArray links. Return unit of indexed column for DataFrame links.
Return label directly for DataArray links. Return name of indexed column for DataFrame links.
- Removed DataFrameDimension class. - Removed all mentions of alias range dimension from DataArray. - Removed associated tests and test sections.
Should not be negative either.
Should not have negative values except one -1.
This pull request introduces 1 alert when merging f1aeb40 into 2e6491f - view on LGTM.com new alerts:
|
ae34032
to
d669f77
Compare
d669f77
to
7677c6e
Compare
This pull request introduces 1 alert when merging 7677c6e into 2e6491f - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks very nice to me!
one point:
- we do have the same need for such linking on the feature and I wonder, whether some of the DimensionLink class functionality should go into a common superclass for DimensionLinks and Feature Links, the first needs the index, the latter the link_type (tagged, untagged, indexed)
did not think about it but do we need the invalidUnit import in DataArray?
Good idea. Some low level functionality could go there, like all the underlying attribute access methods. It might also fix the import cycle issue and let us instantiate the data object through the dimension link, but I'll have to think about it more and then try it. I'd like to do this in a followup PR though.
We used to need it for the AliasRangeDimension, since having a non SI unit in a dimension wasn't supported at some point. I think we allow it now, just not scaling. Anyway, cleaned out all Unused vars and imports now. |
This pull request introduces 1 alert when merging 8d84599 into 2e6491f - view on LGTM.com new alerts:
|
Can now write through to the linked data object when setting label and unit on RangeDimension: - RangeDimension ticks cannot be changed. - RangeDimension label linked to DataArray changes the DataArray label. - RangeDimension label linked to DataFrame raises error: The column name of a DataFrame can't be changed since it's the name of a field of a compound data type, which we can't change. - RangeDimension unit linked to DataArray changes the DataArray unit. - RangeDimension unit linked to DataFrame changes the DataFrame column unit. - SetDimension labels cannot be changed.
pylint warning codes W0611: Unused import W0612: Unused variable
8d84599
to
86bdee5
Compare
d538ed8
to
e1558d6
Compare
e1558d6
to
0ab71e7
Compare
Implements DimensionLink as discussed in G-Node/nix#824 (closes #466).
Some notes and points for discussion:
link
. Therefore, a dimension with a linked object has the following path:/data/<block name>/data_arrays/<array name>/dimensions/<dim number>/link/<linked object id>
ticks
orlabel
of a RangeDimension that links to a DataArray be modifiable through the RangeDimension object?None
index, for linking to the entire DataFrame. We initially supported this in the DataFrameDimension implementation, but now this ability or an analogous one isn't supported. I think we agreed on this in our discussion, but I wanted to make sure I'm remembering correctly.