chiark / gitweb /
blog.git
5 years agodocumentation/python: test external summary for a submodule.
Vladimír Vondruš [Wed, 28 Aug 2019 16:07:27 +0000 (18:07 +0200)]
documentation/python: test external summary for a submodule.

Fails. It's amazing how far can some bugs go unnoticed.

5 years agodocumentation/python, m.sphinx: hook for parsing docstrings.
Vladimír Vondruš [Wed, 28 Aug 2019 14:01:24 +0000 (16:01 +0200)]
documentation/python, m.sphinx: hook for parsing docstrings.

Centuries of work and research later, this gem is done. Yay!

5 years agom.sphinx: don't overwrite the docs gathered so far.
Vladimír Vondruš [Wed, 28 Aug 2019 14:02:33 +0000 (16:02 +0200)]
m.sphinx: don't overwrite the docs gathered so far.

This won't work well when more plugins are involved or the directives are
used to parse docstrings. Also updated the plugin docs to not suggest this
practice.

5 years agodoc: improve the python docstring info.
Vladimír Vondruš [Wed, 28 Aug 2019 13:54:43 +0000 (15:54 +0200)]
doc: improve the python docstring info.

5 years agodoc: move python documentation plugin internal docs later in the page.
Vladimír Vondruš [Wed, 28 Aug 2019 13:36:38 +0000 (15:36 +0200)]
doc: move python documentation plugin internal docs later in the page.

These are not so useful for users, and the stuff that followed them was
too buried.

5 years agodocumentation/python: minor cleanup.
Vladimír Vondruš [Wed, 28 Aug 2019 12:14:48 +0000 (14:14 +0200)]
documentation/python: minor cleanup.

5 years agodocumentation/python: fix a copypasta in a test.
Vladimír Vondruš [Wed, 28 Aug 2019 12:10:25 +0000 (14:10 +0200)]
documentation/python: fix a copypasta in a test.

5 years agodocumentation/python: unconditionally go through reST for everything.
Vladimír Vondruš [Tue, 27 Aug 2019 21:54:02 +0000 (23:54 +0200)]
documentation/python: unconditionally go through reST for everything.

Well, of course not forcing reST formatting on plain docstrings -- just
having a single code path because that makes integrating 3rd party
processing easier. Results in absolutely no changes to test files, which
is absolutely amazing.

5 years agodocumentation/python: support documenting particular function overloads.
Vladimír Vondruš [Tue, 27 Aug 2019 21:32:34 +0000 (23:32 +0200)]
documentation/python: support documenting particular function overloads.

5 years agodocumentation/python: include params in search only for overloads.
Vladimír Vondruš [Tue, 27 Aug 2019 21:02:30 +0000 (23:02 +0200)]
documentation/python: include params in search only for overloads.

And not unconditionally for all pybind functions. Makes the search data
lighter and is more consistent with pure Python code (and with the future
support for the @overload decorator).

5 years agodocumentation/python: detect overloaded functions already at crawl time.
Vladimír Vondruš [Tue, 27 Aug 2019 20:42:51 +0000 (22:42 +0200)]
documentation/python: detect overloaded functions already at crawl time.

But don't change the behavior in any way -- just that the consumers should
be aware of the distinction.

5 years agodocumentation/python: poison entry types that shouldn't go into search.
Vladimír Vondruš [Tue, 27 Aug 2019 20:34:03 +0000 (22:34 +0200)]
documentation/python: poison entry types that shouldn't go into search.

Spent a while using OVERLOADED_FUNCTION in a few places just to discover
it wasn't meant to be used there.

5 years agodocumentation/python: provide both type and type with links everywhere.
Vladimír Vondruš [Tue, 27 Aug 2019 20:09:59 +0000 (22:09 +0200)]
documentation/python: provide both type and type with links everywhere.

Makes it possible for templates to use those in different cases (such as
link alt text) and also unblocks the possibility to have separate docs for
function overloads (in the next commits).

5 years agodocumentation/python: special handling for self only if it's first.
Vladimír Vondruš [Tue, 27 Aug 2019 19:13:21 +0000 (21:13 +0200)]
documentation/python: special handling for self only if it's first.

I doubt anyone sane will name any other function parameters like that, but
let's be sure.

5 years agodocumentation/python: don't annotate free pybind function as staticmethods.
Vladimír Vondruš [Tue, 27 Aug 2019 18:47:01 +0000 (20:47 +0200)]
documentation/python: don't annotate free pybind function as staticmethods.

Wasn't visible in the output until now because we didn't have detailed
docs for those. But now it will be.

5 years agodocumentation/python: parse more than just first docstring paragraph.
Vladimír Vondruš [Tue, 27 Aug 2019 11:14:21 +0000 (13:14 +0200)]
documentation/python: parse more than just first docstring paragraph.

Next step is to allow those to get processed using plugins.

5 years agodocumentation/python: minor cleanup.
Vladimír Vondruš [Tue, 27 Aug 2019 11:09:50 +0000 (13:09 +0200)]
documentation/python: minor cleanup.

5 years agodocumentation/python: verify that HTML escaping is done for pybind as well.
Vladimír Vondruš [Tue, 27 Aug 2019 11:08:07 +0000 (13:08 +0200)]
documentation/python: verify that HTML escaping is done for pybind as well.

It is, even though I felt like it wasn't. Good to have to avoid
double-escaping accidents in the future.

5 years agodocumentation/python: whoops, enum detailed docs weren't rendered.
Vladimír Vondruš [Tue, 27 Aug 2019 10:16:13 +0000 (12:16 +0200)]
documentation/python: whoops, enum detailed docs weren't rendered.

5 years agodoc: fix for order-dependent processing, again.
Vladimír Vondruš [Sun, 25 Aug 2019 11:16:19 +0000 (13:16 +0200)]
doc: fix for order-dependent processing, again.

5 years agotheme: no, this PR is still not merged yet.
Vladimír Vondruš [Sun, 25 Aug 2019 10:45:56 +0000 (12:45 +0200)]
theme: no, this PR is still not merged yet.

5 years agom.sphinx: ugh, I still need to support Python 3.5.
Vladimír Vondruš [Sun, 25 Aug 2019 10:45:02 +0000 (12:45 +0200)]
m.sphinx: ugh, I still need to support Python 3.5.

5 years agom.sphinx: ability to create intersphinx inventories as well.
Vladimír Vondruš [Sun, 25 Aug 2019 10:27:05 +0000 (12:27 +0200)]
m.sphinx: ability to create intersphinx inventories as well.

5 years agom.sphinx: utility to pretty-print the inventory files.
Vladimír Vondruš [Sun, 25 Aug 2019 08:49:17 +0000 (10:49 +0200)]
m.sphinx: utility to pretty-print the inventory files.

The builtin sphinx tool is beyond useless. FFS.

5 years agom.dot: doc++
Vladimír Vondruš [Sat, 24 Aug 2019 16:20:26 +0000 (18:20 +0200)]
m.dot: doc++

5 years agodocumentation/python: implement context-relative linking.
Vladimír Vondruš [Sat, 24 Aug 2019 16:13:15 +0000 (18:13 +0200)]
documentation/python: implement context-relative linking.

I didn't change much, but the amount of research needed to verify that I'm
indeed doing it (mostly) correct was extreme. There's a pathological case
inside a named subclass where I'm doing it differently than Python itself,
but I don't expect this to be hit very often, so postponing until later.

The tests also assert inside the function definitions (and those functions
get called) to verify we're indeed doing (mostly) correct stuff.

5 years agodocumentation/python: correctly link all type annotations as well.
Vladimír Vondruš [Sat, 24 Aug 2019 07:50:22 +0000 (09:50 +0200)]
documentation/python: correctly link all type annotations as well.

5 years agodocumentation/python: prefix pybind's annotations with the typing module.
Vladimír Vondruš [Fri, 23 Aug 2019 13:58:23 +0000 (15:58 +0200)]
documentation/python: prefix pybind's annotations with the typing module.

So it's consistent with pure Python annotations.

5 years agodocumentation/python: integrate tighter with m.sphinx.
Vladimír Vondruš [Thu, 22 Aug 2019 22:36:17 +0000 (00:36 +0200)]
documentation/python: integrate tighter with m.sphinx.

The :ref: from m.sphinx can now link to internal types, while external
types provided by m.sphinx are now also linked to from all signatures.

Yay, I'm so happy about the design of this.

5 years agodocumentation/python: add implicit kwargs to all plugin hooks.
Vladimír Vondruš [Sat, 24 Aug 2019 20:25:07 +0000 (22:25 +0200)]
documentation/python: add implicit kwargs to all plugin hooks.

So they are future-proofed when new arguments are added. Need also *args
because pelican passes things unnamed.

5 years agodocumentation/python: added a post-crawl hook and exposed name map.
Vladimír Vondruš [Thu, 22 Aug 2019 21:00:37 +0000 (23:00 +0200)]
documentation/python: added a post-crawl hook and exposed name map.

So m.sphinx can use it to add the internal names to its own search index
and also make an inventory for it.

5 years agodocumentation/python: yup, yet another variant of builtin math docstrings.
Vladimír Vondruš [Fri, 23 Aug 2019 12:51:27 +0000 (14:51 +0200)]
documentation/python: yup, yet another variant of builtin math docstrings.

5 years agodocumentation/python: save URL to all entries to make linking easier.
Vladimír Vondruš [Fri, 23 Aug 2019 12:38:49 +0000 (14:38 +0200)]
documentation/python: save URL to all entries to make linking easier.

5 years agodocumentation/python: revisit None in function return type annotations.
Vladimír Vondruš [Fri, 23 Aug 2019 13:45:20 +0000 (15:45 +0200)]
documentation/python: revisit None in function return type annotations.

Until now it was ignored in pybind return annotations as it seemed to be
superfluous. OTOH, while the pybind function is fully annotated, it's
often not clear which function comes from pybind and which from pure
python code, meaning it's not clear if the return type is None or the
return type annotation is just missing.

Additionally, the pure python annotations were showing None as NoneType,
which is too verbose. According to PEP484 type(None) and None are
equivalent, so patching the output to show None instead of NoneType,
making it also consistent with pybind.

5 years agodocumentation/python: thanks to fixed reST higlighting I see this is dead.
Vladimír Vondruš [Sat, 24 Aug 2019 16:20:52 +0000 (18:20 +0200)]
documentation/python: thanks to fixed reST higlighting I see this is dead.

5 years agodocumentation/python: bad documentation copypaste? probably.
Vladimír Vondruš [Thu, 22 Aug 2019 21:02:12 +0000 (23:02 +0200)]
documentation/python: bad documentation copypaste? probably.

5 years agodocumentation/python: minor cleanup.
Vladimír Vondruš [Thu, 22 Aug 2019 20:24:04 +0000 (22:24 +0200)]
documentation/python: minor cleanup.

5 years agom.dox: minor cleanup.
Vladimír Vondruš [Thu, 22 Aug 2019 20:20:39 +0000 (22:20 +0200)]
m.dox: minor cleanup.

5 years agom.code, m.math: test & fix nested backticks in interpreted roles.
Vladimír Vondruš [Thu, 22 Aug 2019 20:19:41 +0000 (22:19 +0200)]
m.code, m.math: test & fix nested backticks in interpreted roles.

Broken when fixing backslash support.

5 years agom.dox: doc++
Vladimír Vondruš [Thu, 22 Aug 2019 20:19:03 +0000 (22:19 +0200)]
m.dox: doc++

5 years agom.sphinx: implement intersphinx read support.
Vladimír Vondruš [Thu, 22 Aug 2019 20:18:12 +0000 (22:18 +0200)]
m.sphinx: implement intersphinx read support.

Intersphinx write support next.

5 years agodocumentation/python: implement documenting function params and return.
Vladimír Vondruš [Thu, 22 Aug 2019 13:34:49 +0000 (15:34 +0200)]
documentation/python: implement documenting function params and return.

Did not expect I would need to patch Docutils for this because nobody had
this use case since its initial commit in 2002. How the heck is Sphinx
doing this, are they replacing Docutils internals too?!

5 years agodocumentation: add an actual diagnostic to this assert.
Vladimír Vondruš [Wed, 21 Aug 2019 11:41:45 +0000 (13:41 +0200)]
documentation: add an actual diagnostic to this assert.

Seems to be hit quite often, so make it helpful.

5 years agocss: make .m-diary left padding large enough to fit a short date as well.
Vladimír Vondruš [Sat, 3 Aug 2019 10:53:41 +0000 (12:53 +0200)]
css: make .m-diary left padding large enough to fit a short date as well.

And remove the extraneous margin -- which basically makes it look
roughly the same as before, but without uglily wrapped things.

5 years agoDoc++
Vladimír Vondruš [Thu, 18 Jul 2019 18:57:23 +0000 (20:57 +0200)]
Doc++

5 years agodocumentation/python: added TODOs for enum value docs.
Vladimír Vondruš [Thu, 18 Jul 2019 18:43:44 +0000 (20:43 +0200)]
documentation/python: added TODOs for enum value docs.

5 years agodocumentation/python: support external docs for all stuff.
Vladimír Vondruš [Thu, 18 Jul 2019 18:42:44 +0000 (20:42 +0200)]
documentation/python: support external docs for all stuff.

And also detailed docs for enums, functions, properties and data.

5 years agodoc: remove outdated / redundant info.
Vladimír Vondruš [Thu, 18 Jul 2019 18:37:24 +0000 (20:37 +0200)]
doc: remove outdated / redundant info.

5 years agodocumentation/python: um, why don't I use a function here?
Vladimír Vondruš [Thu, 18 Jul 2019 17:30:10 +0000 (19:30 +0200)]
documentation/python: um, why don't I use a function here?

5 years agoAdd file encoding to .editorconfig.
Vladimír Vondruš [Thu, 18 Jul 2019 16:18:31 +0000 (18:18 +0200)]
Add file encoding to .editorconfig.

5 years agodoc: Python doc generator *can* search now.
Vladimír Vondruš [Thu, 18 Jul 2019 16:15:06 +0000 (18:15 +0200)]
doc: Python doc generator *can* search now.

5 years agodocumentation/doxygen: fix last remaining use of deprecated name attrib.
Vladimír Vondruš [Thu, 18 Jul 2019 15:56:25 +0000 (17:56 +0200)]
documentation/doxygen: fix last remaining use of deprecated name attrib.

5 years agodocumentation/python: hook up the search.
Vladimír Vondruš [Thu, 18 Jul 2019 08:45:48 +0000 (10:45 +0200)]
documentation/python: hook up the search.

5 years agodocumentation: trim spaces from the right only if nothing is found.
Vladimír Vondruš [Thu, 18 Jul 2019 15:24:50 +0000 (17:24 +0200)]
documentation: trim spaces from the right only if nothing is found.

With unconditional trimming it was not possible to narrow down results
for page titles containing spaces (or subpages, which are separated by
double right arrow surrounded by spaces).

5 years agodocumentation: reuse the saved searched string instead of creating it again.
Vladimír Vondruš [Thu, 18 Jul 2019 15:23:54 +0000 (17:23 +0200)]
documentation: reuse the saved searched string instead of creating it again.

This avoids duplicating the trimming/decoding logic.

5 years agodocumentation: provide autocompletion in UTF-8 as well.
Vladimír Vondruš [Thu, 18 Jul 2019 15:21:01 +0000 (17:21 +0200)]
documentation: provide autocompletion in UTF-8 as well.

The search() function returns the result list in UTF-8, but the
autocompletion was not. And of course renderResults() assumed it was in
UTF-8 and decoded it from UTF-8 *twice*. This wasn't discovered until
now because I had no pages with UTF-8 names apart from the test (which
doesn't test the UI stuff).

5 years agodocumentation/doxygen: insert also pages with all prefixes.
Vladimír Vondruš [Thu, 18 Jul 2019 15:17:40 +0000 (17:17 +0200)]
documentation/doxygen: insert also pages with all prefixes.

Not sure why there was an exception. This makes it practically
impossible to search for subpages.

5 years agocss: highlight active documentation entries the same as sections.
Vladimír Vondruš [Thu, 18 Jul 2019 14:28:12 +0000 (16:28 +0200)]
css: highlight active documentation entries the same as sections.

For Python code, many names will have just the entry without any
detailed docs and it's hard to see where on the page it is if it's not
selected. The same works for Doxygen, of course.

5 years agodocumentation/doxygen: move entry ID to the <dt> element.
Vladimír Vondruš [Thu, 18 Jul 2019 14:27:18 +0000 (16:27 +0200)]
documentation/doxygen: move entry ID to the <dt> element.

And it's no longer the deprecated name attribute, but rather an id.

5 years agodocumentation/python: move entry ID to the <dt> element.
Vladimír Vondruš [Thu, 18 Jul 2019 14:01:57 +0000 (16:01 +0200)]
documentation/python: move entry ID to the <dt> element.

Fancy new stuff incoming!

5 years agodocumentation: trim overly long search results even more.
Vladimír Vondruš [Thu, 18 Jul 2019 13:24:55 +0000 (15:24 +0200)]
documentation: trim overly long search results even more.

The function name should be shown fully, ideally together with a
recognizable prefix.

5 years agodocumentation: properly show 100+ when having more results that can fit.
Vladimír Vondruš [Thu, 18 Jul 2019 11:30:59 +0000 (13:30 +0200)]
documentation: properly show 100+ when having more results that can fit.

This got accidentally broken in 8bdb844ceb547d8ca3156ef815de9603e51a598a
when implementing the Tab autocompletion. Unfortunately I can't really
auto-test the UI code :/

5 years agodocumentation: re-render symbol count if search box gets shown again.
Vladimír Vondruš [Thu, 18 Jul 2019 11:18:12 +0000 (13:18 +0200)]
documentation: re-render symbol count if search box gets shown again.

The (stale) count of found symbols was preserved there even though the
search box got emptied again. Also deduplicated the code a bit.

5 years agodocumentation: make it possible to have more than 128 results for a node.
Vladimír Vondruš [Thu, 18 Jul 2019 10:55:59 +0000 (12:55 +0200)]
documentation: make it possible to have more than 128 results for a node.

Python's __init__ is the main offender, the (currently very barebone)
Magnum Python bindings have 340 results for __init__. This change is
based on the assumption that nodes with extreme amount of results on the
other hand don't have many children, so we can steal some bits from the
child count instead. Now it's either up to 127 results and up to 127
children or up to 2048 results and 16 children.

5 years agodocumentation: doc++
Vladimír Vondruš [Thu, 18 Jul 2019 10:51:23 +0000 (12:51 +0200)]
documentation: doc++

5 years agodocumentation: make the general search tests backend-independent.
Vladimír Vondruš [Thu, 18 Jul 2019 09:24:04 +0000 (11:24 +0200)]
documentation: make the general search tests backend-independent.

It stays C++-specific, but since the implementation doesn't care about
the language, it's okay.

5 years agodocumentation/python: wtf, why None and why not [].
Vladimír Vondruš [Thu, 18 Jul 2019 08:48:18 +0000 (10:48 +0200)]
documentation/python: wtf, why None and why not [].

This was *sometimes* failing during the test, with Jinja complaining
that None is not iterable. But not all the time, for some reason.

5 years agodocumentation/python: extract the name shortener utility.
Vladimír Vondruš [Wed, 17 Jul 2019 19:04:30 +0000 (21:04 +0200)]
documentation/python: extract the name shortener utility.

5 years agodocumentation/python: minor cleanup.
Vladimír Vondruš [Wed, 17 Jul 2019 18:14:05 +0000 (20:14 +0200)]
documentation/python: minor cleanup.

5 years agodocumentation/python: pass the whole entry to documentation extractors.
Vladimír Vondruš [Wed, 17 Jul 2019 18:11:57 +0000 (20:11 +0200)]
documentation/python: pass the whole entry to documentation extractors.

Compared to basically unpacking the entry and passing all of it as
separate arguments this makes it easier to get the page URL and in the
future also other stuff.

5 years agodocumentation/python: save URLs of crawled classes, modules and pages.
Vladimír Vondruš [Wed, 17 Jul 2019 17:55:40 +0000 (19:55 +0200)]
documentation/python: save URLs of crawled classes, modules and pages.

Makes link creation much simpler later.

5 years agodocumentation: search data format version 2.
Vladimír Vondruš [Wed, 17 Jul 2019 16:44:32 +0000 (18:44 +0200)]
documentation: search data format version 2.

Instead of having a hardcoded mapping from flags to type names and
associated classes on the JavaScript side, which was very C++-specific,
the new format now moves this mapping directly into the search data.

It's a new section at the end, for each type index containing CSS class
ID (which is still hardcoded, but that's not language specific anyway)
and an UTF-8 name that's displayed in the label. For C++ this makes the
search data file size 107 bytes larger, which isn't significant by any
means.

5 years agodocumentation: remove dead code.
Vladimír Vondruš [Wed, 17 Jul 2019 16:51:35 +0000 (18:51 +0200)]
documentation: remove dead code.

5 years agodocumentation: ensure the extra arguments are always passed as keywords.
Vladimír Vondruš [Wed, 17 Jul 2019 16:39:25 +0000 (18:39 +0200)]
documentation: ensure the extra arguments are always passed as keywords.

5 years agodocumentation: encode format version into search data filename.
Vladimír Vondruš [Wed, 17 Jul 2019 16:33:41 +0000 (18:33 +0200)]
documentation: encode format version into search data filename.

The browser having a stale data (and a stale script) cached is okay-ish
as things still mostly work, but having a stale data with a script
expecting a new version or vice versa is *bad*, so prevent that by
having the script always download file of the exact version it expects.

This is a bit less useful with docs served from local filesystem (as
the filename is encoded in HTML pages rather than in the script), but
there I don't assume the browser is doing much caching so that should be
okay.

5 years agodocumentation: add sanity checks for always-defined template variables.
Vladimír Vondruš [Wed, 17 Jul 2019 18:46:58 +0000 (20:46 +0200)]
documentation: add sanity checks for always-defined template variables.

5 years agodocumentation: make the search test data diffable.
Vladimír Vondruš [Sun, 14 Jul 2019 23:16:17 +0000 (01:16 +0200)]
documentation: make the search test data diffable.

5 years agodocumentation: first step to make the result types backend-specific.
Vladimír Vondruš [Sun, 14 Jul 2019 23:14:36 +0000 (01:14 +0200)]
documentation: first step to make the result types backend-specific.

The type is now a part of the doxygen script and is added as plain bits
to ResultFlag. Next step is encoding the type mapping to the search data
and then reading that back in the JS frontend.

5 years agodocumentation/doxygen: update JS tests and ensure it doesn't happen again.
Vladimír Vondruš [Sun, 14 Jul 2019 22:17:54 +0000 (00:17 +0200)]
documentation/doxygen: update JS tests and ensure it doesn't happen again.

Ugh. The flags got reordered in 1a10e178fbf4d370ba1ae3026e5492c757cfef2e
(HALF A YEAR AGO!) but the JS test data were never adapted to that, so
the JS test was still working with the old stuff.

The Travis CI job was modified to execute the python script during
the JS test run and verify there's no git diff after that.

5 years agodocumentation: move search-related stuff into a dedicated module.
Vladimír Vondruš [Sun, 14 Jul 2019 21:57:19 +0000 (23:57 +0200)]
documentation: move search-related stuff into a dedicated module.

So it can be used by the Python doc generator as well. Wanted to put it
into __init__.py, but Guido disagreed with that, so I can't.

5 years agom.math, documentation: update math support for dvisvgm 2.6.3.
Vladimír Vondruš [Sun, 14 Jul 2019 21:45:03 +0000 (23:45 +0200)]
m.math, documentation: update math support for dvisvgm 2.6.3.

It reorders all XML attributes for no reason. Ugh I hate this.

5 years agom.math: ensure cache file is reset when cache is not used.
Vladimír Vondruš [Sun, 14 Jul 2019 21:42:23 +0000 (23:42 +0200)]
m.math: ensure cache file is reset when cache is not used.

Otherwise tests run in batch can sporadically fail.

5 years agom.qr: patch the output to be consistent between Travis any my Python 3.7.
Vladimír Vondruš [Sun, 14 Jul 2019 20:39:52 +0000 (22:39 +0200)]
m.qr: patch the output to be consistent between Travis any my Python 3.7.

5 years agopackage/ci: build for Python 3.7 and pybind 2.3 as well, drop 3.4 build.
Vladimír Vondruš [Sun, 14 Jul 2019 19:36:05 +0000 (21:36 +0200)]
package/ci: build for Python 3.7 and pybind 2.3 as well, drop 3.4 build.

5 years agoDrop Python 3.4 support.
Vladimír Vondruš [Sun, 14 Jul 2019 19:32:26 +0000 (21:32 +0200)]
Drop Python 3.4 support.

It was EOL'd in March 2019 and I don't want to bother with it anymore.

5 years agodocumentation/python: handle also getset descriptors.
Vladimír Vondruš [Sun, 14 Jul 2019 16:48:06 +0000 (18:48 +0200)]
documentation/python: handle also getset descriptors.

Ugh enough with those weird things already.

5 years agodocumentation/python: properly handle inspection of slot properties.
Vladimír Vondruš [Sun, 14 Jul 2019 15:49:39 +0000 (17:49 +0200)]
documentation/python: properly handle inspection of slot properties.

There's no fget/fset/fdel for those and we also can't __doc__ them.

5 years agodocumentation/python: reduce annotation test to just parsing, not links.
Vladimír Vondruš [Sun, 14 Jul 2019 15:39:58 +0000 (17:39 +0200)]
documentation/python: reduce annotation test to just parsing, not links.

Type links are tested in test_inspect.TypeLinks.

5 years agodocumentation/python: reduce needed test boilerplate.
Vladimír Vondruš [Sun, 14 Jul 2019 13:49:48 +0000 (15:49 +0200)]
documentation/python: reduce needed test boilerplate.

Will do the same for doxygen, plugin and theme tests too, but later.

5 years agodocumentation/python: warn when a type link should (but isn't) resolved.
Vladimír Vondruš [Sun, 14 Jul 2019 12:54:36 +0000 (14:54 +0200)]
documentation/python: warn when a type link should (but isn't) resolved.

Could help with figuring out what types were accidentally omitted from
the docs.

5 years agodocumentation/python: attrs does bad things and I'm not happy about that.
Vladimír Vondruš [Sun, 14 Jul 2019 12:13:23 +0000 (14:13 +0200)]
documentation/python: attrs does bad things and I'm not happy about that.

5 years agodocumentation/python: further improve type annotation support.
Vladimír Vondruš [Sun, 14 Jul 2019 12:02:24 +0000 (14:02 +0200)]
documentation/python: further improve type annotation support.

This is an awful mess, ffs. Like if nobody designed this with
introspection in mind.

5 years agodocumentation/python: minor clarification in a test.
Vladimír Vondruš [Sun, 14 Jul 2019 11:59:28 +0000 (13:59 +0200)]
documentation/python: minor clarification in a test.

5 years agodocumentation/python: properly handle invalid annotation types.
Vladimír Vondruš [Sun, 14 Jul 2019 10:51:25 +0000 (12:51 +0200)]
documentation/python: properly handle invalid annotation types.

Such as using a tuple instead of Tuple or putting a function there
instead of a type.

5 years agodocumentation/python: properly handle nested pybind signature parse errors.
Vladimír Vondruš [Sun, 14 Jul 2019 10:01:38 +0000 (12:01 +0200)]
documentation/python: properly handle nested pybind signature parse errors.

I still feel uneasy throwing exceptions. But eh.

5 years agodocumentation/python: properly parse pybind's Callable annotations.
Vladimír Vondruš [Sun, 14 Jul 2019 09:34:52 +0000 (11:34 +0200)]
documentation/python: properly parse pybind's Callable annotations.

5 years agodocumentation/python: clean up redundant imports.
Vladimír Vondruš [Sat, 13 Jul 2019 20:08:13 +0000 (22:08 +0200)]
documentation/python: clean up redundant imports.

5 years agodocumentation/python: test pybind readonly properties, for completeness.
Vladimír Vondruš [Sat, 13 Jul 2019 20:07:49 +0000 (22:07 +0200)]
documentation/python: test pybind readonly properties, for completeness.

5 years agodocumentation/python: support write-only properties.
Vladimír Vondruš [Sat, 13 Jul 2019 20:04:17 +0000 (22:04 +0200)]
documentation/python: support write-only properties.

Supported by Python through a slightly crazy syntax and in pybind11
since 2.3.

5 years agodocumentation/python: unify and improve formatting of values.
Vladimír Vondruš [Sat, 13 Jul 2019 17:39:17 +0000 (19:39 +0200)]
documentation/python: unify and improve formatting of values.

Such as function default values or data values. Mainly done in order to
turn enum values into links. Also ensuring the value is always HTML
escaped.