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

Setup readthedocs and CI job for checking documentation building #93

Merged
merged 4 commits into from
Nov 14, 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
20 changes: 19 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ executors:
parameters:
python_version:
type: string
default: "3.10"
default: "3.11"
docker:
- image: cimg/python:<<parameters.python_version>>

Expand Down Expand Up @@ -53,6 +53,22 @@ jobs:
name: Run pre-commit hooks
command: pre-commit run --all-files

build-docs:
description: "Build docs check (the actual publishing is handled by .readthedocs.yaml)"
executor:
name: docker-executor
steps:
- checkout
- run:
name: Install poetry
command: python -m pip install poetry
- run:
name: Install build docs dependency
command: python -m poetry install --only=docs,dev
- run:
name: Run Sphinx
command: poetry run inv docs.build

workflows:
tests:
jobs:
Expand All @@ -64,3 +80,5 @@ workflows:
<<: *all_branches_and_version_tag
- precommit:
<<: *all_branches_and_version_tag
- build-docs:
<<: *all_branches_and_version_tag
18 changes: 18 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
version: 2

build:
os: "ubuntu-22.04"
tools:
python: "3.11"
jobs:
post_create_environment:
- python -m pip install poetry
- python -m poetry config virtualenvs.create false
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- poetry install --only=docs,dev

sphinx:
configuration: docs/conf.py
116 changes: 115 additions & 1 deletion poetry.lock

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

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ python = "^3.11"
[tool.poetry.group.dev.dependencies]
invoke = "^2.2.0"


[tool.poetry.group.docs.dependencies]
sphinx-book-theme = "^1.0.1"
rich = "^13.6.0"
myst-parser = "^2.0.0"

[build-system]
requires = ["poetry-core"]
Expand Down
Loading