1- # Configuration file for Sphinx - ENFOQUE RADICAL
2- # NO intenta importar el módulo, solo mockea TODO
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 --------------------------------------------------------------
8+
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+
313
414import os
515import sys
616
7- # Agregar directorio padre al path (por si acaso)
8- sys .path .insert (0 , os .path .abspath ('..' ))
17+ sys .path .insert (0 , os .path .abspath ('.' ))
18+
19+ currentdir = os .path .dirname (os .path .abspath (inspect .getfile (inspect .currentframe ())))
20+ parentdir = os .path .dirname (currentdir )
21+ sys .path .insert (0 , parentdir )
22+ import ad_api
23+
24+ # -- Project information -----------------------------------------------------
925
1026# -- Project information -----------------------------------------------------
1127project = 'Python Amazon Advertising API'
1531version = '0.7.4'
1632
1733# -- 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.
1838extensions = [
19- 'sphinx.ext.autodoc' ,
20- 'sphinx.ext.napoleon' ,
21- 'sphinx_rtd_theme' ,
22- ]
39+ "sphinx_rtd_theme" , 'button' , 'cookieconsent' ,
40+ 'sphinx.ext.autodoc' , 'sphinx.ext.coverage' , 'sphinx.ext.napoleon' ,
41+ 'enum_tools.autoenum' ,
2342
24- # MOCKEAR TODO - ENFOQUE RADICAL
25- autodoc_mock_imports = [
26- # Dependencias del sistema
27- 'requests' ,
28- 'six' ,
29- 'cachetools' ,
30- 'pycryptodome' ,
31- 'pytz' ,
32- 'confuse' ,
33- 'python-dotenv' ,
34- 'pyyaml' ,
35-
36- # Módulos del paquete - MOCKEAR TODO EL PAQUETE
37- 'ad_api' ,
38- 'ad_api.base' ,
39- 'ad_api.api' ,
40- 'ad_api.api.sp' ,
41- 'ad_api.api.sb' ,
42- 'ad_api.api.sd' ,
43- 'ad_api.api.dsp' ,
44- 'ad_api.auth' ,
4543]
4644
47- # Configuración AGRESIVA de autodoc
48- autodoc_default_options = {
49- 'members' : True ,
50- 'undoc-members' : True ,
51- 'private-members' : False ,
52- 'special-members' : '__init__' ,
53- 'inherited-members' : True ,
54- 'show-inheritance' : True ,
55- 'member-order' : 'bysource' ,
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 Selling Partner API with an easy-to-use interface.
71+ ''' ,
72+ 'donate_url' : 'https://github.com/sponsors/saleweaver' ,
73+ 'github_user' : 'saleweaver' ,
74+ 'github_repo' : 'python-amazon-sp-api' ,
75+ "github_type" : "star" , # watch|star|fork
76+ 'fixed_sidebar' : True
5677}
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' ]
5783
58- # CRÍTICO: Forzar que funcione incluso con módulos mockeados
59- autodoc_inherit_docstrings = True
60- autodoc_preserve_defaults = True
61- autodoc_typehints = 'none' # Simplificar
6284
63- # Napoleon para docstrings estilo Google
6485napoleon_google_docstring = True
6586napoleon_numpy_docstring = False
66- napoleon_include_init_with_doc = True
67- napoleon_include_private_with_doc = False
87+ napoleon_include_init_with_doc = False
88+ napoleon_include_private_with_doc = True
6889napoleon_include_special_with_doc = True
69-
70- templates_path = ['_templates' ]
71- exclude_patterns = ['_build' , 'Thumbs.db' , '.DS_Store' ]
72-
73- # -- Options for HTML output -------------------------------------------------
74- html_theme = 'sphinx_rtd_theme'
75- html_static_path = ['_static' ]
90+ napoleon_use_admonition_for_examples = True
91+ napoleon_use_admonition_for_notes = True
92+ napoleon_use_admonition_for_references = False
93+ napoleon_use_ivar = False
94+ napoleon_use_param = True
95+ napoleon_use_rtype = True
96+ napoleon_preprocess_types = False
97+ napoleon_type_aliases = None
98+ napoleon_attr_annotations = True
0 commit comments