Skip to content

Commit 8f4908c

Browse files
committed
docs: Add complete documentation structure and GitHub Pages deployment
- Add Sphinx documentation source files with comprehensive guides - Add documentation requirements and build configuration - Add ReadTheDocs configuration (.readthedocs.yaml) - Add comparison images and palette previews - Update .gitignore to exclude docs/build/ directory - Documentation will be automatically deployed to GitHub Pages via Actions
1 parent 30873fc commit 8f4908c

File tree

76 files changed

+9137
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+9137
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ dist/
99
# Coverage
1010
htmlcov/
1111
.coverage
12+
coverage.xml
13+
14+
# Documentation build
15+
docs/build/
16+
docs/_build/
1217

1318
# IDE
1419
.vscode/

.readthedocs.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.10"
12+
jobs:
13+
post_install:
14+
# Install the package itself
15+
- pip install .
16+
17+
# Build documentation in the "docs/" directory with Sphinx
18+
sphinx:
19+
configuration: docs/source/conf.py
20+
fail_on_warning: false
21+
22+
# Optionally build your docs in additional formats such as PDF and ePub
23+
formats:
24+
- pdf
25+
- epub
26+
27+
# Optional but recommended, declare the Python requirements required
28+
# to build your documentation
29+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
30+
python:
31+
install:
32+
- requirements: docs/requirements.txt
33+
- method: pip
34+
path: .
35+
extra_requirements:
36+
- all
37+

docs/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+

docs/conf.py

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
import os
7+
import sys
8+
sys.path.insert(0, os.path.abspath('..'))
9+
10+
# -- Project information -----------------------------------------------------
11+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
12+
13+
project = 'Huez'
14+
copyright = '2025, Ang'
15+
author = 'Ang'
16+
version = '0.0.5'
17+
release = '0.0.5'
18+
19+
# -- General configuration ---------------------------------------------------
20+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
21+
22+
extensions = [
23+
'sphinx.ext.autodoc', # API documentation from docstrings
24+
'sphinx.ext.napoleon', # Support for Google/NumPy docstring style
25+
'sphinx.ext.viewcode', # Add links to source code
26+
'sphinx.ext.intersphinx', # Link to other project's documentation
27+
'sphinx.ext.todo', # Support for todo items
28+
'sphinx_copybutton', # Add copy button to code blocks
29+
'sphinx_design', # Grid layouts and cards
30+
'myst_parser', # Markdown support
31+
]
32+
33+
# Add any paths that contain templates here, relative to this directory.
34+
templates_path = ['source/_templates']
35+
36+
# List of patterns, relative to source directory, that match files and
37+
# directories to ignore when looking for source files.
38+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
39+
40+
# The suffix(es) of source filenames.
41+
source_suffix = {
42+
'.rst': 'restructuredtext',
43+
'.md': 'markdown',
44+
}
45+
46+
# -- Options for HTML output -------------------------------------------------
47+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
48+
49+
html_theme = 'furo'
50+
51+
html_theme_options = {
52+
"light_logo": "logo.png",
53+
"dark_logo": "logo.png",
54+
"sidebar_hide_name": False,
55+
"navigation_with_keys": True,
56+
"top_of_page_button": "edit",
57+
"source_repository": "https://github.com/hzacode/huez",
58+
"source_branch": "main",
59+
"source_directory": "docs/source/",
60+
}
61+
62+
# Add any paths that contain custom static files (such as style sheets) here,
63+
# relative to this directory. They are copied after the builtin static files,
64+
# so a file named "default.css" will overwrite the builtin "default.css".
65+
html_static_path = ['source/_static']
66+
67+
# Custom CSS files
68+
html_css_files = [
69+
'css/custom.css',
70+
]
71+
72+
# The name of an image file (relative to this directory) to place at the top
73+
# of the sidebar.
74+
html_logo = 'source/_static/logo.png'
75+
76+
# The name of an image file (within the static path) to use as favicon of the
77+
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
78+
# pixels large.
79+
html_favicon = None
80+
81+
# If true, links to the reST sources are added to the pages.
82+
html_show_sourcelink = False
83+
84+
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
85+
html_show_sphinx = True
86+
87+
# -- Options for autodoc -----------------------------------------------------
88+
autodoc_member_order = 'bumporder'
89+
autodoc_typehints = 'description'
90+
autodoc_typehints_description_target = 'documented'
91+
92+
# -- Options for intersphinx -------------------------------------------------
93+
intersphinx_mapping = {
94+
'python': ('https://docs.python.org/3', None),
95+
'numpy': ('https://numpy.org/doc/stable/', None),
96+
'matplotlib': ('https://matplotlib.org/stable/', None),
97+
'seaborn': ('https://seaborn.pydata.org/', None),
98+
'plotly': ('https://plotly.com/python-api-reference/', None),
99+
}
100+
101+
# -- Options for napoleon ----------------------------------------------------
102+
napoleon_google_docstring = True
103+
napoleon_numpy_docstring = True
104+
napoleon_include_init_with_doc = True
105+
napoleon_include_private_with_doc = False
106+
napoleon_include_special_with_doc = True
107+
napoleon_use_admonition_for_examples = False
108+
napoleon_use_admonition_for_notes = False
109+
napoleon_use_admonition_for_references = False
110+
napoleon_use_ivar = False
111+
napoleon_use_param = True
112+
napoleon_use_rtype = True
113+
114+
# -- Options for MyST --------------------------------------------------------
115+
myst_enable_extensions = [
116+
"colon_fence",
117+
"deflist",
118+
"substitution",
119+
]
120+
121+

docs/make.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd
36+

docs/requirements.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
sphinx>=7.0
2+
sphinx-rtd-theme>=2.0
3+
sphinx-copybutton>=0.5
4+
sphinx-design>=0.5
5+
myst-parser>=2.0
6+
PyYAML>=6.0
7+
8+
16.9 KB
17.2 KB
132 KB
98.2 KB

0 commit comments

Comments
 (0)