-
Notifications
You must be signed in to change notification settings - Fork 9
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
Doc plots with Makie #58
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #58 +/- ##
==========================================
+ Coverage 99.62% 99.65% +0.02%
==========================================
Files 10 11 +1
Lines 267 287 +20
==========================================
+ Hits 266 286 +20
Misses 1 1 ☔ View full report in Codecov by Sentry. |
Sweeeet, just saw this too JuliaPhysics/Measurements.jl#174 "Oh yea, it's all coming together.jpeg" |
Great start, thanks! 👍 You intend to export the plotting recipes to users through the package extension? Originally I thought the vision was to define the plotting recipes just for the docs so the plotting dependencies could go into the documentation project and not affect the main project. Typically I find that plotting recipes are useful when you want to make the same plot many times, as we do in the documentation, but I rarely use them otherwise because they cover one use case that usually doesn't match what I want. For example, the plotting recipe shows the reddening law over the full wavelength range with This is to say that I don't think I would ever call these plotting recipes as a user myself and so my preference would be to isolate them to the documentation build so that the dependencies of the main code do not need to be changed. This would also allow us to continue iterating on improvements to the docs / plots without worrying how it would affect the main package. This is a weak preference and I'm happy to be persuaded 😄 |
Thanks for your feedback, I think those are very fair points What if we restrict the recipe plots ( This would also greatly reduce the scope of the full recipe plots that I would need to consider 😅 |
The building blocks being the As extensions are optional, something I've done in the past is add extensions while keeping compatibility with older Julia versions (i.e., not bumping julia compat). The extensions will just be ignored if you use the package on an older version, but at least you can still use the latest version of the base package. I think it's nice to keep long back compatibility for foundational packages like this and I'm not sure it's worth jumping from Julia 1.6 -> 1.9 compatibility for a few plotting definitions (are the building blocks for the plotting really just 7 lines? pretty cool). What do you think about this solution? Alternatively if you really want the makie extension to be available everywhere you could fall back to using Requires.jl on older Julia versions (see, e.g., here), but I think it's probably not worth the hassle. Actually now that I think about it, using the Requires.jl trick would be worse from a maintenance perspective than just bumping the julia compat so disregard this paragraph |
Exactly! Sounds good. I made the following broad changes:
I'll keep adding to the documentation, but the overall organization scheme should be ready now for a first pass at reviewing whenever you have the time. I'm still learning the ins-and-outs of Documenter.jl, so if anything looks wonky that was probably a mistake. Thanks! |
Also happy to split the doc writing bits out into its own PR if that is preferred 👍🏾 |
Ok, I think things should be in a pretty good place for a review now. Thanks for all the preliminary comments! |
Also, opened #59 to keep track of this comment in case we happen to find more reasons to potentially modernize things
|
Closes #36
Depends on:
Gain
unit support in Makie upstreamPreview
Exploration notebook
Motivation
DustExtinction.jl currently uses Plots.jl to generate a bunch of static plot images that are then added to the docs. A while back, Miles had the idea to streamline this process by making the plot creation part of the doc creation process, assisted by plot recipes. Although the original idea was to try and implement this with Plots.jl's recipe system, Makie.jl has since come on the scene as a mature, pure Julia alternative.
Noteable examples in JuliaAstro-adjacent ecosystems also exploring and/or already making the switch include DimensionalData.jl –- which backs the underlying data in AstroImages.jl, PairPlots.jl, and SkyImages.jl.
Major changes
TODO
Bump oldest Julia version to at least v1.9 to use package extensions. Does this sound reasonable?Doc plots with Makie #58 (comment)Makie.PointLike
(lines, scatter, etc.)Makie.CellGrid
(heatmaps)