feat: Spectroscopy with SDSS tutorial#28
Conversation
cgarling
left a comment
There was a problem hiding this comment.
This is looking nice, thanks for taking the initiative. You favor the Pluto notebook approach over the Documenter.jl "build from markdown" style right?
I think I like the Pluto here so you can see the intermediate results without running it in your own terminal.
I think I've realized why reading pluto notebooks bothers me; I don't like having the output above the cell. Does that ever bother you? Im hopelessly jupyter pilled I guess
| using Unitful, UnitfulAstro, UnitfulEquivalences, Measurements | ||
|
|
||
| deps_ready = true # Can drop this when above patches upstreamed | ||
| end; |
There was a problem hiding this comment.
idk pluto but the begin -> end for this block is showing up in the docs preview, is it because of the semi colon here?
There was a problem hiding this comment.
Oh, that is just a temporary workaround until some of upstream changes for the packages listed get merged. Then all of the Pkg.add (for loading patched packages) and deps_ready (for making sure that cell runs first before the other using statements further down) bits can be dropped
I still wanted to show the cell so folks could see what all was being modified, but we could always hide it too by clicking the eyeball icon next to the cell. The semi-colon is just to suppress the true output that would appear above the cell with this current setup
Thanks! Yea, for anything exploratory or for portability, I've been finding myself reaching for it more these days. There's something about being able to just click on the little
That bothered me SO much when I was first coming from Jupyter, and there has certainly been some lengthy philosophical discourse on this topic. I think what made it start clicking for me was Fons' old comment essentially attributing it to the metaphor of captions in papers: The captions (code) goes below the stuff we actually care about (the output). Of course that comes down to personal taste, and mine has certainly shifted over time That being said, since Pluto.jl has first class html/javascript/css support, you can always pop a cell like this into a notebook to get that under-cell behavior back: html"""
<style>
pluto-cell {
display: flex;
flex-direction: column;
}
pluto-input { order: 1; }
pluto-output { order: 2; }
pluto-runarea { order: 3; }
</style>
"""
Yo, I am stealing that 😂 |
|
Oh yea, one additional reason why I am leaning towards notebooks over traditional Documenter builds for this site (besides mirroring astopy's learn.astropy site that uses notebooks too, the automatic package manager support we get, the right sidebar navigation for within-notebook sections, the interactive widget support, the rich object display, etc.), is that I'd eventually like to build out the search functionality to filter by tags and other frontmatter that is stored in the notebook format. We get this for free with Pluto.jl, and it's not immediately apparent to me how we could accomplish something similar within the constraints of a Documenter build |
|
Sounds like a lot of benefits for Pluto! I didn't know it could do all that, very impressive. Happy for this to go that route. Personally I would switch the cell/output order (I imagine most people are used to the jupyter style) but I think having one consistent style across all our notebooks is more important than what, specifically, that style is, so I'm happy with whatever you want to do |
Co-authored-by: Chris Garling <chris.t.garling@gmail.com>
|
Thanks! Sounds good, happy to add that in at some point if it helps with easing folks in. Will keep it as-is for now to match the default format |
Follow-up to JuliaAstro/JuliaAstro.github.io#203
Trying it out in notebook format
Doc preview: https://learn.juliaastro.org/previews/PR28/tutorials/spectroscopy-sdss/
Original author: @aditya-pandey-dev