mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-05-01 12:14:56 +00:00
Merge pull request #231 from Dresdn/Dresdn/issue-230
Update read the docs config
This commit is contained in:
commit
676ea27a79
6 changed files with 86 additions and 156 deletions
Binary file not shown.
|
|
@ -1,66 +0,0 @@
|
|||
@import url('https://fonts.googleapis.com/css?family=Roboto');
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto Slab";
|
||||
src: url("./RobotoSlab-Regular.ttf");
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: #f6f6f6 !important;
|
||||
}
|
||||
|
||||
.doc-title h1 {
|
||||
text-align: center;
|
||||
padding: 2rem !important;
|
||||
}
|
||||
|
||||
.doc-api {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar h3 {
|
||||
font-size: 21px !important;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
div.admonition p.admonition-title, div.sphinxsidebar h3, div.sphinxsidebar h4,
|
||||
div.sphinxsidebar input, div.body h1, div.body h2, div.body h3, div.body h4,
|
||||
div.body h5, div.body h6 { font-family: 'Roboto Slab', 'Helvetica', 'Arial',
|
||||
sans-serif; font-weight: 400; }
|
||||
div.body h1, div.body h2, div.body h3, div.body h4,
|
||||
div.body h5, div.body h6 { color: #353535; }
|
||||
pre, code { font-family: 'Ubuntu Mono', 'Consolas', 'Menlo',
|
||||
'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono';
|
||||
font-size: 15px; background: transparent; }
|
||||
pre, * pre { padding: 7px 0 7px 30px!important;
|
||||
margin: 15px 0!important;
|
||||
line-height: 1.3; }
|
||||
|
||||
|
||||
div.body { color: #3E4349; }
|
||||
a { color: #5D2CD1; }
|
||||
a:hover { color: #7546E3; }
|
||||
p.version-warning { background-color: #7546E3; }
|
||||
a.reference { border-bottom: 1px dotted #5D2CD1; }
|
||||
a.reference:hover { border-bottom: 1px solid #7546E3; }
|
||||
a.footnote-reference { border-bottom: 1px dotted #5D2CD1; }
|
||||
a.footnote-reference:hover { border-bottom: 1px solid #7546E3; }
|
||||
a:hover code { background-color: #eeeeee; }
|
||||
code.xref, a code { background-color: #E8EFF0;
|
||||
border-bottom: 1px solid white; }
|
||||
|
||||
div.indexwrapper h1 {
|
||||
text-indent: -999999px;
|
||||
background: url(click.png) no-repeat center center;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
||||
div.indexwrapper h1 {
|
||||
background: url(click@2x.png) no-repeat center center;
|
||||
background-size: 420px 175px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +1,11 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
# 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
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
# Sphinx documentation generator configuration.
|
||||
#
|
||||
# More information on the configuration options is available at:
|
||||
# http://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
import os
|
||||
import sys
|
||||
from typing import Dict
|
||||
|
||||
import django
|
||||
from django.conf import settings
|
||||
|
|
@ -27,7 +25,7 @@ settings.configure(
|
|||
'django.contrib.staticfiles',
|
||||
'eav',
|
||||
],
|
||||
SECRET_KEY=os.environ.get("DJANGO_SECRET_KEY", "this-is-not-s3cur3"),
|
||||
SECRET_KEY=os.environ.get('DJANGO_SECRET_KEY', 'this-is-not-s3cur3'),
|
||||
)
|
||||
|
||||
# Call django.setup to load installed apps and other stuff.
|
||||
|
|
@ -45,6 +43,18 @@ version = ''
|
|||
release = '0.10.0'
|
||||
|
||||
|
||||
def setup(app):
|
||||
"""Use the configuration file itself as an extension."""
|
||||
app.connect(
|
||||
'autodoc-process-docstring',
|
||||
between(
|
||||
'^.*IGNORE.*$',
|
||||
exclude=True,
|
||||
),
|
||||
)
|
||||
return app
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
extensions = [
|
||||
|
|
@ -53,21 +63,18 @@ extensions = [
|
|||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.coverage',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
html_theme_options = dict(
|
||||
show_powered_by=False, show_related=True, fixed_sidebar=True, font_family='Roboto'
|
||||
)
|
||||
|
||||
templates_path = ['_templates']
|
||||
|
||||
source_suffix = '.rst'
|
||||
|
||||
master_doc = 'index'
|
||||
|
||||
language = None
|
||||
language = 'en'
|
||||
|
||||
exclude_patterns = []
|
||||
exclude_patterns = ['build']
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
|
@ -75,66 +82,27 @@ pygments_style = 'sphinx'
|
|||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = 'alabaster'
|
||||
|
||||
# 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 = {}
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
|
||||
# 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,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names
|
||||
# to template names.
|
||||
#
|
||||
# The default sidebars (for documents that don't match any pattern) are
|
||||
# defined by theme itself. Builtin themes are using these templates by
|
||||
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
|
||||
# 'searchbox.html']``.
|
||||
#
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_css_file('styles.css')
|
||||
app.connect('autodoc-process-docstring', between('^.*IGNORE.*$', exclude=True))
|
||||
return app
|
||||
|
||||
|
||||
html_sidebars = {
|
||||
'index': ['sidebarintro.html', 'localtoc.html'],
|
||||
'**': ['sidebarintro.html', 'localtoc.html', 'relations.html', 'searchbox.html'],
|
||||
'**': [
|
||||
'sidebarintro.html',
|
||||
'localtoc.html',
|
||||
'relations.html',
|
||||
'searchbox.html',
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
# -- Options for HTMLHelp output ---------------------------------------------
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'DjangoEAV2doc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output ------------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#
|
||||
# 'papersize': 'letterpaper',
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#
|
||||
# 'pointsize': '10pt',
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#
|
||||
# 'preamble': '',
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
}
|
||||
latex_elements: Dict[str, str] = {}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
|
|
@ -148,7 +116,15 @@ latex_documents = [
|
|||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [(master_doc, 'djangoeav2', 'Django EAV 2 Documentation', [author], 1)]
|
||||
man_pages = [
|
||||
(
|
||||
master_doc,
|
||||
'djangoeav2',
|
||||
'Django EAV 2 Documentation',
|
||||
[author],
|
||||
1,
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
# -- Options for Texinfo output ----------------------------------------------
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ def rewrite_q_expr(model_cls, expr):
|
|||
single row in a eav_values table cannot be both in two disjoint sets at
|
||||
the same time (and the whole point of using AND, usually, is two have
|
||||
two different sets). Therefore, we must paritially rewrite the
|
||||
expression so that the generated SQL is valid::
|
||||
expression so that the generated SQL is valid.
|
||||
|
||||
IGNORE:
|
||||
└── OR
|
||||
|
|
|
|||
68
poetry.lock
generated
68
poetry.lock
generated
|
|
@ -3,7 +3,7 @@ name = "alabaster"
|
|||
version = "0.7.12"
|
||||
description = "A configurable sidebar-enabled Sphinx theme"
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
|
||||
[[package]]
|
||||
|
|
@ -71,7 +71,7 @@ name = "babel"
|
|||
version = "2.9.1"
|
||||
description = "Internationalization utilities"
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
||||
|
||||
[package.dependencies]
|
||||
|
|
@ -245,26 +245,25 @@ Django = ">=2.2"
|
|||
|
||||
[[package]]
|
||||
name = "doc8"
|
||||
version = "1.0.0"
|
||||
version = "0.11.2"
|
||||
description = "Style checker for Sphinx (or other) RST documentation"
|
||||
category = "dev"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[package.dependencies]
|
||||
docutils = ">=0.19,<0.21"
|
||||
docutils = "*"
|
||||
Pygments = "*"
|
||||
restructuredtext-lint = ">=0.7"
|
||||
stevedore = "*"
|
||||
tomli = {version = "*", markers = "python_version < \"3.11\""}
|
||||
|
||||
[[package]]
|
||||
name = "docutils"
|
||||
version = "0.19"
|
||||
version = "0.17.1"
|
||||
description = "Docutils -- Python Documentation Utilities"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
||||
|
||||
[[package]]
|
||||
name = "dparse"
|
||||
|
|
@ -605,7 +604,7 @@ name = "imagesize"
|
|||
version = "1.3.0"
|
||||
description = "Getting image size from png/jpeg/jpeg2000/gif file"
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
||||
|
||||
[[package]]
|
||||
|
|
@ -667,7 +666,7 @@ name = "jinja2"
|
|||
version = "3.0.3"
|
||||
description = "A very fast and expressive template engine."
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[package.dependencies]
|
||||
|
|
@ -716,7 +715,7 @@ name = "markupsafe"
|
|||
version = "2.0.1"
|
||||
description = "Safely add untrusted strings to HTML/XML markup."
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[[package]]
|
||||
|
|
@ -869,7 +868,7 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
|
|||
name = "pbr"
|
||||
version = "5.8.0"
|
||||
description = "Python Build Reasonableness"
|
||||
category = "dev"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=2.6"
|
||||
|
||||
|
|
@ -1123,7 +1122,7 @@ docs = ["furo (>=2021.9.8)", "linkify-it-py (>=1.0.1,<2.0.0)", "myst-parser (>=0
|
|||
name = "restructuredtext-lint"
|
||||
version = "1.3.2"
|
||||
description = "reStructuredText linter"
|
||||
category = "dev"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
|
||||
|
|
@ -1205,7 +1204,7 @@ name = "sphinx"
|
|||
version = "5.1.1"
|
||||
description = "Python documentation generator"
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[package.dependencies]
|
||||
|
|
@ -1247,12 +1246,27 @@ Sphinx = ">=5.1.1"
|
|||
testing = ["covdefaults (>=2.2)", "coverage (>=6.4.2)", "diff-cover (>=6.5.1)", "nptyping (>=2.2)", "pytest (>=7.1.2)", "pytest-cov (>=3)", "sphobjinv (>=2.2.2)", "typing-extensions (>=4.3)"]
|
||||
type_comments = ["typed-ast (>=1.5.4)"]
|
||||
|
||||
[[package]]
|
||||
name = "sphinx-rtd-theme"
|
||||
version = "1.0.0"
|
||||
description = "Read the Docs theme for Sphinx"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*"
|
||||
|
||||
[package.dependencies]
|
||||
docutils = "<0.18"
|
||||
sphinx = ">=1.6"
|
||||
|
||||
[package.extras]
|
||||
dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client"]
|
||||
|
||||
[[package]]
|
||||
name = "sphinxcontrib-applehelp"
|
||||
version = "1.0.2"
|
||||
description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books"
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[package.extras]
|
||||
|
|
@ -1264,7 +1278,7 @@ name = "sphinxcontrib-devhelp"
|
|||
version = "1.0.2"
|
||||
description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document."
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[package.extras]
|
||||
|
|
@ -1276,7 +1290,7 @@ name = "sphinxcontrib-htmlhelp"
|
|||
version = "2.0.0"
|
||||
description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files"
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[package.extras]
|
||||
|
|
@ -1288,7 +1302,7 @@ name = "sphinxcontrib-jsmath"
|
|||
version = "1.0.1"
|
||||
description = "A sphinx extension which renders display math in HTML via JavaScript"
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[package.extras]
|
||||
|
|
@ -1299,7 +1313,7 @@ name = "sphinxcontrib-qthelp"
|
|||
version = "1.0.3"
|
||||
description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document."
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[package.extras]
|
||||
|
|
@ -1311,7 +1325,7 @@ name = "sphinxcontrib-serializinghtml"
|
|||
version = "1.1.5"
|
||||
description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)."
|
||||
category = "main"
|
||||
optional = true
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[package.extras]
|
||||
|
|
@ -1330,7 +1344,7 @@ python-versions = ">=3.5"
|
|||
name = "stevedore"
|
||||
version = "3.5.0"
|
||||
description = "Manage dynamic plugins for Python applications"
|
||||
category = "dev"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
|
|
@ -1490,12 +1504,12 @@ docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"]
|
|||
testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"]
|
||||
|
||||
[extras]
|
||||
docs = ["sphinx", "sphinx-autodoc-typehints", "m2r2", "tomlkit"]
|
||||
docs = ["sphinx", "sphinx-autodoc-typehints", "sphinx-rtd-theme", "m2r2", "tomlkit"]
|
||||
|
||||
[metadata]
|
||||
lock-version = "1.1"
|
||||
python-versions = "^3.7"
|
||||
content-hash = "314d208d7d2d68e8e722b808a36937a536ff5e5f8b5cd4bbbf656f418f759884"
|
||||
content-hash = "117a9424d991191615ddb2952a8d1142b8d2458745db8826fade24be4146af00"
|
||||
|
||||
[metadata.files]
|
||||
alabaster = [
|
||||
|
|
@ -1569,7 +1583,10 @@ dictdiffer = [
|
|||
django = []
|
||||
django-jsonfield-backport = []
|
||||
doc8 = []
|
||||
docutils = []
|
||||
docutils = [
|
||||
{file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"},
|
||||
{file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"},
|
||||
]
|
||||
dparse = [
|
||||
{file = "dparse-0.5.1-py3-none-any.whl", hash = "sha256:e953a25e44ebb60a5c6efc2add4420c177f1d8404509da88da9729202f306994"},
|
||||
{file = "dparse-0.5.1.tar.gz", hash = "sha256:a1b5f169102e1c894f9a7d5ccf6f9402a836a5d24be80a986c7ce9eaed78f367"},
|
||||
|
|
@ -1918,6 +1935,7 @@ sortedcontainers = [
|
|||
]
|
||||
sphinx = []
|
||||
sphinx-autodoc-typehints = []
|
||||
sphinx-rtd-theme = []
|
||||
sphinxcontrib-applehelp = [
|
||||
{file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"},
|
||||
{file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"},
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ sphinx = { version = "^5.0", optional = true }
|
|||
sphinx-autodoc-typehints = { version = "^1.12", optional = true }
|
||||
m2r2 = { version = "^0.3", optional = true }
|
||||
tomlkit = { version = "^0.11", optional = true }
|
||||
doc8 = "^0.11.2"
|
||||
sphinx-rtd-theme = "^1.0.0"
|
||||
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
mypy = "^0.971"
|
||||
|
|
@ -77,8 +80,6 @@ safety = "^2.1"
|
|||
pytest = "^6.2"
|
||||
pytest-cov = "^3.0"
|
||||
pytest-randomly = "^3.12"
|
||||
|
||||
doc8 = "^1.0"
|
||||
pytest-pythonpath = "^0.7.4"
|
||||
pytest-django = "^4.5.2"
|
||||
black = "^22.6"
|
||||
|
|
@ -88,6 +89,7 @@ hypothesis = "^6.54.2"
|
|||
docs = [
|
||||
"sphinx",
|
||||
"sphinx-autodoc-typehints",
|
||||
"sphinx_rtd_theme",
|
||||
"m2r2",
|
||||
"tomlkit",
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue