mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
RST to MyST, pyproject doc dependencies, add sphinx tabs
This commit is contained in:
parent
424246df26
commit
13d866bd0d
@ -7,11 +7,11 @@ version: 2
|
|||||||
|
|
||||||
# Set the version of Python and other tools you might need
|
# Set the version of Python and other tools you might need
|
||||||
build:
|
build:
|
||||||
os: ubuntu-20.04
|
os: ubuntu-22.04
|
||||||
apt_packages:
|
apt_packages:
|
||||||
- redis
|
- redis
|
||||||
tools:
|
tools:
|
||||||
python: "3.8"
|
python: "3.11"
|
||||||
|
|
||||||
# Build documentation in the docs/ directory with Sphinx
|
# Build documentation in the docs/ directory with Sphinx
|
||||||
sphinx:
|
sphinx:
|
||||||
@ -20,7 +20,10 @@ sphinx:
|
|||||||
# Optionally build your docs in additional formats such as PDF and ePub
|
# Optionally build your docs in additional formats such as PDF and ePub
|
||||||
formats: all
|
formats: all
|
||||||
|
|
||||||
# Optionally set the version of Python and requirements required to build your docs
|
# Python requirements required to build your docs
|
||||||
python:
|
python:
|
||||||
install:
|
install:
|
||||||
- requirements: docs/requirements.txt
|
- method: pip
|
||||||
|
path: .
|
||||||
|
extra_requirements:
|
||||||
|
- docs
|
||||||
|
@ -17,7 +17,7 @@ An auth system for EVE Online to help in-game organizations manage online servic
|
|||||||
- [Documentation](http://allianceauth.rtfd.io)
|
- [Documentation](http://allianceauth.rtfd.io)
|
||||||
- [Support](#support)
|
- [Support](#support)
|
||||||
- [Release Notes](https://gitlab.com/allianceauth/allianceauth/-/releases)
|
- [Release Notes](https://gitlab.com/allianceauth/allianceauth/-/releases)
|
||||||
- [Developer Team](#developer-team)
|
- [Developer Team](#development-team)
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
104
docs/conf.py
104
docs/conf.py
@ -1,15 +1,10 @@
|
|||||||
|
# Configuration file for the Sphinx documentation builder.
|
||||||
#
|
#
|
||||||
# Alliance Auth documentation build configuration file, created by
|
# This file only contains a selection of the most common options. For a full
|
||||||
# sphinx-quickstart on Tue Jan 3 12:56:59 2017.
|
# list see the documentation:
|
||||||
#
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||||
# This file is execfile()d with the current directory set to its
|
|
||||||
# containing dir.
|
# -- Path setup --------------------------------------------------------------
|
||||||
#
|
|
||||||
# Note that not all possible configuration values are present in this
|
|
||||||
# autogenerated file.
|
|
||||||
#
|
|
||||||
# All configuration values have a default; values that are commented out
|
|
||||||
# serve to show the default.
|
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
@ -18,23 +13,23 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import django
|
import django
|
||||||
|
import sphinx_rtd_theme # noqa
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
sys.path.insert(0, os.path.abspath('..'))
|
||||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings_all'
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings_all'
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
|
project = 'Alliance Auth'
|
||||||
|
copyright = '2018-2023, Alliance Auth'
|
||||||
|
author = 'Alliance Auth Team'
|
||||||
|
|
||||||
|
# -- General configuration ---------------------------------------------------
|
||||||
|
|
||||||
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
|
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
|
|
||||||
# Support for recommonmark module
|
|
||||||
import recommonmark
|
|
||||||
from recommonmark.transform import AutoStructify
|
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
|
||||||
#
|
|
||||||
# needs_sphinx = '1.0'
|
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
@ -42,11 +37,18 @@ from recommonmark.transform import AutoStructify
|
|||||||
extensions = [
|
extensions = [
|
||||||
'sphinx_rtd_theme',
|
'sphinx_rtd_theme',
|
||||||
'sphinx.ext.autodoc',
|
'sphinx.ext.autodoc',
|
||||||
|
'sphinx.ext.intersphinx',
|
||||||
'sphinx.ext.napoleon',
|
'sphinx.ext.napoleon',
|
||||||
'recommonmark',
|
|
||||||
'sphinxcontrib_django2',
|
|
||||||
'sphinx.ext.viewcode',
|
'sphinx.ext.viewcode',
|
||||||
'sphinx_copybutton'
|
'myst_parser',
|
||||||
|
'sphinxcontrib_django2',
|
||||||
|
'sphinx_copybutton',
|
||||||
|
'sphinx_tabs.tabs'
|
||||||
|
]
|
||||||
|
|
||||||
|
myst_enable_extensions = [
|
||||||
|
"colon_fence",
|
||||||
|
"tasklist",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
@ -59,41 +61,16 @@ templates_path = ['_templates']
|
|||||||
source_suffix = ['.md', '.rst']
|
source_suffix = ['.md', '.rst']
|
||||||
|
|
||||||
# The master toctree document.
|
# The master toctree document.
|
||||||
master_doc = 'index'
|
root_doc = 'index'
|
||||||
|
|
||||||
# General information about the project.
|
|
||||||
project = 'Alliance Auth'
|
|
||||||
copyright = '2018-2022, Alliance Auth'
|
|
||||||
author = 'Alliance Auth Team'
|
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
|
||||||
# |version| and |release|, also used in various other places throughout the
|
|
||||||
# built documents.
|
|
||||||
#
|
|
||||||
# The short X.Y version.
|
|
||||||
version = '3.0'
|
|
||||||
# The full version, including alpha/beta/rc tags.
|
|
||||||
# release = u'1.14.0'
|
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
||||||
# for a list of supported languages.
|
|
||||||
#
|
|
||||||
# This is also used if you do content translation via gettext catalogs.
|
|
||||||
# Usually you set "language" from the command line for these cases.
|
|
||||||
language = 'en'
|
|
||||||
|
|
||||||
# List of patterns, relative to source directory, that match files and
|
# List of patterns, relative to source directory, that match files and
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
# This patterns also effect to html_static_path and html_extra_path
|
# This patterns also effect to html_static_path and html_extra_path
|
||||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||||
|
|
||||||
# The name of the Pygments (syntax highlighting) style to use.
|
|
||||||
pygments_style = 'sphinx'
|
|
||||||
|
|
||||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
todo_include_todos = False
|
todo_include_todos = False
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTML output ----------------------------------------------
|
# -- Options for HTML output ----------------------------------------------
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
@ -101,15 +78,6 @@ todo_include_todos = False
|
|||||||
#
|
#
|
||||||
html_theme = 'sphinx_rtd_theme'
|
html_theme = 'sphinx_rtd_theme'
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
|
||||||
# further. For a list of options available for each theme, see the
|
|
||||||
# documentation.
|
|
||||||
#
|
|
||||||
|
|
||||||
html_theme_options = {
|
|
||||||
'navigation_depth': 4,
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
@ -147,7 +115,7 @@ latex_elements = {
|
|||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, 'AllianceAuth.tex', 'Alliance Auth Documentation', 'R4stl1n', 'manual'),
|
(root_doc, 'AllianceAuth.tex', 'Alliance Auth Documentation', 'Alliance Auth Team', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -156,7 +124,7 @@ latex_documents = [
|
|||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
(master_doc, 'allianceauth', 'Alliance Auth Documentation',
|
(root_doc, 'allianceauth', 'Alliance Auth Documentation',
|
||||||
[author], 1)
|
[author], 1)
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -169,15 +137,7 @@ add_module_names = False
|
|||||||
# Grouping the document tree into Texinfo files. List of tuples
|
# Grouping the document tree into Texinfo files. List of tuples
|
||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [(
|
||||||
(master_doc, 'AllianceAuth', 'Alliance Auth Documentation',
|
root_doc, 'AllianceAuth', 'Alliance Auth Documentation', author, 'AllianceAuth',
|
||||||
author, 'AllianceAuth', 'An auth system for EVE Online to help in-game organizations manage online service access.',
|
'An auth system for EVE Online to help in-game organizations manage online service access.', 'Miscellaneous'),
|
||||||
'Miscellaneous'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def setup(app):
|
|
||||||
app.add_config_value('recommonmark_config', {
|
|
||||||
'auto_toc_tree_section': 'Contents',
|
|
||||||
}, True)
|
|
||||||
app.add_transform(AutoStructify)
|
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
# Docs Specific Packages
|
|
||||||
sphinx>=4.4.0,<5.0.0
|
|
||||||
sphinx_rtd_theme>=1.0.0,<2.0.0
|
|
||||||
recommonmark==0.7.1
|
|
||||||
Jinja2<3.1
|
|
||||||
docutils==0.16
|
|
||||||
sphinxcontrib-django2
|
|
||||||
sphinx-copybutton
|
|
||||||
|
|
||||||
# Autodoc dependencies
|
|
||||||
celery>=5.2.0,<6.0.0
|
|
||||||
celery_once>=3.0.1
|
|
||||||
django>=4.0.6,<4.1.0
|
|
||||||
django-bootstrap-form
|
|
||||||
django-celery-beat>=2.3.0
|
|
||||||
django-esi>=4.0.1
|
|
||||||
django-redis>=5.2.0,<6.0.0
|
|
||||||
django-sortedm2m
|
|
||||||
passlib
|
|
||||||
redis>=4.0.0,<5.0.0
|
|
@ -60,7 +60,15 @@ dependencies = [
|
|||||||
test = [
|
test = [
|
||||||
"coverage>=4.3.1",
|
"coverage>=4.3.1",
|
||||||
"django-webtest",
|
"django-webtest",
|
||||||
"requests-mock>=1.2.0",
|
"requests-mock>=1.2.0"
|
||||||
|
]
|
||||||
|
docs = [
|
||||||
|
"sphinx",
|
||||||
|
"sphinx_rtd_theme>=1.0.0,<2.0.0",
|
||||||
|
"myst-parser",
|
||||||
|
"sphinxcontrib-django",
|
||||||
|
"sphinx-copybutton",
|
||||||
|
"sphinx-tabs",
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user