Commit Graph
7 Commits
Author SHA1 Message Date
Xavier Morel cca26f7952 [FIX] doc: workarounds for weirdo code & refs
Make UnknownNS more capable (of giving no fucks) so the documentation
builder blows up less on weird-ass code at module toplevels.

UnknownNS should probably be split out from NSDoc though, that requires
odd workarounds in `__getitem__`.
2019-02-18 08:55:57 +00:00
Xavier Morel 00eefae98d [FIX] doc: implement delegation/inheritance in JS documenter
Else website_sale_wishlist.wishlist blows up the documenter:
``events`` is set to sAnimations.Class.events but that is not an "own
property" of sAnimation.Class, it is instead inherited from Widget.

If delegation is not implemented, the value resolves to <nothing>,
which blows up when trying to set its name to the "property name" (by
calling ``set_name``).
2018-10-01 17:31:41 +02:00
Xavier Morel 0e307f8280 [FIX] doc building and warnings
doc:

* fix incorrect doc comments (documenting params which don't exist)
* correctly quote non-refs
* fix role label syntax (backticks must be escaped)
* add newline to fix warning

JS doc parser:

* fix handling of already-resolved objects
* fix handling of non-string properties (e.g. foo[0] at module toplevel)
* don't blow up if subject of .include call can't be resolved (just ignore)

Others:

* add translator support for ``problematic`` node (apparently used for
  some refs by recent Sphinx)
2018-08-27 12:55:21 +02:00
Xavier Morel a56372a4ca [FIX] various broken JS docstrings
Resulting in sphinx warnings or ill-formatted doc all the way to the
doc not building at all.
2018-07-24 12:06:13 +02:00
Xavier Morel f7323dbe23 [FIX] doc: informal sub-params
Revert 6cb12273e2 which reverted
08d48b0fff.

Issue was the support for sub-parameters (aka @param {type} foo.bar)
where the "parent" parameter was not formal (only present in a
function's docstring, but not in the function's parameters list),
subtype creation would fail to find a root parameter to attach the
sub-parameter to.

This has not actually been fixed, but for the specific case where the
formal parameters list is *completely empty* we fall back on a list of
the docstring's parameters, which works well enough for this case.
2018-01-10 12:36:58 +01:00
Xavier Morel 40ca8557e9 [FIX] building documentation with P3
* fix P3 incompatibilities in doc/_extensions
* vendor pyjsdoc, strip out everything we're not using and make what's
  left P3-compatible (upstream is not P3 compliant)
* drop undeclared dependency on attrs as it turns out not to be much
  used
2017-10-10 13:29:11 +02:00
Xavier Morel 313f69e948 [ADD] doc: JS document extraction system
* Fix a bunch of ill-documented/incomplete/incorrect method docs
* add start of Sphinx extension to extract & integrate jsdoc into
  Sphinx documentation:

  - parse JS files (and don't blow up), uses a fork of pyjsparser as
    the project currently does not parse comments
  - extract cross-module dependency information
  - parse JsDoc comments using pyjsdoc and infer structure from code &
    jsdoc
  - ``ast`` CLI printing a simplified AST of the input files
  - ``dependencies`` creating a dependency graph of either all modules
    in the provided input files or the modules matching the specified
    filters (warning: will not work if missing dependencies),
    generates a .dot file
  - ``extractor`` generating a plain text module documentation (mix of
    rst and markdown styles, not anything formal)
* sphinx extension with an "automodule" directive taking a module name
  and generating the documentation for it
2017-09-18 11:54:36 +02:00