-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from vict0rsch/docs
- Loading branch information
Showing
12 changed files
with
643 additions
and
500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
# Read the Docs configuration file for Sphinx projects | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the OS, Python version and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.9" | ||
# You can also specify other tool versions: | ||
# nodejs: "20" | ||
# rust: "1.70" | ||
# golang: "1.20" | ||
|
||
# Build documentation in the "docs/" directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
# You can configure Sphinx to use a different builder, for instance use the | ||
# dirhtml builder for simpler URLs | ||
# builder: "dirhtml" | ||
# Fail on all warnings to avoid broken references | ||
# fail_on_warning: true | ||
# Optionally build your docs in additional formats such as PDF and ePub | ||
# formats: | ||
# - epub | ||
|
||
# Optional but recommended, declare the Python requirements required | ||
# to build your documentation | ||
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html | ||
python: | ||
install: | ||
- requirements: docs/requirements-docs.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'gitmopy' | ||
copyright = '2023, vict0rsch' | ||
author = 'vict0rsch' | ||
|
||
version = '0.4.1' | ||
release = '0.4.1' | ||
|
||
import sys | ||
from pathlib import Path | ||
|
||
ROOT = Path(__file__).resolve().parent.parent | ||
sys.path.insert(0, str(ROOT)) | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
"myst_parser", | ||
"sphinx.ext.viewcode", | ||
"sphinx_math_dollar", | ||
"sphinx.ext.mathjax", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.intersphinx", | ||
"autoapi.extension", | ||
"sphinx.ext.napoleon", | ||
"sphinx_autodoc_typehints", | ||
"sphinx.ext.todo", | ||
"sphinx_design", | ||
"sphinx_copybutton", | ||
"sphinxext.opengraph", | ||
] | ||
|
||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = "furo" | ||
html_static_path = ['_static'] | ||
html_css_files = ["css/custom.css"] | ||
|
||
# -- Options for intersphinx extension --------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration | ||
|
||
intersphinx_mapping = { | ||
'python': ('https://docs.python.org/3', None), | ||
} | ||
|
||
# -- Options for todo extension ---------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/extensions/todo.html#configuration | ||
|
||
todo_include_todos = True | ||
|
||
|
||
# Configuration section from vipyto: | ||
# ---------------------------------- | ||
|
||
# Configuratiion for sphinx.ext.autodoc & autoapi.extension | ||
# https://autoapi.readthedocs.io/ | ||
|
||
autodoc_typehints = "description" | ||
autoapi_type = "python" | ||
autoapi_dirs = [str(ROOT/ "gitmopy")] | ||
autoapi_member_order = "groupwise" | ||
autoapi_template_dir = "_templates/autoapi" | ||
autoapi_python_class_content = "init" | ||
autoapi_options = [ | ||
"members", | ||
"undoc-members", | ||
] | ||
autoapi_keep_files = False | ||
|
||
# Configuration for sphinx_math_dollar | ||
|
||
# sphinx_math_dollar | ||
# https://www.sympy.org/sphinx-math-dollar/ | ||
|
||
# Note: CHTML is the only output format that works with \mathcal{} | ||
mathjax_path = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML" | ||
mathjax3_config = { | ||
"tex": { | ||
"inlineMath": [ | ||
["$", "$"], | ||
["\\(", "\\)"], | ||
], | ||
"processEscapes": True, | ||
}, | ||
"jax": ["input/TeX", "output/CommonHTML", "output/HTML-CSS"], | ||
} | ||
|
||
# Configuration for sphinx_autodoc_typehints | ||
# https://github.com/tox-dev/sphinx-autodoc-typehints | ||
typehints_fully_qualified = False | ||
always_document_param_types = True | ||
typehints_document_rtype = True | ||
typehints_defaults = "comma" | ||
|
||
# Configuration for the MyST (markdown) parser | ||
# https://myst-parser.readthedocs.io/en/latest/intro.html | ||
myst_enable_extensions = ["colon_fence"] | ||
|
||
# Configuration for sphinxext.opengraph | ||
# https://sphinxext-opengraph.readthedocs.io/en/latest/ | ||
|
||
ogp_site_url = "TODO" | ||
ogp_social_cards = { | ||
"enable": True, | ||
"image": "./_static/images/SOME_IMAGE", | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Gitmopy's Emoji Sets | ||
===================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
|
||
Select your emoji sets from the command-line: | ||
|
||
.. code-block:: bash | ||
$ gitmopy config | ||
Gitmojis | ||
-------- | ||
|
||
Default standard gitmojis are from `gitmoji.dev <https://gitmoji.dev/>`_. | ||
|
||
.. literalinclude:: ../gitmopy/assets/gitmojis.yaml | ||
:language: yaml | ||
|
||
AI-Devmojis | ||
----------- | ||
|
||
Alternative gitmojis tailored for AI/ML development. Suggestions are welcome, open a PR/issue on the `gitmopy repo <https://github.com/vict0rsch/gitmopy>`_. | ||
|
||
.. literalinclude:: ../gitmopy/assets/ai_devmojis.yaml | ||
:language: yaml | ||
|
||
Custom | ||
------ | ||
|
||
You can also define your own emoji sets in a YAML file. Run ``gitmopy info`` to see the path to that custom emojis file on your system. | ||
|
||
Custom emojis are loaded *after* the default emoji set you have selected (gitmojis or ai-devmojis). This means that you can override any emoji from the default set with your own custom emoji. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.. include:: ../README.md | ||
:parser: myst_parser.sphinx_ | ||
|
||
.. toctree:: | ||
:hidden: | ||
:maxdepth: 4 | ||
|
||
self | ||
emoji_sets | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=. | ||
set BUILDDIR=_build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
sphinx | ||
myst-parser | ||
furo | ||
sphinx-copybutton | ||
sphinx-autodoc-typehints | ||
sphinx-autoapi | ||
sphinx-math-dollar | ||
sphinx-design | ||
sphinx-copybutton | ||
sphinxext-opengraph |
Oops, something went wrong.