-
Notifications
You must be signed in to change notification settings - Fork 4
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
Migrate to mkdocs #81
base: main
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 @@
## main #81 +/- ##
=======================================
Coverage 94.73% 94.73%
=======================================
Files 15 15
Lines 1806 1806
=======================================
Hits 1711 1711
Misses 95 95 ☔ View full report in Codecov by Sentry. |
Thanks for looking into this @thomasmarwitz ! See from https://metalearners.readthedocs.io/en/latest/background.html#x-learner |
@kklein Thanks for pointing that out, looks like I completely missed this. You are right, you don't need to escape subscript anymore. |
Aside from the math and enumeration topic mentioned above, what do you see as hurdles and next steps? |
BTW an alternative to readthedocs could be github pages in combination with https://github.com/jimporter/mike. Disadvantage would be that there is no preview for PRs. Advantage would be that there is no external configuration necessary. |
Sounds interesting! Can we have branch-specific deployments with GitHub-pages? Given our somewhat heavy use of formulas, we rely a lot on rendered docs in PRs. |
I don't know whether branch based deployments can be accomplished out of the box with I just tried out to host the |
@kklein pointed out this mkdocstrings feature 1. It adds inherited methods (w/ a docstring) to subclasses. However, it still differs slightly from the sphinx behavior: In the case above, But perhaps this is even desired behavior? In the sense that if you change the implementation, you should also adapt the docstring? Footnotes |
I can totally see that one might want to ask that question. In our case we mostly described the 'contract' of a given method/function in the docstrings, i.e. what a user may provide as input and what they can expect as an output. We don't usually say much about the 'how's. At times, changing the implementation does not change this contract. E.g. one might think of the folllowing:
In this case we used said sphinx feature in order to DRY and reduce the risk of inconsistencies due to redundancy. |
I don't think so, so in this case readthedocs might be more fitting. |
mkdocs.yml
Outdated
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.
check "true" possible?
Hides the In[ ] blocks. | ||
Out[ ] blocks are not displayed. |
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.
Hides the In[ ] blocks. | |
Out[ ] blocks are not displayed. | |
Hides the In[ ] blocks in rendered jupyter notebooks. | |
Out[ ] blocks are not displayed. |
/* | ||
Add your custom style here to highlight the target element. | ||
This e.g. triggers when an internal link to a function in the API documentation is clicked. | ||
The function will be the target then. | ||
*/ | ||
:target { | ||
|
||
} |
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.
is this still needed?
docs = "mkdocs build" | ||
readthedocs = "rm -rf $READTHEDOCS_OUTPUT/html && cp -r site/ $READTHEDOCS_OUTPUT/html" | ||
serve-docs = "mkdocs serve" # postinstall task needs to be executed in 'docs' environment beforehand |
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.
how about pixi run docs
for interactive docs serving and pixi run docs-build
for building the HTML?
i'm also wondering whether we should add --strict
to docs-build
, xref https://github.com/prefix-dev/pixi/blob/e56f2e6300ba2defbd322fc13a45f224886a89c4/pixi.toml#L122
c43d80b
to
0bcbb39
Compare
0bcbb39
to
cb6c281
Compare
Demonstrate how mkdocs-jupyter plugin can be used to execute and render Jupyter Notebooks in a similar way to MyST.
Output: https://metalearners--81.org.readthedocs.build/en/81/
TODO:
background.md
Wait for feature: Add option s.t. overridden members are able to "inherit" docstrings from corresponding members in parent classes mkdocstrings/python#194=> moved to griffe extension: https://github.com/mkdocstrings/griffe-inherited-docstrings (now works with version1.1.1
) TBD: maybe not include in template!