Skip to content

Commit

Permalink
Update conf.py due to deprecation of Sphinx context injection at buil…
Browse files Browse the repository at this point in the history
…d time (#351)

* Fix per RTD announcement

* Add path to conf.py; adjust build OS version

Not affected by this deprecation, but it will be required in the future.

Also:
- Removed release/version numbers; they weren't relevant.
- Created a new requirements.txt with pip-compile

* (Temporarily) ignore html_context error

* Pin sphinx==6 dependency version

* Removed Jinja2 snippet

I'm silly - although Jinja2 was installed by default, I don't believe it's used by default (& we weren't using any jinja templates AFAIK)

* Update README for pip-compile
  • Loading branch information
MoltonMontro authored Jul 17, 2024
1 parent 84a5e9e commit a3c6120
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 11 deletions.
11 changes: 6 additions & 5 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ formats:
- epub

build:
os: "ubuntu-20.04"
os: ubuntu-22.04
tools:
python: "3.8"

sphinx:
fail_on_warning: true # Make warnings more visible by forcing build to fail

python:
install:
- requirements: "requirements.txt"
- requirements: requirements.txt

sphinx:
configuration: conf.py
fail_on_warning: true # Make warnings more visible by forcing build to fail
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ Building requires the *Read the Docs* theme. To install it, run this command in

With Python and Sphinx installed run `make html` in the root folder to create the site locally at `/_build/html/index.html`.

Editing using [Visual Studio Code](https://code.visualstudio.com/) with the [reStructuredText Extension](https://docs.restructuredtext.net/) is recommended.
Editing using [Visual Studio Code](https://code.visualstudio.com/) with the [reStructuredText Extension](https://docs.restructuredtext.net/) is recommended.

The project's `requirements.txt` file is automatically generated. To update this file, install `pip-tools` and run `pip-compile requirements.in`. Important dependencies (and their versions) should be pinned in `requirements.in`.
6 changes: 3 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
copyright = "2023, Smartly Dressed Games"
author = "Smartly Dressed Games"

release = "0.1"
version = "0.1.0"

# -- General configuration
sys.path.append(os.path.abspath("_extensions")) # also find extensions within this directory
extensions = [
Expand Down Expand Up @@ -48,6 +45,9 @@
'collapse_navigation': True,
}

# Define the canonical URL if you are using a custom domain on Read the Docs
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

# These folders are copied to the documentation's HTML output
html_static_path = ["_static"]

Expand Down
3 changes: 3 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx==6
sphinx_rtd_theme
sphinxext-opengraph
70 changes: 68 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,68 @@
sphinx_rtd_theme
sphinxext-opengraph
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile requirements.in
#
alabaster==0.7.13
# via sphinx
babel==2.15.0
# via sphinx
certifi==2024.7.4
# via requests
charset-normalizer==3.3.2
# via requests
colorama==0.4.6
# via sphinx
docutils==0.19
# via
# sphinx
# sphinx-rtd-theme
idna==3.7
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==8.0.0
# via sphinx
jinja2==3.1.4
# via sphinx
markupsafe==2.1.5
# via jinja2
packaging==24.1
# via sphinx
pygments==2.18.0
# via sphinx
pytz==2024.1
# via babel
requests==2.32.3
# via sphinx
snowballstemmer==2.2.0
# via sphinx
sphinx==6.0.0
# via
# -r requirements.in
# sphinx-rtd-theme
# sphinxcontrib-jquery
# sphinxext-opengraph
sphinx-rtd-theme==2.0.0
# via -r requirements.in
sphinxcontrib-applehelp==1.0.4
# via sphinx
sphinxcontrib-devhelp==1.0.2
# via sphinx
sphinxcontrib-htmlhelp==2.0.1
# via sphinx
sphinxcontrib-jquery==4.1
# via sphinx-rtd-theme
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
sphinxext-opengraph==0.9.1
# via -r requirements.in
urllib3==2.2.2
# via requests
zipp==3.19.2
# via importlib-metadata

0 comments on commit a3c6120

Please sign in to comment.