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

Make Dimension.label source of truth for Dimension identity #6262

Merged
merged 7 commits into from
Jun 7, 2024

Conversation

philippjfr
Copy link
Member

Implements #6260

@philippjfr philippjfr added the type: enhancement Minor feature or improvement to an existing feature label Jun 5, 2024
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 17 lines in your changes missing coverage. Please review.

Project coverage is 88.52%. Comparing base (9cc87fe) to head (7b0f15f).
Report is 9 commits behind head on main.

Files Patch % Lines
holoviews/plotting/mixins.py 61.53% 5 Missing ⚠️
holoviews/plotting/mpl/chart.py 69.23% 4 Missing ⚠️
holoviews/plotting/bokeh/graphs.py 0.00% 2 Missing ⚠️
holoviews/plotting/mpl/graphs.py 0.00% 2 Missing ⚠️
holoviews/plotting/util.py 71.42% 2 Missing ⚠️
holoviews/plotting/bokeh/path.py 50.00% 1 Missing ⚠️
holoviews/plotting/plotly/chart.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6262      +/-   ##
==========================================
+ Coverage   88.47%   88.52%   +0.04%     
==========================================
  Files         323      323              
  Lines       67647    67906     +259     
==========================================
+ Hits        59853    60116     +263     
+ Misses       7794     7790       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hoxbro hoxbro added this to the 1.19.0 milestone Jun 6, 2024
Copy link
Member

@hoxbro hoxbro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My rough understanding is that dim.name will be used for data access, e.g., looking up a column in a DataFrame and dim.label will be used by HoloViews for ranges etc. Is this an ok (rough) understanding?

How thoroughly have you checked the codebase for this find and replace? The code still seems to use name for range lookup.

drange = ranges[dimension.name]['data']

return {d.name: element.range(d.name, self.data_range)

Have you checked if hvplot / GeoViews need updating too?

@philippjfr
Copy link
Member Author

Is this an ok (rough) understanding?

Yes.

How thoroughly have you checked the codebase for this find and replace? The code still seems to use name for range lookup.

Clearly not quite thoroughly enough, will do another more exhaustive check now.

Have you checked if hvplot / GeoViews need updating too?

Yes.

@philippjfr
Copy link
Member Author

philippjfr commented Jun 7, 2024

Did miss quite a few. Will scan more thoroughly one more time. Note that this only affects plotting code, so e.g. this isn't affected:

holoviews/holoviews/operation/normalization.py

Line 109 in c8e7f5f

 return {d.name: element.range(d.name, self.data_range) 

@philippjfr
Copy link
Member Author

Okay, quite confident now, thoroughly reviewed the plotting code and replaced all remaining cases.

@philippjfr
Copy link
Member Author

I think the only way we'll catch any more cases will be if we merge and include the change in the RC release.

@hoxbro hoxbro merged commit 346be14 into main Jun 7, 2024
14 checks passed
@hoxbro hoxbro deleted the label_dimension_identity branch June 7, 2024 12:32
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants