Skip to content
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
11 changes: 11 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* Set table cells to left alignment */
table.docutils th,
table.docutils td {
text-align: left !important;
}

/* Align table itself to the left */
table.docutils {
margin-left: 0;
margin-right: auto;
}
21 changes: 15 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@


def get_version():
version_file = Path(".").absolute().parent / "pyathena" / "__init__.py"
with version_file.open() as f:
for line in f:
if line.startswith("__version__"):
return line.strip().split('"')[1]
try:
# Try to import from _version.py (generated by setuptools-scm)
from pyathena._version import __version__
return __version__
except ImportError:
try:
# Fallback to importlib.metadata
from importlib.metadata import version
return version("PyAthena")
except Exception:
return "unknown"


# -- Project information -----------------------------------------------------
Expand Down Expand Up @@ -78,5 +84,8 @@ def get_version():
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "alabaster"
html_theme = "furo"
html_static_path = ["_static"]
html_css_files = [
"custom.css",
]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ dev = [
"pytest-xdist",
"pytest-dependency",
"sphinx",
"furo",
"types-python-dateutil",
]

Expand Down
64 changes: 64 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.