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

Block attribute docs #2894

Merged
merged 24 commits into from
May 5, 2023
Merged

Block attribute docs #2894

merged 24 commits into from
May 5, 2023

Conversation

jkrumbiegel
Copy link
Member

@jkrumbiegel jkrumbiegel commented Apr 23, 2023

TODO

  • control which backend and with what args renders an example in the docs
  • API to show specific example of an attribute

@MakieBot
Copy link
Collaborator

MakieBot commented Apr 23, 2023

Compile Times benchmark

Note, that these numbers may fluctuate on the CI servers, so take them with a grain of salt. All benchmark results are based on the mean time and negative percent mean faster than the base branch. Note, that GLMakie + WGLMakie run on an emulated GPU, so the runtime benchmark is much slower. Results are from running:

using_time = @ctime using Backend
# Compile time
create_time = @ctime fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @ctime Makie.colorbuffer(display(fig))
# Runtime
create_time = @benchmark fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @benchmark Makie.colorbuffer(display(fig))
using create display create display
GLMakie 36.05s (35.02, 39.85) 1.72+- 17.33s (16.79, 18.77) 0.69+- 15.80s (15.20, 17.22) 0.68+- 11.25ms (10.91, 12.08) 0.42+- 133.98ms (129.71, 139.12) 3.20+-
master 36.16s (35.10, 39.97) 1.70+- 17.03s (16.63, 18.51) 0.67+- 15.61s (15.23, 17.17) 0.70+- 11.25ms (10.75, 12.03) 0.43+- 132.59ms (128.71, 136.81) 3.11+-
evaluation -0.32%, -0.12s invariant (-0.07d, 0.90p, 1.71std) +1.73%, 0.3s invariant (0.44d, 0.42p, 0.68std) +1.19%, 0.19s invariant (0.27d, 0.62p, 0.69std) +0.04%, 0.0ms invariant (0.01d, 0.98p, 0.43std) +1.03%, 1.38ms invariant (0.44d, 0.43p, 3.16std)
CairoMakie 41.95s (40.88, 43.33) 1.06+- 21.42s (20.93, 22.26) 0.46+- 3.19s (3.07, 3.37) 0.10+- 16.23ms (15.91, 16.46) 0.18+- 6.83ms (6.33, 7.36) 0.31+-
master 42.32s (41.17, 44.07) 1.12+- 21.67s (20.65, 22.55) 0.73+- 3.20s (3.08, 3.44) 0.12+- 16.25ms (16.13, 16.37) 0.09+- 6.80ms (6.36, 7.25) 0.29+-
evaluation -0.88%, -0.37s invariant (-0.34d, 0.54p, 1.09std) -1.20%, -0.26s invariant (-0.42d, 0.45p, 0.60std) -0.23%, -0.01s invariant (-0.06d, 0.91p, 0.11std) -0.13%, -0.02ms invariant (-0.15d, 0.78p, 0.14std) +0.44%, 0.03ms invariant (0.10d, 0.86p, 0.30std)
WGLMakie 44.43s (44.24, 44.79) 0.19+- 21.92s (21.72, 22.55) 0.29+- 22.19s (21.67, 22.79) 0.33+- 14.94ms (14.44, 15.74) 0.42+- 791.76ms (756.08, 824.57) 27.61+-
master 44.71s (44.40, 45.14) 0.24+- 22.11s (21.83, 22.43) 0.21+- 22.44s (22.02, 23.12) 0.41+- 14.90ms (13.97, 16.81) 0.93+- 786.73ms (757.98, 821.24) 19.47+-
evaluation -0.62%, -0.28s faster ✓ (-1.27d, 0.04p, 0.22std) -0.85%, -0.19s invariant (-0.74d, 0.20p, 0.25std) -1.14%, -0.25s invariant (-0.69d, 0.22p, 0.37std) +0.30%, 0.05ms invariant (0.06d, 0.91p, 0.67std) +0.64%, 5.04ms invariant (0.21d, 0.70p, 23.54std)

@jkrumbiegel jkrumbiegel marked this pull request as ready for review April 27, 2023 10:43
@jkrumbiegel
Copy link
Member Author

This PR generally works as it should, adds attribute docs to Block pages and allows accessing them via REPL. I didn't want to continue creating more example images etc. before the general mechanism was approved. That part will have to be done over a longer timeframe anyway, preferrably in steps because it's a lot of work.

@SimonDanisch
Copy link
Member

This seems super close to what I wanted initially for Makie's docs! Still need to try it out though and see how it works in detail!

@jkrumbiegel
Copy link
Member Author

jkrumbiegel commented Apr 27, 2023

Sure I'll wait until you've had time :) There's not too much to try out right now, it's just ?Axis.xticks style attribute queries in the repl plus the changed docs style. For plots, we'll have to think about how we even define what attributes they have, and we have no place to put attribute docstrings in there right now.

@jkrumbiegel jkrumbiegel merged commit 8fe116a into master May 5, 2023
@jkrumbiegel jkrumbiegel deleted the jk/block-attribute-docs branch May 5, 2023 15:02
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.

None yet

3 participants