Skip to content

Commit 5d8fd7f

Browse files
committed
fix: Minimal functional conf.py for autodoc with decorated methods
1 parent 9e7d998 commit 5d8fd7f

File tree

1 file changed

+24
-68
lines changed

1 file changed

+24
-68
lines changed

docs/conf.py

Lines changed: 24 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,42 @@
1-
# Configuration file for the Sphinx documentation builder.
2-
#
3-
# This file only contains a selection of the most common options. For a full
4-
# list see the documentation:
5-
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6-
import inspect
7-
# -- Path setup --------------------------------------------------------------
1+
# Configuration file for Sphinx documentation builder
82

9-
# If extensions (or modules to document with autodoc) are in another directory,
10-
# add these directories to sys.path here. If the directory is relative to the
11-
# documentation root, use os.path.abspath to make it absolute, like shown here.
12-
#
13-
# import os
14-
# import sys
153
import os
164
import sys
175

18-
sys.path.insert(0, os.path.abspath('.'))
19-
20-
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
21-
parentdir = os.path.dirname(currentdir)
22-
sys.path.insert(0, parentdir)
23-
24-
# Importar el módulo principal - ¡ESTO ES CLAVE Y DIFERENTE A LO QUE HEMOS HECHO!
25-
import ad_api
6+
# Agregar directorio padre al path
7+
sys.path.insert(0, os.path.abspath('..'))
268

279
# -- Project information -----------------------------------------------------
28-
29-
project = 'PYTHON-AMAZON-AD-API'
10+
project = 'Python Amazon Advertising API'
3011
copyright = '2023, Daniel Alvaro'
3112
author = 'Daniel Alvaro'
13+
release = '0.7.4'
14+
version = '0.7.4'
3215

3316
# -- General configuration ---------------------------------------------------
34-
35-
# Add any Sphinx extension module names here, as strings. They can be
36-
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
37-
# ones.
3817
extensions = [
39-
"sphinx_rtd_theme", 'button', 'cookieconsent',
40-
'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon',
41-
'enum_tools.autoenum',
42-
18+
'sphinx.ext.autodoc',
19+
'sphinx.ext.napoleon', # Para docstrings estilo Google
20+
'sphinx_rtd_theme',
4321
]
4422

45-
# Add any paths that contain templates here, relative to this directory.
46-
templates_path = ['_templates']
47-
48-
# List of patterns, relative to source directory, that match files and
49-
# directories to ignore when looking for source files.
50-
# This pattern also affects html_static_path and html_extra_path.
51-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
52-
autodoc_default_options = {"members": True, "undoc-members": True, 'member-order': 'bysource'}
53-
# html_theme_options = {
54-
# "collapse_navigation": False
55-
# }
56-
# -- Options for HTML output -------------------------------------------------
57-
58-
# The theme to use for HTML and HTML Help pages. See the documentation for
59-
# a list of builtin themes.
60-
#
61-
# html_theme = 'sphinx_rtd_theme'
62-
# html_theme = "pydata_sphinx_theme"
63-
html_theme = 'alabaster'
64-
65-
html_theme_options = {
66-
'github_button': True, # optional tweaks
67-
'github_banner': True,
68-
'github_button': True,
69-
'description': '''
70-
A wrapper to access Amazon's Advertising API with an easy-to-use interface.
71-
''',
72-
'donate_url': 'https://github.com/sponsors/denisneuf',
73-
'github_user': 'denisneuf',
74-
'github_repo': 'python-amazon-ad-api',
75-
"github_type": "star", # watch|star|fork
76-
'fixed_sidebar': True
23+
# Configuración MINIMAL pero FUNCIONAL
24+
autodoc_default_options = {
25+
'members': True,
26+
'undoc-members': True,
27+
'member-order': 'bysource',
7728
}
78-
# Add any paths that contain custom static files (such as style sheets) here,
79-
relative to this directory. They are copied after the builtin static files,
80-
so a file named "default.css" will overwrite the builtin "default.css".
81-
html_static_path = ['_static']
82-
html_css_files = ['custom.css']
8329

30+
# IMPORTANTE para métodos decorados
31+
autodoc_inherit_docstrings = True
8432

33+
# Configuración de napoleon
8534
napoleon_google_docstring = True
8635
napoleon_numpy_docstring = False
36+
37+
templates_path = ['_templates']
38+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
39+
40+
# -- Options for HTML output -------------------------------------------------
41+
html_theme = 'sphinx_rtd_theme'
42+
html_static_path = ['_static']

0 commit comments

Comments
 (0)