diff --git a/.gitignore b/.gitignore index 6faecdb..ae927ea 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ build/ venv/ .omc/ uv.lock +docs/_build/ diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..71b24d0 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,18 @@ +# .readthedocs.yaml +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +sphinx: + configuration: docs/conf.py + +formats: + - pdf + - epub + +python: + install: + - requirements: docs/requirements.txt diff --git a/README.md b/README.md index 0491bf1..56ee152 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,7 @@ # easy-tdx -# easy-tdx - [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![PyPI](https://img.shields.io/pypi/v/easy-tdx.svg)](https://pypi.org/project/easy-tdx/) -[![PyPI - Downloads](https://img.shields.io/pypi/dm/easy-tdx)](https://pypi.org/project/easy-tdx/) -[![Python Version](https://img.shields.io/pypi/pyversions/easy-tdx)](https://pypi.org/project/easy-tdx/) [![GitHub Repo stars](https://img.shields.io/github/stars/handsomejustin/easy-tdx?style=social)](https://github.com/handsomejustin/easy-tdx) [![GitHub last commit](https://img.shields.io/github/last-commit/handsomejustin/easy-tdx)](https://github.com/handsomejustin/easy-tdx) [![Read the Docs](https://img.shields.io/readthedocs/easy-tdx)](https://easy-tdx.readthedocs.io/) diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..aa67349 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,33 @@ +# -- Sphinx configuration for easy-tdx --------------------------------------- +project = "easy-tdx" +copyright = "2025, Justin Gu" +author = "Justin Gu" + +# The full version, including alpha/beta/rc tags +release = "1.7.1" + +# -- Extensions --------------------------------------------------------------- +extensions = [ + "myst_parser", +] + +# -- MyST parser config ------------------------------------------------------- +myst_enable_extensions = [ + "colon_fence", + "deflist", +] + +# Suppress cross-reference warnings for relative links (e.g. docs/*.md, LICENSE) +suppress_warnings = ["myst.xref_missing"] + +# -- HTML output -------------------------------------------------------------- +html_theme = "sphinx_rtd_theme" +html_theme_options = { + "navigation_depth": 3, +} + +# -- Source suffix ------------------------------------------------------------- +source_suffix = { + ".rst": "restructuredtext", + ".md": "markdown", +} diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..a673a04 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,12 @@ +# easy-tdx 文档 + +```{toctree} +:maxdepth: 2 +:caption: 目录 + +readme +api_reference +field_mapping +indicator-zhuoyao +indicator-bias-signal +``` diff --git a/docs/readme.md b/docs/readme.md new file mode 100644 index 0000000..dac7c39 --- /dev/null +++ b/docs/readme.md @@ -0,0 +1,5 @@ +# easy-tdx + +```{include} ../README.md +:relative-images: +``` diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..fcd9f10 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,4 @@ +sphinx>=7.0 +sphinx-autobuild>=2024.0 +myst-parser>=3.0 +sphinx-rtd-theme>=2.0