Skip to content

Commit

Permalink
Bug 1606026: Move documentation entry point to docs/ r=sylvestre
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Glasser-Camp committed Jan 6, 2020
1 parent 11216a4 commit 78cf0c4
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions build/sparse-profiles/sphinx-docs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[include]
# Code for generating docs.
glob:docs/**
glob:tools/docs/**
glob:tools/moztreedocs/**

Expand Down
2 changes: 1 addition & 1 deletion tools/docs/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Set up Python environment to load build system packages.
OUR_DIR = os.path.dirname(__file__)
topsrcdir = os.path.normpath(os.path.join(OUR_DIR, '..', '..'))
topsrcdir = os.path.normpath(os.path.join(OUR_DIR, '..'))

EXTRA_PATHS = (
'layout/tools/reftest',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ with Files('CLOBBER'):
with Files('*configure*'):
BUG_COMPONENT = ('Firefox Build System', 'General')

with Files("docs/**"):
BUG_COMPONENT = ("Firefox Build System", "Generated Documentation")
SCHEDULES.exclusive = ['docs']

with Files('mach'):
BUG_COMPONENT = ('Firefox Build System', 'Mach Core')

Expand Down
2 changes: 1 addition & 1 deletion tools/docs/docs/adding-documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ for it:
documentation for, you can use ``SPHINX_PYTHON_PACKAGE_DIRS`` to
declare directories containing Python packages. e.g.
``SPHINX_PYTHON_PACKAGE_DIRS += ['mozpackage']``.
5. In ``tools/docs/config.yml``, defines in which category the doc
5. In ``docs/config.yml``, defines in which category the doc
should go.
6. Verify the rst syntax using `./mach lint -l rst`_

Expand Down
1 change: 1 addition & 0 deletions tools/lint/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ codespell:
- devtools/docs/
- devtools/shared/locales/en-US/
- devtools/startup/locales/en-US/
- docs/
- dom/docs/
- dom/locales/en-US/
- gfx/docs/
Expand Down
4 changes: 2 additions & 2 deletions tools/moztreedocs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
here = os.path.abspath(os.path.dirname(__file__))
build = MozbuildObject.from_environment(cwd=here)

MAIN_DOC_PATH = os.path.normpath(os.path.join(build.topsrcdir, 'tools', 'docs'))
MAIN_DOC_PATH = os.path.normpath(os.path.join(build.topsrcdir, 'docs'))

logger = sphinx.util.logging.getLogger(__name__)

Expand Down Expand Up @@ -203,7 +203,7 @@ def format_paths(paths):
if indexes:
# In case a new doc isn't categorized
print(indexes)
raise Exception("Uncategorized documentation. Please add it in tools/docs/config.yml")
raise Exception("Uncategorized documentation. Please add it in docs/config.yml")

data = data.format(**CATEGORIES)

Expand Down
2 changes: 1 addition & 1 deletion tools/moztreedocs/mach_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def build_docs(self, path=None, fmt='html', outdir=None, auto_open=True,
outdir = outdir or os.path.join(self.topobjdir, 'docs')
savedir = os.path.join(outdir, fmt)

path = path or os.path.join(self.topsrcdir, 'tools')
path = path or self.topsrcdir
path = os.path.normpath(os.path.abspath(path))

docdir = self._find_doc_dir(path)
Expand Down

0 comments on commit 78cf0c4

Please sign in to comment.