зеркало из
https://github.com/ssciwr/AMMICO.git
synced 2025-10-29 05:04:14 +02:00
add sphinx documentation files (#47)
* add sphinx doc * add github pages files * create docs workflow * add sphinx requirements * add napoleon ext * fix name typo
Этот коммит содержится в:
родитель
c49a85bc65
Коммит
4744ed5256
31
.github/workflows/docs.yml
поставляемый
Обычный файл
31
.github/workflows/docs.yml
поставляемый
Обычный файл
@ -0,0 +1,31 @@
|
||||
name: Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
||||
- name: install misinformation
|
||||
run: |
|
||||
pip install -e .
|
||||
python -m pip install -r requirements-dev.txt
|
||||
- name: Build documentation
|
||||
run: |
|
||||
cd docs
|
||||
make html
|
||||
- name: Push changes to gh-pages
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
folder: docs # The folder the action should deploy.
|
||||
0
docs/.nojekyll
Обычный файл
0
docs/.nojekyll
Обычный файл
20
docs/Makefile
Обычный файл
20
docs/Makefile
Обычный файл
@ -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 = source
|
||||
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)
|
||||
2
docs/index.html
Обычный файл
2
docs/index.html
Обычный файл
@ -0,0 +1,2 @@
|
||||
<meta http-equiv="refresh" content="0; url=./build/html/index.html" />
|
||||
|
||||
35
docs/make.bat
Обычный файл
35
docs/make.bat
Обычный файл
@ -0,0 +1,35 @@
|
||||
@ECHO OFF
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set SOURCEDIR=source
|
||||
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
|
||||
33
docs/source/conf.py
Обычный файл
33
docs/source/conf.py
Обычный файл
@ -0,0 +1,33 @@
|
||||
# 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
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath("../../misinformation/"))
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
|
||||
project = "misinformation"
|
||||
copyright = "2022, Scientific Software Center, Heidelberg University"
|
||||
author = "Scientific Software Center, Heidelberg University"
|
||||
release = "0.0.1"
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "myst_parser"]
|
||||
|
||||
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 = "sphinx_rtd_theme"
|
||||
html_static_path = ["_static"]
|
||||
22
docs/source/index.rst
Обычный файл
22
docs/source/index.rst
Обычный файл
@ -0,0 +1,22 @@
|
||||
.. misinformation documentation master file, created by
|
||||
sphinx-quickstart on Mon Dec 19 13:39:22 2022.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to misinformation's documentation!
|
||||
==========================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
readme_link
|
||||
modules
|
||||
license_link
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
4
docs/source/license_link.md
Обычный файл
4
docs/source/license_link.md
Обычный файл
@ -0,0 +1,4 @@
|
||||
# License
|
||||
|
||||
```{include} ../../LICENSE
|
||||
```
|
||||
55
docs/source/misinformation.rst
Обычный файл
55
docs/source/misinformation.rst
Обычный файл
@ -0,0 +1,55 @@
|
||||
utils module
|
||||
------------
|
||||
|
||||
.. automodule:: utils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
display module
|
||||
--------------
|
||||
|
||||
.. automodule:: display
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
faces module
|
||||
------------
|
||||
|
||||
.. automodule:: faces
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
objects_cvlib module
|
||||
--------------------
|
||||
|
||||
.. automodule:: objects_cvlib
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
objects module
|
||||
--------------
|
||||
|
||||
.. automodule:: objects
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
text module
|
||||
-----------
|
||||
|
||||
.. automodule:: text
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
cropposts module
|
||||
----------------
|
||||
|
||||
.. automodule:: cropposts
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
7
docs/source/modules.rst
Обычный файл
7
docs/source/modules.rst
Обычный файл
@ -0,0 +1,7 @@
|
||||
misinformation package modules
|
||||
==============================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
misinformation
|
||||
2
docs/source/readme_link.md
Обычный файл
2
docs/source/readme_link.md
Обычный файл
@ -0,0 +1,2 @@
|
||||
```{include} ../../README.md
|
||||
```
|
||||
4
requirements-dev.txt
Обычный файл
4
requirements-dev.txt
Обычный файл
@ -0,0 +1,4 @@
|
||||
sphinx
|
||||
myst-parser
|
||||
sphinx_rtd_theme
|
||||
sphinxcontrib-napoleon
|
||||
Загрузка…
x
Ссылка в новой задаче
Block a user