Commit Graph

69 Commits

Author SHA1 Message Date
Andrew Halberstadt
cb800e2585 Bug 1454640 - [mozbuild] Ability to find sphinx variables relevant to a given path r=mshal
The current mechanism for reading SPHINX variables assumes we always want to
read metadata for the entire tree. Now that we have the ability to rebuild
specific subtrees, this assumption is false.

This patch allows us to specify a path that find_sphinx_variables can use to
filter down the set of moz.build variables it will traverse, yielding only
moz.builds that could potentially impact the specified path.

MozReview-Commit-ID: ALrCFLFgMLH

--HG--
extra : rebase_source : d0c26a006bb4dbc429be5eedad7825d4412dc2a4
2018-04-17 11:51:37 -04:00
Andrew Halberstadt
8ab3f6ec83 Bug 1454640 - [docs] Memoize the result of processing sphinx moz.build variables r=mshal
Now that we can rebuild docs with the liveserver, there are some optimizations
we should make. One of those is processing the sphinx moz.build variables. This
patch makes sure we don't re-process moz.build if we've already done so in a
previous rebuild.

MozReview-Commit-ID: 2AIr1KeAPQV

--HG--
extra : rebase_source : d8034ef5be416975c19a473d5a13f073e95aba80
2018-04-18 15:01:10 -04:00
Andrew Halberstadt
09c473ae93 Bug 1454640 - [docs] Use a single SphinxManager instance across all rebuilds r=mshal
In the mozbuild.sphinx extension, we create a new SphinxManager instance each
time. However this isn't ideal now that we can rebuild the docs within the same
interpreter using the livereload server.

This makes use of a singleton so that we can share state not only between
multiple invocations of sphinx-build, but also with the mach command. This will
be taken advantage of more heavily in future commits in this series.

MozReview-Commit-ID: 7ERYeN5BPeI

--HG--
extra : rebase_source : 44aee637ea9b828b43b82e8639ddc3cc7f68c797
2018-04-18 12:56:55 -04:00
Andrew Halberstadt
b8deae6620 Bug 1454640 - [moztreedocs] Move 'create_tarball' into a package submodule r=mshal
These two functions are typically only used by CI for packaging/uploading the
documentation. This is a minor re-organiztion for clarity.

MozReview-Commit-ID: 62UhQhSSkOs

--HG--
extra : rebase_source : c5b800734041689453f965e50ce356c2e7a623d2
2018-04-18 12:17:44 -04:00
Dorel Luca
70e79e52cd Backed out 11 changesets (bug 1437593) for Doc linting failure. CLOSED TREE
Backed out changeset 0f3dbbd73ed4 (bug 1437593)
Backed out changeset 64c84cf90e8b (bug 1437593)
Backed out changeset 36c66615886f (bug 1437593)
Backed out changeset dfafbe7770ad (bug 1437593)
Backed out changeset 900f32450a74 (bug 1437593)
Backed out changeset d6fe456bb39c (bug 1437593)
Backed out changeset 4842e4b68d82 (bug 1437593)
Backed out changeset e024b3d775fd (bug 1437593)
Backed out changeset ce9e3951357a (bug 1437593)
Backed out changeset afaeac146ff8 (bug 1437593)
Backed out changeset 88954bcf6ca2 (bug 1437593)
2018-04-28 12:02:02 +03:00
Dave Hunt
3899c75e16 Bug 1437593 - Use pipenv for |mach doc| environment; r=ted
MozReview-Commit-ID: Ek2XnJRsDFI

--HG--
extra : rebase_source : 31ad2a183cf4a63fdd236aaf85a30cdda6849835
2018-03-27 13:10:05 +01:00
Gurzau Raul
677f146915 Backed out 11 changesets (bug 1437593) for SpiderMonkey failures on a CLOSED TREE
Backed out changeset e4b2357330b4 (bug 1437593)
Backed out changeset 8cb34c11ad45 (bug 1437593)
Backed out changeset ab27411c53c2 (bug 1437593)
Backed out changeset c90a0961f52a (bug 1437593)
Backed out changeset 60114a93b6b1 (bug 1437593)
Backed out changeset d12eec17c51c (bug 1437593)
Backed out changeset 2f83246cb0b1 (bug 1437593)
Backed out changeset 19b7273e375c (bug 1437593)
Backed out changeset cf026c071b73 (bug 1437593)
Backed out changeset c7fa833eff1d (bug 1437593)
Backed out changeset 828caab5032d (bug 1437593)
2018-04-27 02:20:39 +03:00
Dave Hunt
e8ea830d6f Bug 1437593 - Use pipenv for |mach doc| environment; r=ted
MozReview-Commit-ID: Ek2XnJRsDFI

--HG--
extra : rebase_source : 31ad2a183cf4a63fdd236aaf85a30cdda6849835
2018-03-27 13:10:05 +01:00
Andrew Halberstadt
c52efbdc58 Bug 1410424 - [docs] Support live reloading with |mach doc| r=mshal
This changes the default to opening a livereload webserver after doc generation
(as opposed to opening the index file). Any changes to the specified path will
result in a rebuild and refresh of the browser.

For example, if you run:

    ./mach doc tools/lint

The linting docs will be built, served and opened in a browser. Modifying any
file under 'tools/lint/docs' will refresh the browser with your changes.

To disable this behaviour and simply open the index file, you can pass in
'--no-serve'. The '--no-open' flag will continue to work (both with http and
the file system).

One caveat to this patch is that when generating the root docs (by running
|mach doc|), we don't watch all possible doc paths (just the root one under
'tools/docs/'). This will probably be fixed in the follow-up bug 1454640.

MozReview-Commit-ID: FQecuePM0zZ

--HG--
extra : rebase_source : 3240402d7505e99a4f64dada309b1baec78306e1
2018-04-06 10:52:56 -04:00
Andrew Halberstadt
73873ac2df Bug 1410424 - [docs] Remove ability to specify multiple doc paths at the same time r=mshal
This removes the ability to specify multiple doc paths at the same time with
|mach doc|. We will be changing the default from opening index files to serving
the documentation with a webserver. Supporting multiple doc roots would mean
spinning up multiple servers in different threads.

This would add a lot of complexity for a feature which I don't think is very
useful. It's very rare that one would need to edit more than one doc location
at the same time. And if this is ever needed, the developer can just build the
entire doctree (by running |mach doc|) or run |mach doc <path>| in multiple
different terminals.

MozReview-Commit-ID: GXEZJSgLpgF

--HG--
extra : rebase_source : 2eda23274eb6c2be82f7e77ca577072386bada34
2018-04-06 10:30:31 -04:00
Andrew Halberstadt
853598e23e Bug 1410424 - [mozbuild] Add a 'quiet' argument to VirtualenvManager.install_pip_requirements r=mshal
Some requirements.txt are very large and result in a lot of package already
installed messages. Would be nice to hide this.

MozReview-Commit-ID: FQecuePM0zZ

--HG--
extra : rebase_source : 58eaa7324775cfaa39077871be0be0ef39ad7c11
2018-04-06 10:23:49 -04:00
Kris Maglione
5f201b2222 Bug 1372406: Follow-up: Add missing source directory to docs config. r=bustage
MozReview-Commit-ID: 5fb1OBnItRS

--HG--
extra : rebase_source : 707bce15f9b5983cf3fd2ae8454a132101891b2e
2018-03-28 12:23:15 -07:00
Sylvestre Ledru
a0ab39f145 Bug 1438839 - Fix the remaining flake8 issues by hand r=ahal
MozReview-Commit-ID: Fv1MZIpCL8Z

--HG--
extra : rebase_source : 804567a78a5696997e2aa511814a4f8ff22d9c31
extra : histedit_source : 88401e831d81708b6ed6122666ba9fa8c1de23d5
2018-03-15 11:34:03 +01:00
Sylvestre Ledru
ef5ad1811f Bug 1438839 - autopep8 -i --max-line-length 99 on the tools/ r=ahal
MozReview-Commit-ID: KSKbctxjxl0

--HG--
extra : rebase_source : feebd58ff005750face884035f85a55e0ff638c8
extra : histedit_source : 5d7464caeb41bad25bc99d3b2e32ea5285464499
2018-03-15 11:32:42 +01:00
Andreas Tolfsen
612979856b Bug 1441019 - Add testing/marionette to js_source_path. r=gps,nalexander
MozReview-Commit-ID: Lvj7zbnzpLR

--HG--
extra : rebase_source : 84fc2f2cb09d89715cf902152798ccb8f1c14545
2018-02-22 16:32:49 +00:00
Andrew Halberstadt
033f64e234 Bug 1437484 - Pin and hash all requirements for |mach doc|, r=gps
Previously we weren't explicitly installing sphinx. Instead, the 'sphinx-js'
package had a dependency on 'sphinx<2.0'. This caused errors when sphinx
released their backwards incompatible version 1.7.

This patch pins sphinx==1.6.7 and adds all other dependencies to the same
requirements.txt (with hashes).

Upgrading to sphinx==1.7 will happen in a follow-up.

MozReview-Commit-ID: 28fKI7T4vfa

--HG--
extra : rebase_source : a9f276586ed08f49c1a26088aae88c363a31c167
2018-02-12 09:36:12 -05:00
Nick Alexander
9d65a9cea8 Bug 1435424 - Remove doxygen support from the build system. r=gps
This is ancient and the team that used it (gfx) is no longer using it.

MozReview-Commit-ID: HrDgmAU9QeW

--HG--
extra : rebase_source : c4a64965c4ae1a50888893e881a6e8a9688a58b6
2018-02-02 14:24:18 -08:00
Andrew Swan
795e20a3a6 Bug 1423425 Initial draft of WebExtensions API documentation r=bsilverberg
MozReview-Commit-ID: EwcE881XGfp

--HG--
extra : rebase_source : 70283e30375019e56c355dd61c92352b31481228
2017-12-05 18:54:34 -08:00
Andrew Swan
27e300a51e Bug 1423425 Let sphinx-js read .js files r=erik
MozReview-Commit-ID: LfL3CG6L4Ss

--HG--
extra : rebase_source : 5a53dac9891fc9233a8b380c4a52eb9154c564a9
2017-12-05 18:53:59 -08:00
Cosmin Sabou
2d8d0b4c2c Backed out 3 changesets (bug 1423425) for frequent browser chrome failures r=backout on a CLOSED TREE
Backed out changeset c3ac950b0b8a (bug 1423425)
Backed out changeset d64fd69a4b88 (bug 1423425)
Backed out changeset 04017639642a (bug 1423425)
2017-12-16 02:45:41 +02:00
Andrew Swan
8c271228b8 Bug 1423425 Initial draft of WebExtensions API documentation r=bsilverberg
MozReview-Commit-ID: EwcE881XGfp

--HG--
extra : rebase_source : 13ef6ba6ff73349c9fe5c25f16b305418b9804ff
2017-12-05 18:54:34 -08:00
Andrew Swan
02474d47f7 Bug 1423425 Let sphinx-js read .js files r=erik
MozReview-Commit-ID: LfL3CG6L4Ss

--HG--
extra : rebase_source : 5a53dac9891fc9233a8b380c4a52eb9154c564a9
2017-12-05 18:53:59 -08:00
Andrew Halberstadt
07b162ff59 Bug 1419772 - [docs] Enable the sphinx.ext.napoleon extension, r=gps
This enables sphinx to parse both the google and numpy style docstring
formats which tend to be more human readable than the default sphinx
format.

See:
http://www.sphinx-doc.org/en/stable/ext/napoleon.html

MozReview-Commit-ID: REmZ4IoUG8

--HG--
extra : rebase_source : 4e3e788d09a7fcc3d3e84bb94744019583e1ee5e
2017-11-22 10:17:12 -05:00
Tom Prince
c26f79ab2a Bug 1402154: Allow specifying an absolute path to mount sphinx docs. r=gps
MozReview-Commit-ID: 8OLCtwg8zXc

--HG--
extra : rebase_source : ad2ab3272d8f326f80287b190e779366872d95fc
2017-11-20 11:56:52 -07:00
Robert Helmer
56ca69de9d Bug 1389341 - start generating jsdoc for AddonManager API r=kmag
MozReview-Commit-ID: IpREaXBIMbq

--HG--
extra : rebase_source : 83fa1b40a52f890b25bbf477bef2aaf146f77098
2017-09-14 13:18:11 -07:00
Robert Helmer
42315c18f8 Bug 1389341 - add basic support for sphinx-js to mach doc r=gps
MozReview-Commit-ID: FIzWD8tnjYi

--HG--
extra : rebase_source : 655ea46cffefda77f0908924fdbbb8d17212654a
2017-09-14 13:17:09 -07:00
Maja Frydrychowicz
1fe7490b20 Bug 1411430 - Support markdown in Sphinx docs; r=gps
MozReview-Commit-ID: IdRuC4AFarq

--HG--
extra : rebase_source : f0b6c72340920fad49ab06887cd25db436c82897
2017-10-23 09:59:31 -04:00
Gregory Szorc
3bc8ec26f0 Bug 1390693 - Use thread pool for S3 uploads; r=dustin
This reduces the time taken to upload the Firefox docs from ~30s to
~5s (per invocation).

MozReview-Commit-ID: DxOrvxvVn42

--HG--
extra : rebase_source : b170fb728267c43484573e0a57ebc96512eb0e7c
2017-08-24 12:38:01 -07:00
Gregory Szorc
10773f0d43 Bug 1390693 - Upload docs to project and version specific locations; r=dustin
Previously, we uploaded the main Firefox tree docs to /.

In reality, there are multiple Sphinx projects in the repo. In
addition, it is sometimes desirable to access docs for an older
version of Firefox.

In this commit, we add support for specifying the S3 key prefix
for uploads. Then we change the upload code to upload to multiple
locations:

* <project>/latest (always)
* <project>/<version> (if a version is defined in the Sphinx config)
* / (for the main Sphinx docs project)

For the Firefox docs, ``version`` corresponds to a sanitized value from
``milestone.txt``. Currently, it resolves to ``57.0``.

While we're here, we add support for declaring an alternate project
name in the Sphinx conf.py file. If ``moz_project_name`` is defined,
we use that as the project name. For Firefox, we set it to ``main``.
This means our paths (local and uploaded) are now ``main`` instead of
``Mozilla_Source_Tree_Docs``. That's much more pleasant.

MozReview-Commit-ID: 8Gl6l2m6uU4

--HG--
extra : rebase_source : e56885092c12eb8cc76e5e7300f938be566e3e5a
extra : intermediate-source : 8509af1e135177a93460270b27f263c10a62d996
extra : source : 71b4f32caf209fe9dffc340c0b8ccb51ac79c7de
2017-08-24 11:12:21 -07:00
Gregory Szorc
17296bc970 Bug 1390693 - Fold mach doc-upload into mach doc; r=dustin
We now have an --upload flag to control whether upload is performed.

We don't inline it because we want to maintain a "firewall" between
regular docs and all the extra packages and imports needed for S3.

MozReview-Commit-ID: DVKhsS545gp

--HG--
extra : rebase_source : 7fee832145189be882db0f0ca057eda6158e0492
2017-08-24 11:31:54 -07:00
Gregory Szorc
fe9d8f05f7 Bug 1390693 - Use distribution_files() for finding files to upload; r=dustin
Instead of doing the file finding inside s3_upload(), the function now
takes the output of distribution_files().

The new code is much simpler.

MozReview-Commit-ID: 43i2Alvyu5i

--HG--
extra : rebase_source : 29d840c65acec794749edfda0e47193806f387f4
extra : source : 5a758defcf2f1a17de851e703388469300789ac5
2017-08-24 11:07:10 -07:00
Gregory Szorc
6e1b34b341 Bug 1390693 - Move S3 upload logic to standalone module; r=dustin
We try to keep mach_commands.py files as minimal as possible.

MozReview-Commit-ID: I4kvZtDjqGd

--HG--
extra : rebase_source : 7b0af45661fc2a8b0b906a569aa95df7d3e0513b
2017-08-24 10:49:28 -07:00
Gregory Szorc
4b1e2d4a2e Bug 1390693 - Generate docs archive within mach command; r=dustin
By using mozpack, we get deterministic archives. This also makes the
task command simpler.

MozReview-Commit-ID: EPI7tuGQuso

--HG--
extra : rebase_source : babcbf3d5607480321106b40eaa4598c0faee188
2017-08-24 10:37:53 -07:00
Gregory Szorc
4b8b2afa13 Bug 1390693 - Use separate variable for the base output directory; r=dustin
An upcoming commit will want to put something outside the
format-specific output directory.

MozReview-Commit-ID: 2kYDREddpN

--HG--
extra : rebase_source : 28454f71b3abbd094048edb568b4f5e8d50881d8
2017-08-24 10:31:41 -07:00
Gregory Szorc
cb3bd6045c Bug 1390693 - Indent code to make linter happy; r=dustin
I didn't fix all violations in this file. Something is better than
nothing.

MozReview-Commit-ID: BDdWhJfkPVk

--HG--
extra : rebase_source : caa0a5908c2cb37b8cbb1c5ee004d43e3a0b883a
2017-08-24 10:11:55 -07:00
Dustin J. Mitchell
64c81d4d30 Bug 1382729: allow uploading docs at all levels; r=gps
The upload now uses MOZ_SCM_LEVEL to determine which secret and bucket to
upload to, so it can potentially run at any level.

This also modifies task descriptions to allow {level} in scopes, and updates
try syntax to allow `-j doc-upload` even though run-on-tasks says it doesn't
run on try by default.

MozReview-Commit-ID: Dm27TGPa7IM

--HG--
extra : rebase_source : f1131abc8cd639251e085c8ebf776827a6b831ed
extra : amend_source : b2b0cb253c7f6e90fdd710c2c788877411bd9e1d
2017-08-08 19:13:05 +00:00
Dustin J. Mitchell
5a0dbc530f Bug 1382729: Upload documentation to S3 automatically; r=gps
This uses credentials stored in the Taskcluster secret service. The task should
only run on mozilla-central to avoid confusion between branches.

MozReview-Commit-ID: 31XfTg0sCht

--HG--
extra : rebase_source : c3ef4ec15ecd4fa0ec0b5af7aacddfa8d6dd90e0
extra : source : 19f92c04608cec275dab73e8acad5141de8a5c44
2017-07-28 18:32:04 +00:00
Dustin J. Mitchell
7e333c01b5 Backed out changeset 19f92c04608c for breaking try pushes a=bustage
MozReview-Commit-ID: FowbO5T9aUl

--HG--
extra : amend_source : a450b54d4daf355966f0b7b5bfe432316ce98364
2017-07-31 16:04:01 +00:00
Dustin J. Mitchell
31ffb087d5 Bug 1382729: Upload documentation to S3 automatically; r=gps
This uses credentials stored in the Taskcluster secret service. The task should
only run on mozilla-central to avoid confusion between branches.

MozReview-Commit-ID: 31XfTg0sCht

--HG--
extra : rebase_source : d2881d6ee093d0f0c87880ba63b451fb0e54415e
extra : amend_source : 6a34a633daab264863a668aca801ce4a4ffb782b
2017-07-28 18:32:04 +00:00
Alex Gaynor
837b88dc9c Bug 1384224 - Add support for hardlinks to InstallManifest; r=gps
Also removes InstallManifestNoSymlinks which can be more simply expressed by
passing link_policy='copy' to InstallManifest.populate_registry.

MozReview-Commit-ID: Bkjc2hIub4A

--HG--
extra : rebase_source : df05080fef3baf7e6c60ff9a468e71f0b2c67462
2017-07-25 14:06:15 -04:00
Gregory Szorc
bf796d2ba5 NO BUG - Unbust Sphinx docs outside of mach
Trivial update to Python package paths to reflect their new location.

MozReview-Commit-ID: EWaIHrLFWgD

--HG--
extra : rebase_source : b3a033bffe6f8f933807d6e71dccd49c37c75844
2017-06-23 13:22:52 -07:00
Mike Hommey
dc5d1e6adf Bug 1335309 - Change the default for find_executables to False. r=mshal
Back when the class was written, for the packaging code, it made sense
that the default was True. But now that it's used all over the place,
and that the vast majority of uses are with find_executables=False, it
makes more sense for that to be the default.

--HG--
extra : rebase_source : ff813735fc0d53093f348f20eb77ee03e9b09d4e
2017-01-31 14:06:15 +09:00
Ted Mielczarek
4d4f563643 Fixup readthedocs generation from bug 1294565. r=me
MozReview-Commit-ID: 8digQSVG2hF
2016-10-12 14:31:14 -04:00
Gregory Szorc
b64e5f4498 Bug 1259514 - Add manifestparser and reftest to Python search path; r=chmanchester
mozbuild Python changes to test manifest processing introduced these
dependencies.

DONTBUILD (NPOTB)

MozReview-Commit-ID: 9nT3G7qt988

--HG--
extra : rebase_source : d7d560477249a8e20a162d49faea85d4a49fe113
2016-03-24 11:19:44 -07:00
Gregory Szorc
2906edb808 Bug 1252294 - Add python/futures to sys.path when building Sphinx docs; r=chmanchester
RTD is complaining that it can't find concurrent.futures. We solve this
problem on RTD by adjusting sys.path in the Sphinx config file to add
paths to the vendored packages.

Sadly, there isn't really an easy way to test this before landing. But
it should work.

MozReview-Commit-ID: FrsLrbbOQWt

--HG--
extra : rebase_source : 4debf9b1902e26babe7e9ddaee8142a14674d393
2016-02-29 16:08:34 -08:00
Carsten "Tomcat" Book
6244cfb10e Backed out changeset 200da85932e9 (bug 1230862) for valgrind perma failures 2016-02-10 11:04:50 +01:00
Julien Pagès
cb348f4346 Bug 1230862 - Remove mozhttpd. r=wlach
--HG--
extra : commitid : HRDp24nhYo8
extra : rebase_source : 76443fa9938e488fcd06af7ba0676d491c9da36e
2016-02-09 03:26:43 +01:00
Alessio Placitelli
af49ee7fbe Bug 1231965 - Change references to ./mach build-docs to ./mach doc. r=gps
--HG--
extra : rebase_source : 53012ecda93a4c823a8de4b43afab5f1fa97a241
2015-12-11 17:33:11 +01:00
Andreas Tolfsen
34b2c0c28f Bug 1223459: Serve documentation over HTTP in mach doc
Introduces new flag --http [ADDRESS] that spins up an HTTPD serving
`outdir'.  By default it will spin up a server on 0.0.0.0:6666.

r=ahal

--HG--
extra : commitid : EP5vOiGxJM7
extra : rebase_source : e6a8c4c44ccf45eb3a570d6e0575999c72465fec
2015-11-10 20:37:38 +00:00
Andrew Halberstadt
157819bf8d Bug 1220789 - Generalize |mach build-doc| for any arbitrary sphinx projects; rename to |mach doc|, r=gps
Now, running |mach doc <path/to/project>| will generate the sphinx based docs of the project and open them
in the default browser. Mulitple doc paths can be supplied at a time. E.g:
./mach doc testing/mozbase

--HG--
extra : commitid : IOguvvudLzw
extra : rebase_source : c53788d259c7f69be997426227778820ec99dd26
extra : amend_source : 5fa5069d1c7c8d5d93fefb56563af9bd28286b90
2015-11-03 15:39:50 -05:00