We will work on a version that can be toggled dynamically. It will just include this static version. This keeps things simple and still lets
us use the static version as needed.
This simplifies the table and reduces its size.
Also copy assets manually since Sphinx does not automatically copy
images to _images when used for custom directives.
This was the only remaining section under "extras", so it is better to have it elsewhere. Since it only applies to the Pybricks package, put it there.
Also rename Pybricks Modules heading to Pybricks Package, since it behaves more like a package in contrast with the MicroPython modules that we now document as well.
Based on user feedback, we learned that the control attribute is used more frequently than anticipated. Therefore it makes sense to document it here, just like we do with instances of pybricks.common classes in hubs.
This makes it a bit easier to find and see how it is used, along with some of the existing examples.
With EV3 dropped from the 3.X documentation, the main docs are now nearly identical to the IDE docs, save for some layout changes.
Having just one set of docs is easier to maintain. This drops the IDE doc target.
The `only` directive can be used to include content selectively. It cannot be used to select a different TOC, which is why we resorted to separate doc builds before.
Now that we have dropped EV3 references from the docs, we can use a single build and just customize the content on the landing page with the only directive.
The docs can now be built with:
# Main docs:
make -C doc html SPHINXOPTS=-tmain
# IDE docs:
make -C doc html SPHINXOPTS=-tide
This can be traced back to 0013a74d72 and 92e3735d63.
It was used to work around things like
sound.beeps(number)
Description
being incorrectly displayed as
classmethod sound.beeps(number)
Description
But the current version of sphinx appears to display this correctly even without the hack. We want to reduce the number of hacks because they tend to break updates (https://github.com/pybricks/pybricks-api/issues/69#issuecomment-879822417).
List all functions and classes explicitly so we can organize them by category in later commits.
Also split out exceptions and uerrno to dedicated page because the builtins page was getting very long and hard to navigate.
This merges the useful information from two different places:
- The original docstring for const.
- Writing MicroPython code for constrained devices.
Also reduce type to just int, because only ints are supported.
TConst does not exist, so adding it makes it a bit harder to read than needed. The const() "function" will take int or float, and the return value can be used as such, even if it is optimized out. This is described in the docstring, so we can leave out the additional type.
Also adds autofunctions in place of one auto module so we can move things around as needed. Also fix cross links with usys to get the build to pass before we update that module.
The doc/api is a legacy name, which is confusing in the current use, since all build targets are now APIs.
Today we have:
doc/common: Common configuration and settings between all targets.
doc/main: Main Pybricks documentation at docs.pybricks.com.
doc/ide: Documentation shipped with the Pybricks Code IDE.
There is no ubuiltins module, so we shouldn't mention it.
Also reduce size of other module titles so they fit on one line in the
menu. This makes it easier to read and get an overview.