Move AxisArtistHelpers to toplevel.#20214
Merged
Merged
Conversation
Member
|
I'm not sure if |
Contributor
Author
|
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... |
Contributor
Author
Contributor
Author
|
Rebased on top of #22314. |
QuLogic
approved these changes
Apr 6, 2023
Member
|
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.
Contributor
Author
|
Fixed; the remaining doc build warning seems unrelated (failure to get the version switcher). |
timhoffm
approved these changes
Apr 23, 2023
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.
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}AxisArtistHelperBaseand_{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
pytestpasses).flake8on changed files to check).flake8-docstringsand 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).