Skip to content

Commit 3c4d291

Browse files
committed
clawdbot fix
1 parent 012403b commit 3c4d291

File tree

3 files changed

+89
-57
lines changed

3 files changed

+89
-57
lines changed

.readthedocs.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
# Read the Docs configuration file - CON INSTALACIÓN DEL PAQUETE
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
25
version: 2
36

7+
# Set the OS, Python version and other tools you might need
48
build:
59
os: ubuntu-22.04
610
tools:
711
python: "3.11"
812

13+
# Build documentation in the "docs/" directory with Sphinx
914
sphinx:
1015
configuration: docs/conf.py
1116

17+
# Optional but recommended, declare the Python requirements required
18+
# to build your documentation
19+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
1220
python:
1321
install:
14-
- requirements: docs/requirements.txt
15-
# INSTALAR EL PAQUETE - IMPORTANTE
16-
- method: pip
17-
path: .
22+
- requirements: docs/requirements.txt

docs/conf.py

Lines changed: 75 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
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

414
import os
515
import 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 -----------------------------------------------------
1127
project = 'Python Amazon Advertising API'
@@ -15,61 +31,68 @@
1531
version = '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.
1838
extensions = [
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
6485
napoleon_google_docstring = True
6586
napoleon_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
6889
napoleon_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

docs/requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
sphinx
33
sphinx_rtd_theme
44
sphinxcontrib-napoleon
5+
sphinx-jinja2-compat>=0.1.1
6+
sphinx-toolbox>=2.16.0
7+
enum-tools[sphinx]
8+
pydata-sphinx-theme
59

610
# Dependencias REALES del paquete (para que autodoc pueda importar)
711
requests>=2.27.1,<2.33.0

0 commit comments

Comments
 (0)