chiark / gitweb /
blog.git
5 years agodocumentation: Added support for strikethrough markdown formatting
Cris Luengo [Sat, 19 Oct 2019 05:38:24 +0000 (23:38 -0600)]
documentation: Added support for strikethrough markdown formatting

in Doxygen documentation (`~~`).

5 years agopelican-theme: I thought the M_HTML_HEADER option was there always.
Vladimír Vondruš [Wed, 2 Oct 2019 17:26:15 +0000 (19:26 +0200)]
pelican-theme: I thought the M_HTML_HEADER option was there always.

But apparently not.

5 years agodocumentation: fix a crashy corner case with the typing module.
Vladimír Vondruš [Fri, 27 Sep 2019 18:19:09 +0000 (20:19 +0200)]
documentation: fix a crashy corner case with the typing module.

WHY IS IT SUCH A DUMPSTER FIRE

5 years agodocumentation: save 0.6 kB per page by optimizing the magnifier SVG.
Vladimír Vondruš [Sun, 15 Sep 2019 19:49:25 +0000 (21:49 +0200)]
documentation: save 0.6 kB per page by optimizing the magnifier SVG.

I should have used <use> since the beginning, heh. The magnifier is now
exported with Inkscape with just 3 significant decimal places (instead
of 5) and that's apparently more than enough.

5 years agodocumentation/python, m.sphinx: support documenting raised exceptions.
Vladimír Vondruš [Sun, 15 Sep 2019 19:34:22 +0000 (21:34 +0200)]
documentation/python, m.sphinx: support documenting raised exceptions.

5 years agom.sphinx: improve docs in various places.
Vladimír Vondruš [Sun, 15 Sep 2019 19:26:57 +0000 (21:26 +0200)]
m.sphinx: improve docs in various places.

5 years agodocumentation/python: clean up and fix property doc extraction.
Vladimír Vondruš [Sun, 15 Sep 2019 15:57:20 +0000 (17:57 +0200)]
documentation/python: clean up and fix property doc extraction.

Now it's no early returns, making the docstring parsing less
duplicated, and also fixing the problem with slots/attrs/getset things
not being exposed to search.

5 years agodocumentation/python: test that a slot is properly added to search.
Vladimír Vondruš [Sun, 15 Sep 2019 15:53:25 +0000 (17:53 +0200)]
documentation/python: test that a slot is properly added to search.

It's not because extract_property_doc() has a few early returns that
fail to execute the search-adding code.

5 years agodoc: i wrote this half asleep, apparently.
Vladimír Vondruš [Sun, 15 Sep 2019 14:48:47 +0000 (16:48 +0200)]
doc: i wrote this half asleep, apparently.

5 years agodocumentation/python: this should be checking for subtitle, actually.
Vladimír Vondruš [Thu, 12 Sep 2019 20:57:40 +0000 (22:57 +0200)]
documentation/python: this should be checking for subtitle, actually.

Otherwise it prints None there and that's everything but desired.

5 years agodocumentation/doxygen: well, whatever.
Vladimír Vondruš [Thu, 12 Sep 2019 20:56:40 +0000 (22:56 +0200)]
documentation/doxygen: well, whatever.

This is a weird quirk of the Doxyfile parsing. I don't care, actually.
Not worth spending time on. Put quotes around.

5 years agoSupport navbar project / brand logo in all three themes.
Vladimír Vondruš [Thu, 12 Sep 2019 20:54:33 +0000 (22:54 +0200)]
Support navbar project / brand logo in all three themes.

5 years agocss: add styling for brand logo in the navbar.
Vladimír Vondruš [Thu, 12 Sep 2019 19:51:04 +0000 (21:51 +0200)]
css: add styling for brand logo in the navbar.

Interesting, I added support for this into the Pelican theme at the
very beginning, but didn't actually get to styling or testing it at
all.

5 years agodoc: various minor improvements.
Vladimír Vondruš [Thu, 12 Sep 2019 19:29:03 +0000 (21:29 +0200)]
doc: various minor improvements.

5 years agocss: support .m-badge on standalone images as well.
Vladimír Vondruš [Thu, 12 Sep 2019 19:28:10 +0000 (21:28 +0200)]
css: support .m-badge on standalone images as well.

5 years agocss: deduplicate block/inline styling.
Vladimír Vondruš [Thu, 12 Sep 2019 19:04:19 +0000 (21:04 +0200)]
css: deduplicate block/inline styling.

5 years agocss: make it possible to control console color directly.
Vladimír Vondruš [Wed, 11 Sep 2019 10:56:03 +0000 (12:56 +0200)]
css: make it possible to control console color directly.

Having it the same as --code-color makes it impossible to have dark
console listings combined with light code listings. Also while at it,
made .m-inverted line highlighting work with console listings too.

This has a minor visual change for for higlighted .m-inverted lines --
probably by accident those were not reverted back to --code-color, but
rather --color, making them darker than they should be in the dark
theme.

5 years agocss: make it possible to specify a different color for header breadcrumb.
Vladimír Vondruš [Wed, 11 Sep 2019 10:52:26 +0000 (12:52 +0200)]
css: make it possible to specify a different color for header breadcrumb.

With brightly-colored headers the usual dim color doesn't make sense.
No visual change to the builtin themes, only adding flexibility for 3rd
party styles.

5 years agocss: style search background separately from the header navbar.
Vladimír Vondruš [Wed, 11 Sep 2019 10:50:56 +0000 (12:50 +0200)]
css: style search background separately from the header navbar.

Otherwise it's too much of a pain with bright-colored headers. No
visual change to the builtin themes, just adding flexibility for 3rd
party ones.

5 years agodocumentation/python: create output dir for each file if not exists.
Vladimír Vondruš [Tue, 10 Sep 2019 20:34:11 +0000 (22:34 +0200)]
documentation/python: create output dir for each file if not exists.

Otherwise an URL_FORMATTER putting things into subdirs won't really
work.

5 years agodocumentation/python: extend URL_FORMATTER also to static data.
Vladimír Vondruš [Tue, 10 Sep 2019 20:06:27 +0000 (22:06 +0200)]
documentation/python: extend URL_FORMATTER also to static data.

5 years agom.sphinx: add an option to repack a decompressed inventory file.
Vladimír Vondruš [Tue, 10 Sep 2019 17:47:43 +0000 (19:47 +0200)]
m.sphinx: add an option to repack a decompressed inventory file.

5 years agom.sphinx: dirty hack to make this file directly runnable.
Vladimír Vondruš [Tue, 10 Sep 2019 17:44:53 +0000 (19:44 +0200)]
m.sphinx: dirty hack to make this file directly runnable.

Because having to do

    python -m m.sphinx somefile.inv

is too unintuitive to remember.

5 years agom.sphinx: ensure fully qualified name links always have a precedence.
Vladimír Vondruš [Tue, 10 Sep 2019 17:42:50 +0000 (19:42 +0200)]
m.sphinx: ensure fully qualified name links always have a precedence.

The previously added test now passes.

5 years agodocumentation/python: test that fully qualified links get a precedence.
Vladimír Vondruš [Tue, 10 Sep 2019 17:37:17 +0000 (19:37 +0200)]
documentation/python: test that fully qualified links get a precedence.

They don't, unfortunately.

5 years agodocumentation/python: format overloaded func ID only if it's overloaded.
Vladimír Vondruš [Tue, 10 Sep 2019 17:30:09 +0000 (19:30 +0200)]
documentation/python: format overloaded func ID only if it's overloaded.

So "pybound" functions without overloads still can have nice IDs and
URLs. This should have been done together with
1cd0bb44b77b4225fc5156e1ea7c1a790fe9f7a8 and
6db6b4c4f8296b0fa1b08ce6edeb942db321f6b4 already, but somehow I didn't
make the connection.

5 years agodocumentation/python: avoid aliasing variables in signature parsing code.
Vladimír Vondruš [Sun, 8 Sep 2019 11:10:34 +0000 (13:10 +0200)]
documentation/python: avoid aliasing variables in signature parsing code.

And avoid unpacking the whole tuple when we need just one item. It was
very hard to reason about otherwise.

5 years agom.sphinx: allow to link to special pages.
Vladimír Vondruš [Fri, 6 Sep 2019 17:12:50 +0000 (19:12 +0200)]
m.sphinx: allow to link to special pages.

5 years agodocumentation/python: add some TODOs.
Vladimír Vondruš [Fri, 6 Sep 2019 11:52:58 +0000 (13:52 +0200)]
documentation/python: add some TODOs.

5 years agoplugins: leave this there commented-out so I don't need to search again.
Vladimír Vondruš [Fri, 6 Sep 2019 11:52:18 +0000 (13:52 +0200)]
plugins: leave this there commented-out so I don't need to search again.

5 years agom.sphinx: implement a page-wide :ref-prefix: option.
Vladimír Vondruš [Fri, 6 Sep 2019 11:33:06 +0000 (13:33 +0200)]
m.sphinx: implement a page-wide :ref-prefix: option.

NOW I can start writing real docs without everything being a giant PITA.

5 years agodocumentation/python: fire scope hooks for page rendering as well.
Vladimír Vondruš [Fri, 6 Sep 2019 10:30:11 +0000 (12:30 +0200)]
documentation/python: fire scope hooks for page rendering as well.

Right now this will be used to implement a page-specific :ref-prefix:
option, but in the future it can be used also for relative linking to
pages and such.

5 years agodoc: uh oh.
Vladimír Vondruš [Fri, 6 Sep 2019 10:28:34 +0000 (12:28 +0200)]
doc: uh oh.

5 years agoVarious bits to improve code coverage.
Vladimír Vondruš [Fri, 6 Sep 2019 10:27:22 +0000 (12:27 +0200)]
Various bits to improve code coverage.

5 years agodocumentation/python: pull additional stuff from __annotations__.
Vladimír Vondruš [Fri, 6 Sep 2019 00:07:51 +0000 (02:07 +0200)]
documentation/python: pull additional stuff from __annotations__.

5 years agodocumentation/python: include documented underscored names.
Vladimír Vondruš [Thu, 5 Sep 2019 22:36:07 +0000 (00:36 +0200)]
documentation/python: include documented underscored names.

5 years agodocumentation/python: don't die on reST errors in pages.
Vladimír Vondruš [Thu, 5 Sep 2019 18:20:34 +0000 (20:20 +0200)]
documentation/python: don't die on reST errors in pages.

5 years agodocumentation/python: this copypaste is like a cancer.
Vladimír Vondruš [Thu, 5 Sep 2019 18:19:25 +0000 (20:19 +0200)]
documentation/python: this copypaste is like a cancer.

Spreads everywhere.

5 years agodocumentation/python: avoid blowing up on __name__ not being an attrib.
Vladimír Vondruš [Wed, 4 Sep 2019 18:37:15 +0000 (20:37 +0200)]
documentation/python: avoid blowing up on __name__ not being an attrib.

Don't want to test for this, seems too obscure.

5 years agodocumentation/python: handle ... in type annotations.
Vladimír Vondruš [Wed, 4 Sep 2019 18:33:36 +0000 (20:33 +0200)]
documentation/python: handle ... in type annotations.

Until now I didn't know code like `if annotation is ...` is possible.
What will come next, using // as an operator?!

5 years agodocumentation/python: gracefully handle nested annotation parsing failures.
Vladimír Vondruš [Wed, 4 Sep 2019 18:28:58 +0000 (20:28 +0200)]
documentation/python: gracefully handle nested annotation parsing failures.

5 years agodocumentation/python: don't be so enthusiastic with pybind sig matching.
Vladimír Vondruš [Wed, 4 Sep 2019 18:21:43 +0000 (20:21 +0200)]
documentation/python: don't be so enthusiastic with pybind sig matching.

5 years agodocumentation/python: test for false positives for pybind signatures.
Vladimír Vondruš [Wed, 4 Sep 2019 18:19:50 +0000 (20:19 +0200)]
documentation/python: test for false positives for pybind signatures.

This blows up. Heh.

5 years agodocumentation/python: try not to use `type` for a variable name.
Vladimír Vondruš [Wed, 4 Sep 2019 18:17:38 +0000 (20:17 +0200)]
documentation/python: try not to use `type` for a variable name.

I wanted to check a type of a variable there.

5 years agodocumentation/doxygen: don't use entity if it fails to be found.
Vladimír Vondruš [Wed, 4 Sep 2019 18:16:53 +0000 (20:16 +0200)]
documentation/doxygen: don't use entity if it fails to be found.

5 years agom.code: doc++
Vladimír Vondruš [Wed, 4 Sep 2019 18:16:24 +0000 (20:16 +0200)]
m.code: doc++

Be consistent with the actual output.

5 years agom.code: ability to apply filters before/after the code is highlighted.
Vladimír Vondruš [Tue, 3 Sep 2019 21:38:47 +0000 (23:38 +0200)]
m.code: ability to apply filters before/after the code is highlighted.

5 years agoplugins: don't implicitly depend on Pelican.
Vladimír Vondruš [Tue, 3 Sep 2019 19:57:59 +0000 (21:57 +0200)]
plugins: don't implicitly depend on Pelican.

Only when those actually get used from Pelican.

5 years agodocumentation/python: use an ellipsis for overly large values.
Vladimír Vondruš [Tue, 3 Sep 2019 18:20:01 +0000 (20:20 +0200)]
documentation/python: use an ellipsis for overly large values.

5 years agodoc: the Python doc generator is not experimental anymore.
Vladimír Vondruš [Tue, 3 Sep 2019 18:19:28 +0000 (20:19 +0200)]
doc: the Python doc generator is not experimental anymore.

5 years agom.sphinx: ignore duplicate entries in intersphinx inventories.
Vladimír Vondruš [Fri, 30 Aug 2019 18:36:10 +0000 (20:36 +0200)]
m.sphinx: ignore duplicate entries in intersphinx inventories.

The "index" is the main offender.

5 years agodocumentation/python: ensure relative includes work in parsed docs.
Vladimír Vondruš [Fri, 30 Aug 2019 17:59:08 +0000 (19:59 +0200)]
documentation/python: ensure relative includes work in parsed docs.

This is quite bad, but ... at least something.

5 years agodocumentation/python: add a NAME_MAPPING config option.
Vladimír Vondruš [Fri, 30 Aug 2019 17:10:51 +0000 (19:10 +0200)]
documentation/python: add a NAME_MAPPING config option.

5 years agodocumentation/python: minor naming cleanup.
Vladimír Vondruš [Fri, 30 Aug 2019 16:33:05 +0000 (18:33 +0200)]
documentation/python: minor naming cleanup.

5 years agodocumentation/python, m.sphinx: support for external enum value docs.
Vladimír Vondruš [Fri, 30 Aug 2019 16:26:18 +0000 (18:26 +0200)]
documentation/python, m.sphinx: support for external enum value docs.

5 years agom.sphinx: more convenient module/class data and properties documentation.
Vladimír Vondruš [Fri, 30 Aug 2019 14:13:29 +0000 (16:13 +0200)]
m.sphinx: more convenient module/class data and properties documentation.

Sometimes all you need is just a summary. Discovered during a port of a
larger project, writing all those fully-qualified .. py:property:: for all
members got boring *really* fast.

5 years agom.sphinx: extended the section about by-design restrictions.
Vladimír Vondruš [Fri, 30 Aug 2019 14:00:00 +0000 (16:00 +0200)]
m.sphinx: extended the section about by-design restrictions.

5 years agodocumentation/python: less responsibility on docstring-processing plugins.
Vladimír Vondruš [Fri, 30 Aug 2019 12:59:21 +0000 (14:59 +0200)]
documentation/python: less responsibility on docstring-processing plugins.

Until now, the plugin was expected to fill both summary and content for
the symbol it's ccalled on. THat made plugin implementation harder than it
should be, causing a lot of code duplication and explosion of testing
effort.

Now the script simply sills in summary / content if it isn't there after
all processing and that's it. No asserts anymore.

5 years agodocumentation/python: consistently use a single way to render Jinja pages.
Vladimír Vondruš [Fri, 30 Aug 2019 12:47:58 +0000 (14:47 +0200)]
documentation/python: consistently use a single way to render Jinja pages.

Otherwise I forget to specify important variables or do other critical
mistakes.

5 years agodocumentation/python: the feeling when you invert an important condition.
Vladimír Vondruš [Thu, 29 Aug 2019 08:35:01 +0000 (10:35 +0200)]
documentation/python: the feeling when you invert an important condition.

This was supposed to check that I was always specifying the version. Well,
it failed to check, and I failed to specify the version properly in all
cases.

5 years agodocumentation/python: implement a bunch of tricks for attrs.
Vladimír Vondruš [Wed, 28 Aug 2019 22:43:11 +0000 (00:43 +0200)]
documentation/python: implement a bunch of tricks for attrs.

Workarounds! Hacks! Smelly code!

5 years agodocumentation/python: properly shrink first column also with skipped self.
Vladimír Vondruš [Wed, 28 Aug 2019 22:32:01 +0000 (00:32 +0200)]
documentation/python: properly shrink first column also with skipped self.

This will break if the docs skip undocumented parameters, but since that's
technically an error, I don't care.

5 years agodocumentation/python: don't forget to handle scope for slots as well.
Vladimír Vondruš [Wed, 28 Aug 2019 21:58:46 +0000 (23:58 +0200)]
documentation/python: don't forget to handle scope for slots as well.

5 years agom.sphinx: added a :p: role for parameter referencing.
Vladimír Vondruš [Wed, 28 Aug 2019 20:31:29 +0000 (22:31 +0200)]
m.sphinx: added a :p: role for parameter referencing.

So tiny yet so useful. Doxygen, take a note.

5 years agodocumentation/python: implement scope enter/exit hooks.
Vladimír Vondruš [Wed, 28 Aug 2019 20:09:37 +0000 (22:09 +0200)]
documentation/python: implement scope enter/exit hooks.

With this we can have relative links for *everything*.

5 years agodocumentation/python: minor cleanup, naming consistency.
Vladimír Vondruš [Wed, 28 Aug 2019 19:20:04 +0000 (21:20 +0200)]
documentation/python: minor cleanup, naming consistency.

5 years agodocumentation/python: dying on each error isn't nice.
Vladimír Vondruš [Wed, 28 Aug 2019 17:43:18 +0000 (19:43 +0200)]
documentation/python: dying on each error isn't nice.

5 years agodocumentation/python: AAAAHHHH.
Vladimír Vondruš [Wed, 28 Aug 2019 16:08:38 +0000 (18:08 +0200)]
documentation/python: AAAAHHHH.

The test failure from the previous commit is no more.

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.