Skip to content

Commit

Permalink
Merge pull request #1165 from jakob-keller/modernize-docs
Browse files Browse the repository at this point in the history
Modernize docs
  • Loading branch information
jakob-keller committed Aug 21, 2024
2 parents d80e20d + e6b1a3e commit 1fcc8b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ sphinx:

python:
install:
- path: .
- requirements: docs/requirements.txt

formats:
Expand Down
29 changes: 11 additions & 18 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,19 @@
#
# needs_sphinx = '1.0'

import pathlib
import importlib.metadata
import re

_docs_path = pathlib.Path(__file__).parent
_version_path = _docs_path / '../aiobotocore/__init__.py'


with _version_path.open() as fp:
try:
_version_info = re.search(
r"^__version__ = '"
r"(?P<major>\d+)"
r"\.(?P<minor>\d+)"
r"\.(?P<patch>\d+)"
r"(?P<tag>.*)?'$",
fp.read(),
re.M,
).groupdict()
except IndexError:
raise RuntimeError('Unable to determine version.')
try:
_version_info = re.fullmatch(
r"(?P<major>\d+)"
r"\.(?P<minor>\d+)"
r"\.(?P<patch>\d+)"
r"(?P<tag>.*)?",
importlib.metadata.version('aiobotocore'),
).groupdict()
except IndexError:
raise RuntimeError('Unable to determine version.')

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ boto3 = [

[project.urls]
Repository = "https://github.com/aio-libs/aiobotocore"
Documentation = "https://aiobotocore.readthedocs.io"
Documentation = "https://aiobotocore.aio-libs.org"

[tool.setuptools.dynamic]
version = { attr = "aiobotocore.__version__" }
Expand Down

0 comments on commit 1fcc8b9

Please sign in to comment.