Skip to content

Commit 0050984

Browse files
authored
Merge pull request #202 from mull-project/stanislaw/python_313
Upgrade to new Read the Docs config
2 parents f18bff9 + 10f7429 commit 0050984

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

.readthedocs.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ sphinx:
1212
# Optionally build your docs in additional formats such as PDF and ePub
1313
formats:
1414
- pdf
15+
# - epub
16+
17+
build:
18+
os: ubuntu-22.04
19+
tools:
20+
python: "3.8"
1521

1622
# Optionally set the version of Python and requirements required to build your docs
1723
python:
18-
version: 3.5
1924
install:
20-
- requirements: docs/requirements.txt
21-
25+
- requirements: requirements.dev.txt

docs/conf.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# This file only contains a selection of the most common options. For a full
44
# list see the documentation:
55
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
import os
7+
import sys
68

79
# -- Path setup --------------------------------------------------------------
810

@@ -16,14 +18,28 @@
1618

1719
import guzzle_sphinx_theme
1820

21+
try:
22+
filecheck_root_path = os.path.abspath(
23+
os.path.join(os.path.dirname(__file__), "..")
24+
)
25+
if not os.path.isdir(filecheck_root_path):
26+
raise FileNotFoundError
27+
sys.path.append(filecheck_root_path)
28+
from filecheck.filecheck import __version__ as filecheck_version
29+
except Exception as exception:
30+
print( # noqa: T201
31+
f"Could not resolve a path to filecheck's root: {exception}"
32+
)
33+
sys.exit(1)
34+
1935
# -- Project information -----------------------------------------------------
2036

2137
project = "FileCheck.py"
2238
copyright = "2019-2023, Stanislav Pankevich"
2339
author = "Stanislav Pankevich"
2440

2541
# The full version, including alpha/beta/rc tags
26-
release = "0.0.1"
42+
release = filecheck_version
2743

2844

2945
# -- General configuration ---------------------------------------------------
@@ -51,8 +67,6 @@
5167
extensions.append("guzzle_sphinx_theme")
5268
html_theme = "guzzle_sphinx_theme"
5369

54-
# html_theme = 'pyramid'
55-
5670
html_theme_options = {
5771
"project_nav_name": "Mull",
5872
}

requirements.dev.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ flake8>=3.9.2
1111
coverage>=5.4
1212
pytest>=6.2.2
1313
lit>=0.9
14+
15+
# Docs
16+
guzzle_sphinx_theme

0 commit comments

Comments
 (0)