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

Fix readthedocs build issues #342

Merged
merged 1 commit into from
Nov 15, 2023
Merged
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
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
pre_build:
- sphinx-apidoc --separate --no-toc --force --templatedir docs/source/_templates/apidoc -o docs/source/ podman podman/tests

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
Expand Down
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,9 @@ release:

.PHONY: docs
docs:
mkdir -p _build/doctrees
cp -R docs/source/* _build/doctrees
sphinx-apidoc --separate --no-toc --force --templatedir build/docs/source/_templates/apidoc \
-o _build/doctrees \
podman podman/tests
# Previous Command: sphinx-build _build/doctrees _build/html
#
sphinx-apidoc --separate --no-toc --force --templatedir docs/source/_templates/apidoc \
-o docs/source/ podman podman/tests

# HARD CODED COMMAND from readthedocs! We must conform!
# -T : traceback
# -E : do not use saved environment, always read all files
Expand All @@ -76,7 +72,7 @@ docs:
# -D language=en : define language as en
# . : source directory
# _build/html : target
python3 -m sphinx -T -E -W --keep-going -b html -d _build/doctrees -D language=en _build/doctrees _build/html
cd docs/source && python3 -m sphinx -T -E -W --keep-going -b html -d _build/doctrees -D language=en . _build/html

.PHONY: rpm
rpm: ## Build rpm packages
Expand Down
11 changes: 8 additions & 3 deletions docs/source/_templates/apidoc/module.rst_t
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{%- if show_headings %}
{{- basename | replace("podman.", "") | e | heading }}

{%- if "podman.errors" in basename %}
{{- basename | replace("podman.errors.", "") | e | heading }}
{% elif "podman.client" in basename -%}
{{- basename | replace("podman.client", "client") | e | heading }}
{% else -%}
{{- basename | replace("podman.domain.", "") | e | heading }}
{% endif -%}
{% endif -%}

.. automodule:: {{ qualname }}
{%- for option in automodule_options %}
:{{ option }}:
{%- endfor %}

1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
'podman.version.rst',
'podman.tlsconfig.rst',
'podman.errors.rst',
'podman.domain.rst',
]


Expand Down
24 changes: 11 additions & 13 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Example

.. toctree::
:caption: Podman Client
:maxdepth: 2
:hidden:

podman.client

Expand All @@ -53,21 +53,19 @@ Example
:glob:
:hidden:

podman.domain.config*
podman.domain.containers
podman.domain.containers_manager
podman.domain.images
podman.domain.images_manager
podman.domain.ipam*
podman.domain.events*
podman.domain.config
podman.domain.containers*
podman.domain.images*
podman.domain.ipam
podman.domain.events
podman.domain.manager
podman.domain.manifests*
podman.domain.manifests
podman.domain.networks*
podman.domain.pods*
podman.domain.registry_data*
podman.domain.secrets*
podman.domain.system*
podman.domain.volume*
podman.domain.registry_data
podman.domain.secrets
podman.domain.system
podman.domain.volumes
podman.errors.exceptions

Indices and tables
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ sphinx
tomli>=1.2.3; python_version<'3.11'
urllib3
wheel
rich >= 12.5.1