Skip to content

Refactor keyword aliases behind a compatibility layer - #818

Merged
cvanelteren merged 6 commits into
mainfrom
refactor/canonical-aliases
Sep 7, 2026
Merged

Refactor keyword aliases behind a compatibility layer#818
cvanelteren merged 6 commits into
mainfrom
refactor/canonical-aliases

Conversation

@cvanelteren

@cvanelteren cvanelteren commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Continuation of our discussion in #808

UltraPlot has many (many many) aliases. Some love them, some hate them. This PR proposes to move them away from function signatures, to remain with a smaller set, and pushing the rest into a specific decorator. This allows for a smaller function description in stuff like pylance.

I added a small applet in the docs that shows all the aliases, and shows where they can be added etc. Open for feedback!

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.19388% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ultraplot/internals/kwargs.py 90.47% 5 Missing and 3 partials ⚠️
ultraplot/axes/plot.py 89.28% 1 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@cvanelteren

cvanelteren commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

@gepcel can you test drive this in case I missed some of the aliases?
Basically if you hit errors because some of the aliases are missing is fine. I think this is relatively thorough tho.

@gepcel

gepcel commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

I tested on some of my snippets, no errors were raised.

@cvanelteren

Copy link
Copy Markdown
Collaborator Author

What do you think of the applet in the docs(https://ultraplot--818.org.readthedocs.build/en/818/aliases.html) @gepcel?

@gepcel

gepcel commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Excellent job.

@cvanelteren

Copy link
Copy Markdown
Collaborator Author

Ok great then we are merging this but we can always return to this commit in case we encounter errors.

@cvanelteren
cvanelteren merged commit ed39b2c into main Sep 7, 2026
18 checks passed
@cvanelteren
cvanelteren deleted the refactor/canonical-aliases branch September 7, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants