3
0
Fork 0

feat: basic support for WSGI app, views, templates

also docs + tests for what we have so far
This commit is contained in:
Lance Edgar 2024-07-12 00:17:15 -05:00
commit 977c196f47
49 changed files with 2805 additions and 0 deletions

20
docs/Makefile Normal file
View file

@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

0
docs/_static/.keepme vendored Normal file
View file

10
docs/api/index.rst Normal file
View file

@ -0,0 +1,10 @@
Package API
===========
This is the "raw" API documentation for the ``wuttaweb`` package.
.. toctree::
:maxdepth: 2
wuttaweb/index

View file

@ -0,0 +1,6 @@
``wuttaweb.app``
================
.. automodule:: wuttaweb.app
:members:

View file

@ -0,0 +1,6 @@
``wuttaweb.helpers``
====================
.. automodule:: wuttaweb.helpers
:members:

View file

@ -0,0 +1,17 @@
``wuttaweb``
============
.. automodule:: wuttaweb
.. toctree::
:maxdepth: 1
app
helpers
static
subscribers
util
views
views.base
views.common

View file

@ -0,0 +1,6 @@
``wuttaweb.static``
===================
.. automodule:: wuttaweb.static
:members:

View file

@ -0,0 +1,6 @@
``wuttaweb.subscribers``
========================
.. automodule:: wuttaweb.subscribers
:members:

View file

@ -0,0 +1,6 @@
``wuttaweb.util``
=================
.. automodule:: wuttaweb.util
:members:

View file

@ -0,0 +1,6 @@
``wuttaweb.views.base``
=======================
.. automodule:: wuttaweb.views.base
:members:

View file

@ -0,0 +1,6 @@
``wuttaweb.views.common``
=========================
.. automodule:: wuttaweb.views.common
:members:

View file

@ -0,0 +1,6 @@
``wuttaweb.views``
==================
.. automodule:: wuttaweb.views
:members:

40
docs/conf.py Normal file
View file

@ -0,0 +1,40 @@
# 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
from importlib.metadata import version as get_version
project = 'WuttaWeb'
copyright = '2024, Lance Edgar'
author = 'Lance Edgar'
release = get_version('WuttaWeb')
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
]
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
intersphinx_mapping = {
'pyramid': ('https://docs.pylonsproject.org/projects/pyramid/en/latest/', None),
'python': ('https://docs.python.org/3/', None),
'webhelpers2': ('https://webhelpers2.readthedocs.io/en/latest/', None),
'wuttjamaican': ('https://rattailproject.org/docs/wuttjamaican/', None),
}
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'furo'
html_static_path = ['_static']

10
docs/glossary.rst Normal file
View file

@ -0,0 +1,10 @@
.. _glossary:
Glossary
========
.. glossary::
:sorted:
view
TODO

23
docs/index.rst Normal file
View file

@ -0,0 +1,23 @@
WuttaWeb
========
This package provides a "web layer" for custom apps.
It uses traditional server-side rendering with VueJS on the front-end.
.. toctree::
:maxdepth: 3
:caption: Contents:
glossary
narr/index
api/index
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

35
docs/make.bat Normal file
View file

@ -0,0 +1,35 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd

16
docs/narr/index.rst Normal file
View file

@ -0,0 +1,16 @@
Documentation
=============
TODO
..
.. toctree::
:maxdepth: 2
install/index
config/index
cli/index
handlers/index
providers/index
db/index