Preparar para publicar en Read the Docs

Signed-off-by: Edgar Alvarado Taleno <edgar.alvaradotaleno@ucr.ac.cr>
This commit is contained in:
Edgar Alvarado Taleno 2025-04-10 15:52:02 -06:00
parent b78b5a210b
commit 77f3f78332
190 changed files with 48425 additions and 102 deletions

View file

@ -5,7 +5,7 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
SOURCEDIR = source
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -1,101 +0,0 @@
import packaging.version
from pallets_sphinx_themes import get_version
from pallets_sphinx_themes import ProjectLink
# Project --------------------------------------------------------------
project = "Flask"
copyright = "2010 Pallets"
author = "Pallets"
release, version = get_version("Flask")
# General --------------------------------------------------------------
default_role = "code"
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinxcontrib.log_cabinet",
"sphinx_tabs.tabs",
"pallets_sphinx_themes",
]
autodoc_member_order = "bysource"
autodoc_typehints = "description"
autodoc_preserve_defaults = True
extlinks = {
"issue": ("https://github.com/pallets/flask/issues/%s", "#%s"),
"pr": ("https://github.com/pallets/flask/pull/%s", "#%s"),
"ghsa": ("https://github.com/pallets/flask/security/advisories/GHSA-%s", "GHSA-%s"),
}
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"werkzeug": ("https://werkzeug.palletsprojects.com/", None),
"click": ("https://click.palletsprojects.com/", None),
"jinja": ("https://jinja.palletsprojects.com/", None),
"itsdangerous": ("https://itsdangerous.palletsprojects.com/", None),
"sqlalchemy": ("https://docs.sqlalchemy.org/", None),
"wtforms": ("https://wtforms.readthedocs.io/", None),
"blinker": ("https://blinker.readthedocs.io/", None),
}
# HTML -----------------------------------------------------------------
html_theme = "flask"
html_theme_options = {"index_sidebar_logo": False}
html_context = {
"project_links": [
ProjectLink("Donate", "https://palletsprojects.com/donate"),
ProjectLink("PyPI Releases", "https://pypi.org/project/Flask/"),
ProjectLink("Source Code", "https://github.com/pallets/flask/"),
ProjectLink("Issue Tracker", "https://github.com/pallets/flask/issues/"),
ProjectLink("Chat", "https://discord.gg/pallets"),
]
}
html_sidebars = {
"index": ["project.html", "localtoc.html", "searchbox.html", "ethicalads.html"],
"**": ["localtoc.html", "relations.html", "searchbox.html", "ethicalads.html"],
}
singlehtml_sidebars = {"index": ["project.html", "localtoc.html", "ethicalads.html"]}
html_static_path = ["_static"]
html_favicon = "_static/shortcut-icon.png"
html_logo = "_static/flask-vertical.png"
html_title = f"Flask Documentation ({version})"
html_show_sourcelink = False
gettext_uuid = True
gettext_compact = False
# Local Extensions -----------------------------------------------------
def github_link(name, rawtext, text, lineno, inliner, options=None, content=None):
app = inliner.document.settings.env.app
release = app.config.release
base_url = "https://github.com/pallets/flask/tree/"
if text.endswith(">"):
words, text = text[:-1].rsplit("<", 1)
words = words.strip()
else:
words = None
if packaging.version.parse(release).is_devrelease:
url = f"{base_url}main/{text}"
else:
url = f"{base_url}{release}/{text}"
if words is None:
words = url
from docutils.nodes import reference
from docutils.parsers.rst.roles import set_classes
options = options or {}
set_classes(options)
node = reference(rawtext, words, refuri=url, **options)
return [node], []
def setup(app):
app.add_role("gh", github_link)

View file

@ -1,88 +0,0 @@
.. rst-class:: hide-header
Welcome to Flask
================
.. image:: _static/flask-horizontal.png
:align: center
Welcome to Flask's documentation. Flask is a lightweight WSGI web application framework.
It is designed to make getting started quick and easy, with the ability to scale up to
complex applications.
Get started with :doc:`installation`
and then get an overview with the :doc:`quickstart`. There is also a
more detailed :doc:`tutorial/index` that shows how to create a small but
complete application with Flask. Common patterns are described in the
:doc:`patterns/index` section. The rest of the docs describe each
component of Flask in detail, with a full reference in the :doc:`api`
section.
Flask depends on the `Werkzeug`_ WSGI toolkit, the `Jinja`_ template engine, and the
`Click`_ CLI toolkit. Be sure to check their documentation as well as Flask's when
looking for information.
.. _Werkzeug: https://werkzeug.palletsprojects.com
.. _Jinja: https://jinja.palletsprojects.com
.. _Click: https://click.palletsprojects.com
User's Guide
------------
Flask provides configuration and conventions, with sensible defaults, to get started.
This section of the documentation explains the different parts of the Flask framework
and how they can be used, customized, and extended. Beyond Flask itself, look for
community-maintained extensions to add even more functionality.
.. toctree::
:maxdepth: 2
installation
quickstart
tutorial/index
templating
testing
errorhandling
debugging
logging
config
signals
views
lifecycle
appcontext
reqcontext
blueprints
extensions
cli
server
shell
patterns/index
web-security
deploying/index
async-await
API Reference
-------------
If you are looking for information on a specific function, class or
method, this part of the documentation is for you.
.. toctree::
:maxdepth: 2
api
Additional Notes
----------------
.. toctree::
:maxdepth: 2
design
extensiondev
contributing
license
changes

3
docs/requirements.txt Normal file
View file

@ -0,0 +1,3 @@
sphinx
sphinx-rtd-theme
myst-parser

37
docs/source/conf.py Normal file
View file

@ -0,0 +1,37 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import os
import sys
sys.path.insert(0, os.path.abspath('../../src'))
project = 'Flask'
copyright = '2025, Pallets Team'
author = 'Pallets Team'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
'sphinx.ext.autodoc', # Para generar doc automáticamente desde los docstrings
'sphinx.ext.napoleon', # Para soportar docstrings estilo Google/NumPy
'sphinx.ext.todo', # Para mostrar TODOs
]
templates_path = ['_templates']
exclude_patterns = []
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
todo_include_todos = True

View file

@ -0,0 +1,29 @@
flask.json package
==================
Submodules
----------
flask.json.provider module
--------------------------
.. automodule:: flask.json.provider
:members:
:undoc-members:
:show-inheritance:
flask.json.tag module
---------------------
.. automodule:: flask.json.tag
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: flask.json
:members:
:undoc-members:
:show-inheritance:

149
docs/source/flask.rst Normal file
View file

@ -0,0 +1,149 @@
flask package
=============
Subpackages
-----------
.. toctree::
:maxdepth: 4
flask.json
Submodules
----------
flask.app module
----------------
.. automodule:: flask.app
:members:
:undoc-members:
:show-inheritance:
flask.blueprints module
-----------------------
.. automodule:: flask.blueprints
:members:
:undoc-members:
:show-inheritance:
flask.cli module
----------------
.. automodule:: flask.cli
:members:
:undoc-members:
:show-inheritance:
flask.config module
-------------------
.. automodule:: flask.config
:members:
:undoc-members:
:show-inheritance:
flask.ctx module
----------------
.. automodule:: flask.ctx
:members:
:undoc-members:
:show-inheritance:
flask.debughelpers module
-------------------------
.. automodule:: flask.debughelpers
:members:
:undoc-members:
:show-inheritance:
flask.globals module
--------------------
.. automodule:: flask.globals
:members:
:undoc-members:
:show-inheritance:
flask.helpers module
--------------------
.. automodule:: flask.helpers
:members:
:undoc-members:
:show-inheritance:
flask.logging module
--------------------
.. automodule:: flask.logging
:members:
:undoc-members:
:show-inheritance:
flask.sessions module
---------------------
.. automodule:: flask.sessions
:members:
:undoc-members:
:show-inheritance:
flask.signals module
--------------------
.. automodule:: flask.signals
:members:
:undoc-members:
:show-inheritance:
flask.templating module
-----------------------
.. automodule:: flask.templating
:members:
:undoc-members:
:show-inheritance:
flask.testing module
--------------------
.. automodule:: flask.testing
:members:
:undoc-members:
:show-inheritance:
flask.typing module
-------------------
.. automodule:: flask.typing
:members:
:undoc-members:
:show-inheritance:
flask.views module
------------------
.. automodule:: flask.views
:members:
:undoc-members:
:show-inheritance:
flask.wrappers module
---------------------
.. automodule:: flask.wrappers
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: flask
:members:
:undoc-members:
:show-inheritance:

13
docs/source/index.rst Normal file
View file

@ -0,0 +1,13 @@
.. Flask documentation master file, created by
sphinx-quickstart on Thu Apr 10 15:29:04 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Flask documentation
===================
.. toctree::
:maxdepth: 2
:caption: Contents:
modules

7
docs/source/modules.rst Normal file
View file

@ -0,0 +1,7 @@
flask
=====
.. toctree::
:maxdepth: 4
flask