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

Modernize docs #1165

Merged
merged 2 commits into from
Aug 21, 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
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