-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add esbonio for preview and linting of sphinx documentation.
Issue-ref: see #30
- Loading branch information
1 parent
a2983fb
commit bdbc7e8
Showing
9 changed files
with
223 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ MODULE.bazel.lock | |
|
||
# Ruff | ||
.ruff_cache | ||
|
||
# docs:incremental and docs:ide_support build artifacts | ||
/_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,8 +36,6 @@ | |
|
||
templates_path = ["_templates"] | ||
|
||
suppress_warnings = ["config.cache"] | ||
|
||
# Enable numref | ||
numfig = True | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# ******************************************************************************* | ||
# Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License Version 2.0 which is available at | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# ******************************************************************************* | ||
|
||
import os | ||
import sys | ||
|
||
try: | ||
from sphinx.cmd.build import main as sphinx_main | ||
except ImportError: | ||
sys.exit( | ||
"This script must be run from Bazel via `bazel run //docs:incremental`" | ||
" (sphinx not installed)." | ||
) | ||
|
||
workspace = os.getenv("BUILD_WORKSPACE_DIRECTORY") | ||
if not workspace: | ||
sys.exit( | ||
"This script must be run from Bazel via `bazel run //docs:incremental`" | ||
" (BUILD_WORKSPACE_DIRECTORY not set)." | ||
) | ||
|
||
# sphinx will print relative paths to the current directory. | ||
# Change to the workspace root so that the paths are readable and clickable. | ||
os.chdir(workspace) | ||
sphinx_main( | ||
[ | ||
"docs", | ||
"_build", | ||
"--jobs", | ||
"auto", | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
--extra-index-url https://pypi.org/simple/ | ||
|
||
Sphinx==8.1.3 | ||
sphinx-needs==4.1.0 | ||
pydata-sphinx-theme==0.16.0 | ||
Sphinx | ||
sphinx-needs | ||
pydata-sphinx-theme | ||
|
||
# esbonio >= 1 comes bundled with the esbonio extension >= 1. | ||
# esbonio<1 is required for the esbonio extension <1 | ||
# So what we need to install here is esbonio<1 | ||
esbonio<1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters