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

Switch to Furo docs theme, check docs in CI #12

Merged
merged 2 commits into from
Apr 17, 2024
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
25 changes: 25 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,28 @@ jobs:
pip-sync requirements/requirements.txt requirements/requirements-test.txt
- name: Test with tox
run: tox

docs:
name: Build and check documentation
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install pip-tools
pip-sync requirements/requirements.txt requirements/requirements-docs.txt
- name: Lint docs with sphinx-lint
run: |
sphinx-lint docs
- name: Build docs and check the integrity of external links
run: |
ls source
sphinx-build --builder linkcheck --fail-on-warning "source" "build"
sphinx-build --builder html --fail-on-warning "source" "build"
working-directory:
./docs
Empty file added docs/source/_static/.gitkeep
Empty file.
10 changes: 9 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,16 @@
"python": ("https://docs.python.org/3", None),
}

linkcheck_retries = 3

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_theme = "furo"
html_static_path = ["_static"]

html_theme_options = {
"source_repository": "https://github.com/Viicos/jsonlogic/",
"source_branch": "main",
"source_directory": "docs/source/",
}
2 changes: 1 addition & 1 deletion docs/source/usage/creating_operators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ operator.
.. [#f1] You could implement some checks on the type of the provided argument,
if it happens to be a :data:`~jsonlogic.typing.JSONLogicPrimitive` where the
``>`` argument doesn't make sense (arrays for instance). However, this is a
task better suited for typechecking.
task better suited for typechecking.
3 changes: 2 additions & 1 deletion requirements/requirements-docs.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-c requirements.txt
furo
sphinx
sphinx-rtd-theme
sphinx-lint
sphinx-paramlinks
31 changes: 21 additions & 10 deletions requirements/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ alabaster==0.7.16
# via sphinx
babel==2.14.0
# via sphinx
beautifulsoup4==4.12.3
# via furo
certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
docutils==0.20.1
docutils==0.21.1
# via
# sphinx
# sphinx-paramlinks
# sphinx-rtd-theme
furo==2024.1.29
# via -r requirements/requirements-docs.in
idna==3.6
# via requests
imagesize==1.4.1
Expand All @@ -27,30 +30,38 @@ markupsafe==2.1.5
# via jinja2
packaging==24.0
# via sphinx
polib==1.2.0
# via sphinx-lint
pygments==2.17.2
# via sphinx
# via
# furo
# sphinx
regex==2024.4.16
# via sphinx-lint
requests==2.31.0
# via sphinx
snowballstemmer==2.2.0
# via sphinx
sphinx==7.2.6
soupsieve==2.5
# via beautifulsoup4
sphinx==7.3.5
# via
# -r requirements/requirements-docs.in
# furo
# sphinx-basic-ng
# sphinx-paramlinks
# sphinx-rtd-theme
# sphinxcontrib-jquery
sphinx-paramlinks==0.6.0
sphinx-basic-ng==1.0.0b2
# via furo
sphinx-lint==0.9.1
# via -r requirements/requirements-docs.in
sphinx-rtd-theme==2.0.0
sphinx-paramlinks==0.6.0
# via -r requirements/requirements-docs.in
sphinxcontrib-applehelp==1.0.8
# via sphinx
sphinxcontrib-devhelp==1.0.6
# via sphinx
sphinxcontrib-htmlhelp==2.0.5
# via sphinx
sphinxcontrib-jquery==4.1
# via sphinx-rtd-theme
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.7
Expand Down