-
Notifications
You must be signed in to change notification settings - Fork 68
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
Rework documentation generation #869
Conversation
# Pull Request ## Title Quick fixups to the documentation build. --- ## Description - Expands one of the ignored warnings. - Reformats the sphinx conf for black and pylint. - Removes a warning from that file around redefinition of `html_theme_path`. - Adds a dependency requirement tweak for `pyparsing` when installing under python 3.8 (unrelated other CI bug). - Adds a workaround to a mypy false positive with in checking `np.e` as a "deleted variable" (e.g., `e` is used in a try/except block) --- ## Type of Change - 🛠️ Bug fix - 📝 Documentation update --- ## Testing - Ran `make doc` and `make check-doc`. - Ran `make notebook-exec-test`. --- ## Additional Notes (optional) This is a quick fix to get the CI pipeline working again. The more complete fix to remove warning ignores from doc generation, improve cross reference linking, etc. will be handled later in #869 ---
@motus this is the wip PR I was mentioning. I think moving more of our docs directly into docstrings and making use of I'd like for us to add more and more examples and explanations of what and how to think about the different configs, environments, etc. there with references back to the markdown files in the source code as necessary. Separately, we should probably add Discussions or Wiki pages or something here to allow more people to ask and answer questions about how to do things and get started. |
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.
Did the first pass, left some nitpicks. My biggest question so far is the mismatch between the imports and the way we reference to them in docstrings. Please see my comments re: datetime.datetime
, pandas
vs. pd
, ConfigSpace.ConfigurationSpace
, tempfile
and such
Co-authored-by: Sergiy Matusevych <[email protected]>
Yeah, I fought with that a bit, but gave up in the interest of getting something working. For some reason it appears to correctly resolve from the imports most of the things, but not all of them. Rather than fight with it or disable the nitpick checking (since I think that's valuable for catching broken reference links to make sure our doc navigation works), I just changed the ones that complained to use fully qualified names. |
…ke backslashes for command line continuation)
# Pull Request ## Title More documentation updates --- ## Description - [x] Adds general documentation on philosophy and usage - [x] Additional docs about Config structure - [x] Adjusts README documentation links - [x] Additional documentation about Storage classes --- ## Type of Change - 📝 Documentation update - 🧪 Tests --- ## Additional Notes (optional) Follow on to #869 ---
Pull Request
Title
Documentation generation rework.
Description
This PR does an initial revamp of the way we generate and write documentation.
The goal is to simplify the generation process a bit by removing some hacks but also enable more strict checking of the documentation produced so that links resolve properly so that it is easier to navigate.
This PR is mostly the mechanics and the associated fixups to do that.
Future PRs can handle additional documentation in docstrings.
Below is a more detailed description of some of the changes.
black
andpylint
to the sphinxconf.py
autoapi
to handle cross referencing warnings and drop use ofsphinx-apidoc
Updateoverview.rst
to follow suiteautoapi
for everything.:py:func:
,:py:class:
,:py:meth:
,:py:mod:
, etc. to cross reference functions and classes in the docstrings.napolean
to parsenumpydoc
style docstrings(previous
numpydoc
method was incomplete)intersphinx
andnitpick
to check (or ignore where not possible) all internal and most external cross references to ensure good code navigation(documented bug, will address in a future PR)
from_config_string
style loaders to help with this.doctest
topytest
to validate examples.mlos_bench.run
help usage output to anrst
file and link that into the man table of contents tree in the output.Type of Change
Testing
Adds additional checks and linting.
Must pass CI
Manual testing as follows:
# SKIP_COVERAGE tweak is optional - just avoids a `pytest` job dependency make SKIP_COVERAGE=true doc ./doc/nginx-docker.sh restart
Browse to
http://localhost:8080
and check the results.Additional Notes
Future PRs can add additional documentation strings for the
mlos_bench
classes including examples.In particular