Skip to content

Commit

Permalink
wip: use sphinxdocs for docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
rickeylev committed Oct 22, 2024
1 parent 8337731 commit bfa18f9
Show file tree
Hide file tree
Showing 53 changed files with 1,192 additions and 972 deletions.
1 change: 0 additions & 1 deletion .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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

0 comments on commit bfa18f9

Please sign in to comment.