Closed Bug 1441019 Opened 6 years ago Closed 6 years ago

Move to Sphinx automatic JSDoc generation

Categories

(Remote Protocol :: Marionette, enhancement, P1)

Version 3
enhancement

Tracking

(firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: ato, Assigned: ato)

Details

Attachments

(12 files)

59 bytes, text/x-review-board-request
whimboo
: review+
Details
59 bytes, text/x-review-board-request
whimboo
: review+
Details
59 bytes, text/x-review-board-request
whimboo
: review+
Details
59 bytes, text/x-review-board-request
whimboo
: review+
Details
59 bytes, text/x-review-board-request
whimboo
: review+
Details
59 bytes, text/x-review-board-request
gps
: review+
Details
59 bytes, text/x-review-board-request
whimboo
: review+
Details
59 bytes, text/x-review-board-request
whimboo
: review+
Details
59 bytes, text/x-review-board-request
whimboo
: review+
Details
59 bytes, text/x-review-board-request
whimboo
: review+
Details
59 bytes, text/x-review-board-request
whimboo
: review+
Details
59 bytes, text/x-review-board-request
whimboo
: review+
Details
Sphinx now supports embedding jsdoc documentation, and instead of
statically generating testing/marionette/doc/api manually we can
hook into that and have the documentation automatically generated
on TC, and published directly to http://firefox-source-docs.mozilla.org/.
Assignee: nobody → ato
Status: NEW → ASSIGNED
Hurray! Does it mean we finally get rid of the generated HTML files in-tree? That is wonderful!
The attached patches remove the statically generated documentation
and sets up the integration with sphinx-js.

They also make a start at converting some HTML-flavoured JSDocs
into RST, which apparently is required if we are to publish
with Sphinx.  I don’t particularly like the extra churn this
causes, but I think there is inherent value in being published on
http://firefox-source-docs.mozilla.org/ that perhaps makes it worth it.
Priority: -- → P1
Comment on attachment 8953952 [details]
Bug 1441019 - Remove pre-generated Marionette API docs.

https://reviewboard.mozilla.org/r/223094/#review229194
Attachment #8953952 - Flags: review?(hskupin) → review+
Comment on attachment 8953953 [details]
Bug 1441019 - Remove jsdoc config.

https://reviewboard.mozilla.org/r/223096/#review229196
Attachment #8953953 - Flags: review?(hskupin) → review+
Comment on attachment 8953957 [details]
Bug 1441019 - Add testing/marionette to js_source_path.

https://reviewboard.mozilla.org/r/223104/#review229198

Sure.
Attachment #8953957 - Flags: review+
Comment on attachment 8953954 [details]
Bug 1441019 - Remove "./mach marionette doc" command.

https://reviewboard.mozilla.org/r/223098/#review229200

::: commit-message-c16a6:3
(Diff revision 1)
> +Bug 1441019 - Remove "./mach marionette test" command. r?whimboo
> +
> +This removes the "./mach marionette test" command in favour of the

You mean `./mach marionette doc` here, right?
Attachment #8953954 - Flags: review?(hskupin) → review+
Comment on attachment 8953955 [details]
Bug 1441019 - Remove duplicate namespace declaration.

https://reviewboard.mozilla.org/r/223100/#review229202

Maybe mention that this is for event.js.
Attachment #8953955 - Flags: review?(hskupin) → review+
Comment on attachment 8953956 [details]
Bug 1441019 - Differentiate WorkerDebuggerTransport implementations.

https://reviewboard.mozilla.org/r/223102/#review229206
Attachment #8953956 - Flags: review?(hskupin) → review+
Comment on attachment 8953958 [details]
Bug 1441019 - Add jsautodoc indices.

https://reviewboard.mozilla.org/r/223106/#review229210

Please fill-in at least the basics for cookie.rst.
Attachment #8953958 - Flags: review?(hskupin) → review+
Comment on attachment 8953959 [details]
Bug 1441019 - Migrate cookie module docs to RST.

https://reviewboard.mozilla.org/r/223108/#review229212
Attachment #8953959 - Flags: review?(hskupin) → review+
Comment on attachment 8953960 [details]
Bug 1441019 - Document Marionette error module.

https://reviewboard.mozilla.org/r/223110/#review229218
Attachment #8953960 - Flags: review?(hskupin) → review+
Comment on attachment 8953961 [details]
Bug 1441019 - Migrate dom module docs to RST.

https://reviewboard.mozilla.org/r/223112/#review229220

::: testing/marionette/doc/internals/dom.rst
(Diff revision 1)
>  dom module
>  ==========
>  
> -ContentEventObserverService
> ----------------------------

Better to kill those lines in the initial patch.

::: testing/marionette/dom.js:13
(Diff revision 1)
>    "ContentEventObserverService",
>    "WebElementEventTarget",
>  ];
>  
>  /**
> - * The {@link EventTarget} for web elements can be used to observe DOM
> + * The ``EventTarget`` for web elements can be used to observe DOM

Does that render as link, or do we have to keep something like :js:property:`EventTarget`?

::: testing/marionette/dom.js:22
(Diff revision 1)
> - * to listen for top-level <code>window</code> global events.
> + * to listen for top-level ``window`` global events.
>   *
> - * It needs to be backed by a {@link ContentEventObserverService} in a
> - * content frame script.
> + * It needs to be backed by a :js:class:`ContentEventObserverService`
> + * in a content frame script.
>   *
> - * Usage:
> + * Usage::

Why a double-colon?

::: testing/marionette/dom.js
(Diff revision 1)
> - * It needs to be backed by a {@link ContentEventObserverService} in a
> - * content frame script.
> + * It needs to be backed by a :js:class:`ContentEventObserverService`
> + * in a content frame script.
>   *
> - * Usage:
> + * Usage::
>   *
> - * <pre><code>

So we don't have to instruct sphinx-js to render something as code?
Attachment #8953961 - Flags: review?(hskupin)
Comment on attachment 8953961 [details]
Bug 1441019 - Migrate dom module docs to RST.

https://reviewboard.mozilla.org/r/223112/#review229220

> Does that render as link, or do we have to keep something like :js:property:`EventTarget`?

It will just render as monospace.  The JSDoc link from before never
lead anywhere because the EventTarget WebIDL isn’t defined.

> Why a double-colon?

This is RST syntax for pre-formatted monospace stuff, like code
examples.

> So we don't have to instruct sphinx-js to render something as code?

Implied by the double colon.
Comment on attachment 8953962 [details]
Bug 1441019 - Migrate sync module docs to RST.

https://reviewboard.mozilla.org/r/223114/#review229224

::: testing/marionette/doc/internals/sync.rst:4
(Diff revision 1)
>  sync module
>  ===========
>  
> +Provides an assortment of synchronisation primitives.

Best to already add this to the initial patch.

::: testing/marionette/sync.js
(Diff revision 1)
> + * The passed value to ``reject`` will also be returned to the caller
> + * once the wait has expired.
> + *
> + * Usage::
>   *
> - * <pre><code>

Same question regarding code examples as in the other commit.

::: testing/marionette/sync.js:118
(Diff revision 1)
>  /**
> - * The <code>TimedPromise</code> object represents the timed, eventual
> - * completion (or failure) of an asynchronous operation, and its
> + * Represents the timed, eventual completion (or failure) of an
> + * asynchronous operation, and its resulting value.
> - * resulting value.
>   *
> - * In contrast to a regular {@link Promise}, it times out after
> + * In contrast to a regular promise, it times out after ``timeout``.

`Promise` please.
Attachment #8953962 - Flags: review?(hskupin)
Comment on attachment 8953963 [details]
Bug 1441019 - Add overviews and links to new API docs.

https://reviewboard.mozilla.org/r/223116/#review229256

::: testing/marionette/doc/index.rst:54
(Diff revision 1)
>     `Contributing to Marionette`_
>     NewContributors.md
>     Debugging.md
>     PythonTests.md
>     SeleniumAtoms.md
> +   internals/index

Internals doesn't say that much, but not sure if there is something better.
Attachment #8953963 - Flags: review?(hskupin) → review+
Comment on attachment 8953962 [details]
Bug 1441019 - Migrate sync module docs to RST.

https://reviewboard.mozilla.org/r/223114/#review229224

> Same question regarding code examples as in the other commit.

Double colon will start a code section.
Attachment #8953957 - Flags: review?(core-build-config-reviews) → review?(gps)
Comment on attachment 8953957 [details]
Bug 1441019 - Add testing/marionette to js_source_path.

https://reviewboard.mozilla.org/r/223104/#review229304

We should really get JS docs support in moz.build files...
Attachment #8953957 - Flags: review?(gps) → review+
Comment on attachment 8953962 [details]
Bug 1441019 - Migrate sync module docs to RST.

https://reviewboard.mozilla.org/r/223114/#review229462
Attachment #8953962 - Flags: review?(hskupin) → review+
Comment on attachment 8953961 [details]
Bug 1441019 - Migrate dom module docs to RST.

https://reviewboard.mozilla.org/r/223112/#review229464
Attachment #8953961 - Flags: review?(hskupin) → review+
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/64aac0ce028b
Remove pre-generated Marionette API docs. r=whimboo
https://hg.mozilla.org/integration/autoland/rev/2148942fab87
Remove jsdoc config. r=whimboo
https://hg.mozilla.org/integration/autoland/rev/e490cf5bb284
Remove "./mach marionette doc" command. r=whimboo
https://hg.mozilla.org/integration/autoland/rev/7ec2b7ddb765
Remove duplicate namespace declaration. r=whimboo
https://hg.mozilla.org/integration/autoland/rev/bcf02942d86e
Differentiate WorkerDebuggerTransport implementations. r=whimboo
https://hg.mozilla.org/integration/autoland/rev/bc74d07ad0da
Add testing/marionette to js_source_path. r=gps,nalexander
https://hg.mozilla.org/integration/autoland/rev/af130eb9481f
Add jsautodoc indices. r=whimboo
https://hg.mozilla.org/integration/autoland/rev/0995940608cf
Migrate cookie module docs to RST. r=whimboo
https://hg.mozilla.org/integration/autoland/rev/266b7514fc1f
Document Marionette error module. r=whimboo
https://hg.mozilla.org/integration/autoland/rev/ffbc1e20455e
Migrate dom module docs to RST. r=whimboo
https://hg.mozilla.org/integration/autoland/rev/00b77f68b9fb
Migrate sync module docs to RST. r=whimboo
https://hg.mozilla.org/integration/autoland/rev/8e612e57fc49
Add overviews and links to new API docs. r=whimboo
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: