-
Notifications
You must be signed in to change notification settings - Fork 511
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
Document all of the directives #868
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@dleen I'm going to add some notes into #867 on where to find directives in the code (they are kind of spread out) and provide some pointers. It's not necessarily that straightforward. You've also asked some good questions which I'll try to address. I'll work on this morning, I will ping you when I'm done writing the notes. 🙇🏽 Thanks for opening this PR |
Regarding the questions you've asked about those directives
The rest should be answered in the notes I added to the issue |
Note that you can think of frontmatter as the same as directives, except directives are for a cell, whereas frontmatter is for the whole NB. |
b49923c
to
26a70b9
Compare
Thanks so much @dleen looking good. I left some comments for you to consider. Please let me know if you have any questions! BTW this is part of the magic of nbdev code reviews, you can talk about code and documentation in a single context and refine deep understanding of many concepts of a code base! I ❤️ that you are doing this, this is the best way to learn a code base IMO, and also becomes an amazing contribution 🙇🏽 |
@dleen updated some comments in case you are relying on email notifications (I would read them on GitHub instead). Thanks again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for the PR @dleen . It looks great, and I've just got some minor requests for you.
It looks like you've accidentally exported a module from your tutorial notebook so we should fix that.
View the latest version: https://dleen.github.io/nbdev/explanations/directives.html |
@dleen thanks so much for these changes! I'm going to do some very minor cleanup things on this branch before merging if that is ok. |
Yep, no objections! At this point it's probably far quicker to just make the edits than type them out here as comments |
(I am still working on it will continue tomorrow) |
Done! |
Ok, I actually made some significant changes to the layout of this, I tried really hard to maximize the readability of this cheat sheet.
|
This is awesome! This will definitely be a go-to resource for me :) One additional directive I use often with quarto is |
I am just realizing the quarto's |
Amazing find @Isaac-Flath where did you find that in the Quarto docs? Perhaps we should deprecate EDIT: I found it here https://quarto.org/docs/reference/cells/cells-jupyter.html#code-output Okay I'll open an issue about this |
fixes #867
Need help with:
exec_doc
I saw this was recently added in #699 but I couldn't figure it out since I thought the cells were already executed...
nbflags
It seems like this can be used to pass values to internal functions but I don't know of an example that we can use
default_cls_lvl
It looks like this was supported in nbdev1, but is it implemented in 2?
hide_input
This one sounded pretty easy but got confused because there is already a bunch of other ways to hide input so not sure what this is for.
@seeM @jph00 @hamelsmu