Skip to content

Commit f45815e

Browse files
Merge pull request #606 from laughingman7743/furo-theme-update
2 parents 3b1923a + 3e52552 commit f45815e

4 files changed

Lines changed: 91 additions & 6 deletions

File tree

docs/_static/custom.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* Set table cells to left alignment */
2+
table.docutils th,
3+
table.docutils td {
4+
text-align: left !important;
5+
}
6+
7+
/* Align table itself to the left */
8+
table.docutils {
9+
margin-left: 0;
10+
margin-right: auto;
11+
}

docs/conf.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@
77

88

99
def get_version():
10-
version_file = Path(".").absolute().parent / "pyathena" / "__init__.py"
11-
with version_file.open() as f:
12-
for line in f:
13-
if line.startswith("__version__"):
14-
return line.strip().split('"')[1]
10+
try:
11+
# Try to import from _version.py (generated by setuptools-scm)
12+
from pyathena._version import __version__
13+
return __version__
14+
except ImportError:
15+
try:
16+
# Fallback to importlib.metadata
17+
from importlib.metadata import version
18+
return version("PyAthena")
19+
except Exception:
20+
return "unknown"
1521

1622

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

81-
html_theme = "alabaster"
87+
html_theme = "furo"
8288
html_static_path = ["_static"]
89+
html_css_files = [
90+
"custom.css",
91+
]

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ dev = [
5959
"pytest-xdist",
6060
"pytest-dependency",
6161
"sphinx",
62+
"furo",
6263
"types-python-dateutil",
6364
]
6465

uv.lock

Lines changed: 64 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)