Last modified: 2014-10-31 20:03:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74454, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72454 - OOjs UI: PHP docs should be auto-generated
OOjs UI: PHP docs should be auto-generated
Status: ASSIGNED
Product: OOjs UI
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: C. Scott Ananian
:
Depends on:
Blocks: 72713
  Show dependency treegraph
 
Reported: 2014-10-23 20:58 UTC by C. Scott Ananian
Modified: 2014-10-31 20:03 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description C. Scott Ananian 2014-10-23 20:58:46 UTC
Mediawiki has autogenerated JS and PHP docs at:
http://doc.wikimedia.org/mediawiki-core/master/php
http://doc.wikimedia.org/mediawiki-core/master/js

OOjs UI currently has docs at:
https://doc.wikimedia.org/oojs-ui/master/

These should be split into PHP and JS sections like for core.

There should be a Jenkins job which runs doxygen with a Doxyfile present at the root of the repo which updates doc.wikimedia.org.  Look at jenkins:tools/mwcore-docgen.sh which is triggered by the mediawiki-core-doxygen-publish job.

hashar: cscott: I would go with a configuration file named 'Doxyfile' at the root of the repository and a thin JJB job template that just invokes Doxygen
hashar: cscott: that would let dev easily tweak the doxygen configuration without having to make a JJB conf change and refresh the job
Comment 1 Gerrit Notification Bot 2014-10-23 22:01:03 UTC
Change 168490 had a related patch set uploaded by Cscott:
Conf for doxygen based PHP doc

https://gerrit.wikimedia.org/r/168490
Comment 2 Gerrit Notification Bot 2014-10-29 23:33:20 UTC
Change 168490 merged by jenkins-bot:
Conf for doxygen based PHP doc

https://gerrit.wikimedia.org/r/168490
Comment 3 James Forrester 2014-10-30 01:41:33 UTC
Does this now need a jenkins config change?
Comment 4 Antoine "hashar" Musso (WMF) 2014-10-30 11:10:23 UTC
(In reply to James Forrester from comment #3)
> Does this now need a jenkins config change?

Definitely :-)


I wrote an overview of the architecture we are using to generate documentation on slave and have them ultimately published to doc.wikimedia.org. It has a very simple job template example: https://www.mediawiki.org/wiki/Continuous_integration/Documentation_generation

Some additional guidelines:

* the job should be run on Trusty slaves using:

   node: contintLabsSlave && UbuntuTrusty

* use the zuul-cloner to clone the repository (see jjb/macro-scm.yaml) should be as simple as:

   builders:
    - zuul-cloner:
        projects: "oojs/ui"

  The clone is made under $WORKSPACE/src/$ZUUL_PROJECT so the doxygen builder would be:

   - shell: |
      cd src/$ZUUL_PROJECT
      doxygen

* the output destination is defined in the Doxyfile. We could parse the file to figure it out but it is probably easier to just hardcode it for now:

  - push-doc:
    docsrc: 'src/oojs/ui/docs/php'  # path in the workspace
    docdest: 'oojs-ui/php'  # destination under doc.wikimedia.org


A few culprits:

* there is already some jsduck documentation published, probably want to namespace the path based on the language (php / js).
* we do not have a shell helper yet to easily namespace by git branch / tag. IIRC there is some logic around hardcoded in the jsduck macro for it.


Later on we can refactor the resulting job template to make it reusable by other projects as well.
Comment 5 Antoine "hashar" Musso (WMF) 2014-10-30 11:14:40 UTC
And I just found out on stackoverflow that we can probably override the destination directory used by doxygen using something like:

 ( cd $WORKSPACE/src/$ZUUL_PROJECT; cat Doxyfile ; echo "HTML_OUTPUT=$WORKSPACE/build/doc" ) | doxygen -

Thus the push-docs macro docsrc parameter can be hardcoded to "build/doc" :D
Comment 6 Gerrit Notification Bot 2014-10-30 12:36:40 UTC
Change 170012 had a related patch set uploaded by Hashar:
contint: Graphviz on Jenkins slaves

https://gerrit.wikimedia.org/r/170012
Comment 7 Gerrit Notification Bot 2014-10-30 23:11:09 UTC
Change 170012 merged by Dzahn:
contint: Graphviz on Jenkins slaves

https://gerrit.wikimedia.org/r/170012

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links