Skip to content

Commit

Permalink
Removes sphinx-autoapi pin
Browse files Browse the repository at this point in the history
There still is a bug in `sphinx-autoapi`, but the code that was causing
a crash is no longer required. So I removed it.
  • Loading branch information
Daverball authored Oct 3, 2024
1 parent 1e22e91 commit 3cefa44
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 93 deletions.
121 changes: 38 additions & 83 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from datetime import date


MOCK_MODULES = ["pylibmc", "magic"]
MOCK_MODULES = ['pylibmc', 'magic']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)


Expand All @@ -38,70 +38,25 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"alabaster",
"autoapi.extension",
"myst_parser",
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
'alabaster',
'autoapi.extension',
'myst_parser',
]

intersphinx_mapping = {
"libres": ("https://libres.readthedocs.io/en/latest/", None)
'libres': ('https://libres.readthedocs.io/en/latest/', None)
}

autodoc_member_order = "bysource"

autoapi_type = "python"
autoapi_dirs = [
"../src/onegov/activity",
"../src/onegov/agency",
"../src/onegov/api",
"../src/onegov/async_http",
"../src/onegov/chat",
"../src/onegov/core",
"../src/onegov/directory",
"../src/onegov/election_day",
"../src/onegov/event",
"../src/onegov/feriennet",
"../src/onegov/file",
"../src/onegov/form",
"../src/onegov/foundation",
"../src/onegov/foundation6",
"../src/onegov/fsi",
"../src/onegov/gazette",
"../src/onegov/gis",
"../src/onegov/intranet",
"../src/onegov/landsgemeinde",
"../src/onegov/newsletter",
"../src/onegov/notice",
"../src/onegov/onboarding",
"../src/onegov/org",
"../src/onegov/page",
"../src/onegov/pas",
"../src/onegov/pay",
"../src/onegov/pdf",
"../src/onegov/people",
"../src/onegov/qrcode",
"../src/onegov/quill",
"../src/onegov/recipient",
"../src/onegov/reservation",
"../src/onegov/search",
"../src/onegov/server",
"../src/onegov/shared",
"../src/onegov/stepsequence",
"../src/onegov/swissvotes",
"../src/onegov/ticket",
"../src/onegov/town6",
"../src/onegov/translator_directory",
"../src/onegov/user",
"../src/onegov/websockets",
"../src/onegov/winterthur",
"../src/onegov/wtfs",
]
autodoc_member_order = 'bysource'

autoapi_type = 'python'
autoapi_dirs = ['../src/onegov']

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = {
Expand All @@ -114,20 +69,20 @@
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = "index"
master_doc = 'index'

# General information about the project.
project = "OneGov Docs"
copyright = "{}, Verein OneGov".format(date.today().year)
project = 'OneGov Docs'
copyright = f'{date.today().year}, Verein OneGov'

# 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 = "0.0.1"
version = '0.0.1'
# The full version, including alpha/beta/rc tags.
release = "0.0.1"
release = '0.0.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -141,7 +96,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["_build"]
exclude_patterns = ['_build']

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand All @@ -159,7 +114,7 @@
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
Expand All @@ -171,21 +126,21 @@
# -- 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 = "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 = {
"display_version": False,
'display_version': False,
}

# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
html_title = "Documentation"
html_title = 'Documentation'

# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
Expand All @@ -202,7 +157,7 @@
# 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"]
html_static_path = ['_static']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down Expand Up @@ -251,7 +206,7 @@
# html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = "OneGovDocsdoc"
htmlhelp_basename = 'OneGovDocsdoc'


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -270,11 +225,11 @@
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(
"index",
"OneGovDocs.tex",
"OneGov Docs Documentation",
"Verein Onegov",
"manual",
'index',
'OneGovDocs.tex',
'OneGov Docs Documentation',
'Verein Onegov',
'manual',
),
]

Expand Down Expand Up @@ -304,7 +259,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
("index", "onegovdocs", "OneGov Docs Documentation", ["Verein Onegov"], 1)
('index', 'onegovdocs', 'OneGov Docs Documentation', ['Verein Onegov'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -318,13 +273,13 @@
# dir menu entry, description, category)
texinfo_documents = [
(
"index",
"OneGovDocs",
"OneGov Docs Documentation",
"Denis Krienbühl",
"OneGovDocs",
"One line description of project.",
"Miscellaneous",
'index',
'OneGovDocs',
'OneGov Docs Documentation',
'Denis Krienbühl',
'OneGovDocs',
'One line description of project.',
'Miscellaneous',
),
]

Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ docs =
docutils
Jinja2
sphinx
# FIXME: OGC-1811
sphinx-autoapi<3.3.0
sphinx-autoapi
typing-extensions
myst-parser
test =
Expand Down
8 changes: 0 additions & 8 deletions src/onegov/form/parser/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,10 +1060,6 @@ def parse(self, value: Any) -> object:
class FileinputBase:
extensions: list[str]

if TYPE_CHECKING:
# forward declare __init__
__init__ = Field.__init__ # type:ignore[assignment]

@classmethod
def create( # type:ignore[misc]
cls: type[_FieldT],
Expand Down Expand Up @@ -1097,10 +1093,6 @@ class OptionsField:
choices: list[Choice]
pricing: 'PricingRules'

if TYPE_CHECKING:
# forward declare __init__
__init__ = Field.__init__ # type:ignore[assignment]

@classmethod
def create( # type:ignore[misc]
cls: type[_FieldT],
Expand Down

0 comments on commit 3cefa44

Please sign in to comment.