Skip to content

Commit 6ac9822

Browse files
authored
chore(docs): initial revision of docs (#74)
Initial version of documentation
1 parent a90189b commit 6ac9822

35 files changed

+2995
-1510
lines changed

.github/workflows/docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Documentation Building
2+
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
branches:
8+
- main
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
jobs:
13+
build_and_deploy:
14+
permissions:
15+
contents: write
16+
pages: write
17+
id-token: write
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Install additional dependencies
26+
run: sudo apt-get update && sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 libmariadb-dev && sudo apt-get autoremove -y && sudo apt-get clean -y
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: 3.12
32+
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v6
35+
36+
- name: Set up Python
37+
run: uv python install 3.12
38+
39+
- name: Install dependencies
40+
run: uv sync --all-extras --dev
41+
42+
- name: Build Release Documentation
43+
run: uv run sphinx-build -M html docs dist/docs -E -a -j auto -W --keep-going
44+
if: github.event_name == 'release'
45+
46+
- name: Build Documentation
47+
run: uv run sphinx-build -M html docs dist/docs -E -a -j auto -W --keep-going
48+
if: github.event_name != 'release'
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
with:
53+
path: dist/docs/
54+
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919

2020
# Ruff replaces black, flake8, autoflake and isort
2121
- repo: https://github.com/charliermarsh/ruff-pre-commit
22-
rev: "v0.11.6" # make sure this is always consistent with hatch configs
22+
rev: "v0.11.7" # make sure this is always consistent with hatch configs
2323
hooks:
2424
- id: ruff
2525
args: [--config, ./pyproject.toml]

CONTRIBUTING.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ Contribution guide
44
Setting up the environment
55
--------------------------
66

7-
1. ``make install-pipx``
8-
2. ``make install-hatch``
9-
3. ``make configure-hatch``
10-
4. ``make install``
11-
5. Install `pre-commit <https://pre-commit.com/>`_
12-
6. ``pre-commit install``
7+
1. ``make install``
138

149
Code contributions
1510
------------------
@@ -46,7 +41,7 @@ Guidelines for writing code
4641
Writing and running tests
4742
+++++++++++++++++++++++++
4843

49-
.. todo:: Write this section
44+
Coming soon.
5045

5146
Project documentation
5247
---------------------

README.md

Lines changed: 61 additions & 46 deletions
Large diffs are not rendered by default.

docs/.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Sphinx documentation
2+
_build/
3+
.buildinfo
4+
.doctrees/
5+
6+
# Python
7+
__pycache__/
8+
*.py[cod]
9+
*$py.class
10+
11+
# Environment
12+
.env
13+
.venv
14+
env/
15+
venv/
16+
ENV/
17+
18+
# IDE
19+
.idea/
20+
.vscode/
21+
*.swp
22+
*.swo
23+
24+
# OS
25+
.DS_Store
26+
Thumbs.db

docs/__init__.py

Whitespace-only changes.

docs/_static/.gitkeep

Whitespace-only changes.

docs/_static/custom.css

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
/* Theme color definitions */
2+
:root {
3+
--brand-font-size-xl: 6rem;
4+
--brand-font-size-lg: 5rem;
5+
--brand-font-size-md: 4rem;
6+
--brand-font-size-sm: 2.5rem;
7+
--brand-font-size-xs: 1.8rem;
8+
--brand-font-size-xxs: 1.6rem;
9+
10+
--brand-letter-spacing-xl: 0.25em;
11+
--brand-letter-spacing-lg: 0.2em;
12+
--brand-letter-spacing-md: 0.1em;
13+
--brand-letter-spacing-sm: 0.05em;
14+
--brand-letter-spacing-xs: 0.03em;
15+
}
16+
17+
html.light {
18+
--sl-color-primary: #202235;
19+
--sl-color-secondary: #edb641;
20+
--sl-color-accent: #ffd480;
21+
--sl-color-text-1: var(--sl-color-primary);
22+
--sl-color-text-2: var(--sl-color-secondary);
23+
--sy-c-foot-background: #f0f0f0;
24+
--yue-c-text: #000;
25+
--brand-text-glow: 0 0 10px rgba(32, 34, 53, 0.3),
26+
0 0 20px rgba(32, 34, 53, 0.2), 0 0 30px rgba(237, 182, 65, 0.1);
27+
}
28+
29+
html.dark {
30+
--sl-color-text-1: var(--sl-color-secondary);
31+
--sy-c-foot-background: black;
32+
--yue-c-text: #fff;
33+
--brand-text-glow: 0 0 10px rgba(237, 182, 65, 0.4),
34+
0 0 20px rgba(237, 182, 65, 0.3), 0 0 30px rgba(237, 182, 65, 0.2);
35+
}
36+
37+
.title-with-logo {
38+
display: flex;
39+
align-items: center;
40+
justify-content: center;
41+
margin: 5rem auto 4rem;
42+
width: 100%;
43+
padding: 0 2rem;
44+
user-select: none;
45+
-webkit-user-select: none;
46+
-moz-user-select: none;
47+
-ms-user-select: none;
48+
}
49+
50+
html[class] .title-with-logo .brand-text {
51+
font-family: var(--sl-font-sans);
52+
font-weight: 300;
53+
font-size: var(--brand-font-size-lg);
54+
letter-spacing: var(--brand-letter-spacing-xl);
55+
text-transform: uppercase;
56+
text-align: center;
57+
line-height: 1.4;
58+
max-width: 100%;
59+
word-break: break-word;
60+
word-wrap: break-word;
61+
overflow-wrap: break-word;
62+
hyphens: auto;
63+
-webkit-hyphens: auto;
64+
-ms-hyphens: auto;
65+
transition: color var(--sl-transition), text-shadow var(--sl-transition);
66+
}
67+
68+
html.light .title-with-logo .brand-text {
69+
color: var(--sl-color-text-1);
70+
text-shadow: var(--brand-text-glow);
71+
}
72+
73+
html.dark .title-with-logo .brand-text {
74+
color: var(--sl-color-text-2);
75+
text-shadow: var(--brand-text-glow);
76+
}
77+
78+
/* Button container wrapping */
79+
.buttons.wrap {
80+
display: flex;
81+
flex-wrap: wrap;
82+
gap: 0.5rem;
83+
}
84+
85+
.buttons.wrap .btn-no-wrap {
86+
flex: 0 0 auto;
87+
}
88+
89+
/* Large screens */
90+
@media (min-width: 1200px) {
91+
html[class] .title-with-logo .brand-text {
92+
font-size: var(--brand-font-size-xl);
93+
}
94+
}
95+
96+
/* Medium-small screens */
97+
@media (max-width: 991px) {
98+
html[class] .title-with-logo .brand-text {
99+
font-size: var(--brand-font-size-md);
100+
letter-spacing: var(--brand-letter-spacing-lg);
101+
}
102+
}
103+
104+
/* Small screens */
105+
@media (max-width: 767px) {
106+
html[class] .title-with-logo .brand-text {
107+
font-size: var(--brand-font-size-sm);
108+
letter-spacing: var(--brand-letter-spacing-md);
109+
}
110+
111+
html[class] .title-with-logo {
112+
margin: 2rem auto 1.5rem;
113+
}
114+
}
115+
116+
/* Extra small screens */
117+
@media (max-width: 480px) {
118+
html[class] .title-with-logo .brand-text {
119+
font-size: var(--brand-font-size-xs);
120+
letter-spacing: var(--brand-letter-spacing-sm);
121+
line-height: 1.2;
122+
}
123+
124+
html[class] .title-with-logo {
125+
margin: 1.5rem auto 1rem;
126+
padding: 0 1rem;
127+
}
128+
}
129+
130+
/* Smallest screens */
131+
@media (max-width: 360px) {
132+
html[class] .title-with-logo .brand-text {
133+
font-size: var(--brand-font-size-xxs);
134+
letter-spacing: var(--brand-letter-spacing-xs);
135+
}
136+
}
137+
138+
/* Preserve existing layout styles */
139+
#badges img {
140+
margin-top: 0;
141+
margin-bottom: 0;
142+
}
143+
144+
#badges {
145+
display: flex;
146+
flex-wrap: wrap;
147+
gap: 10px;
148+
margin-bottom: 3em;
149+
}

docs/_static/logo.svg

Lines changed: 9 additions & 0 deletions
Loading

docs/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Changelog
2+
=========
3+
4+
All notable changes to this project will be documented in this file.

0 commit comments

Comments
 (0)