-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Move AxisArtistHelpers to toplevel. #20214
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
Conversation
I'm not sure if |
I'm just trying to be consistent with GridHelper, which puts them at the end. But I don't have a strong opinion either way... |
Rebased on top of #22314. |
Doc warnings are related to the change, namely that the subclasses have references to (new) superclasses which are private and undocumented. Perhaps can simply be added to the ignore list, but should be addressed somehow |
The axisartist has a concept of "axis_artist_helper", which computes various computations to draw slanted/curved axises. Confusingly, `AxisArtistHelper` (and likewise `AxisArtistHelperRectlinear`) do *not* define such helper classes; they are simply namespaces that hold the `{AxisArtistHelper,AxisArtistHelperRectlinear}.{Fixed,Floating}` nested classes which *do* define helpers. More specifically, `AxisArtistHelper.{Fixed,Floating}` act as abstract base classes for `AxisArtistHelperRectlinear.{Fixed,Floating}` which are actually usable. In order to slightly disentangle this move the actual helper classes to the toplevel (as `_{Fixed,Floating}AxisArtistHelperBase` and `_{Fixed,Floating}AxisArtistHelperRectlinear`), keeping the old "purely namespace" classes around for backcompat. (But note that end users should never have to directly interact with these classes anyways -- normally, they only construct GridHelpers which take care of the interaction with AxisArtistHelpers; see e.g. the various axisartist examples.) More simply, this commit simply dedents most of the definitions of the Helper classes.
Fixed; the remaining doc build warning seems unrelated (failure to get the version switcher). |
The axisartist has a concept of "axis_artist_helper", which computes
various computations to draw slanted/curved axises. Confusingly,
AxisArtistHelper
(and likewiseAxisArtistHelperRectlinear
) do notdefine such helper classes; they are simply namespaces that hold the
{AxisArtistHelper,AxisArtistHelperRectlinear}.{Fixed,Floating}
nestedclasses which do define helpers. More specifically,
AxisArtistHelper.{Fixed,Floating}
act as abstract base classes forAxisArtistHelperRectlinear.{Fixed,Floating}
which are actually usable.In order to slightly disentangle this move the actual helper classes to
the toplevel (as
_{Fixed,Floating}AxisArtistHelperBase
and_{Fixed,Floating}AxisArtistHelperRectlinear
), keeping the old"purely namespace" classes around for backcompat. (But note that end
users should never have to directly interact with these classes anyways
-- normally, they only construct GridHelpers which take care of the
interaction with AxisArtistHelpers; see e.g. the various axisartist
examples.)
More simply, this commit simply dedents most of the definitions of the
Helper classes.
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).