Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use sphinxdocs for docgen #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ tasks:
- "--enable_workspace"
test_targets:
- "..."
all_tests_workspace_5.x:
name: Workspace (Bazel 5.x)
all_tests_workspace_minimum_bazel:
name: Workspace (Bazel 6.x)
platform: ${{platform}}
skip_in_bazel_downstream_pipeline: Already tested on latest
bazel: "5.x"
bazel: "6.x"
test_flags:
- "--noexperimental_enable_bzlmod"
- "--noenable_bzlmod"
- "--test_tag_filters=-docs"
test_targets:
- "..."
all_tests_bzlmod:
Expand All @@ -38,7 +39,6 @@ tasks:
test_flags:
- "--enable_bzlmod"
test_targets:
- "//docgen/..."
- "//docs/..."

e2e_bzlmod:
Expand Down
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
# Generated sphinx docs
docs/_build/
# Generated API docs
/docs/source/api/
!/docs/source/api/index.md
23 changes: 7 additions & 16 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@

version: 2

formats:
- pdf
- htmlzip

sphinx:
configuration: docs/source/conf.py

build:
os: "ubuntu-22.04"
tools:
python: "3.11"
nodejs: "19"
jobs:
pre_build:
- npm install -g @bazel/bazelisk
- bazel run //docs:run_sphinx_build

python:
install:
- requirements: docs/requirements.txt
commands:
- env
- npm install -g @bazel/bazelisk
- bazel version
# Put the actual action behind a shell script because it's
# easier to modify than the yaml config.
- docs/readthedocs_build.sh
7 changes: 6 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "rules_python", version = "0.37.0")
bazel_dep(name = "platforms", version = "0.0.6")
bazel_dep(name = "bazel_skylib", version = "1.3.0")
bazel_dep(name = "rules_license", version = "0.0.4")
Expand All @@ -18,7 +19,6 @@ bazel_dep(
dev_dependency = True,
repo_name = "io_bazel_stardoc",
)
bazel_dep(name = "rules_python", version = "0.27.0", dev_dependency = True)

python = use_extension(
"@rules_python//python/extensions:python.bzl",
Expand All @@ -40,3 +40,8 @@ pip.parse(
requirements_lock = "//docs:requirements.txt",
)
use_repo(pip, "docs-pypi")

##local_path_override(
## module_name = "rules_python",
## path = "../rules_python",
##)
161 changes: 161 additions & 0 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "0cc05ddb27614baecace068986931e2a6e9f69114e6115fc5dc58250faf56e0f",
strip_prefix = "rules_python-0.37.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.37.0/rules_python-0.37.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

py_repositories()

load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories")

stardoc_repositories()
Expand All @@ -52,15 +63,6 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "a644da969b6824cc87f8fe7b18101a8a6c57da5db39caa6566ec6109f37d2141",
strip_prefix = "rules_python-0.20.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.20.0/rules_python-0.20.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "python_register_toolchains")

python_register_toolchains(
name = "python3_11",
# Available versions are listed in @rules_python//python:versions.bzl.
Expand Down
51 changes: 0 additions & 51 deletions docgen/BUILD

This file was deleted.

Loading