fix: add docs, tests; tweak some handler method signatures
This commit is contained in:
parent
e4a4e85cf6
commit
d11e186df9
16 changed files with 345 additions and 15 deletions
20
docs/Makefile
Normal file
20
docs/Makefile
Normal 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
0
docs/_static/.keepme
vendored
Normal file
6
docs/api/wutta_corepos.app.rst
Normal file
6
docs/api/wutta_corepos.app.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
``wutta_corepos.app``
|
||||
=====================
|
||||
|
||||
.. automodule:: wutta_corepos.app
|
||||
:members:
|
6
docs/api/wutta_corepos.conf.rst
Normal file
6
docs/api/wutta_corepos.conf.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
``wutta_corepos.conf``
|
||||
======================
|
||||
|
||||
.. automodule:: wutta_corepos.conf
|
||||
:members:
|
6
docs/api/wutta_corepos.handler.rst
Normal file
6
docs/api/wutta_corepos.handler.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
``wutta_corepos.handler``
|
||||
=========================
|
||||
|
||||
.. automodule:: wutta_corepos.handler
|
||||
:members:
|
6
docs/api/wutta_corepos.rst
Normal file
6
docs/api/wutta_corepos.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
``wutta_corepos``
|
||||
=================
|
||||
|
||||
.. automodule:: wutta_corepos
|
||||
:members:
|
38
docs/conf.py
Normal file
38
docs/conf.py
Normal file
|
@ -0,0 +1,38 @@
|
|||
# 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 = 'Wutta-COREPOS'
|
||||
copyright = '2025, Lance Edgar'
|
||||
author = 'Lance Edgar'
|
||||
release = get_version('Wutta-COREPOS')
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.todo',
|
||||
]
|
||||
|
||||
templates_path = ['_templates']
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
|
||||
intersphinx_mapping = {
|
||||
'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']
|
28
docs/index.rst
Normal file
28
docs/index.rst
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
Wutta-COREPOS
|
||||
=============
|
||||
|
||||
This package adds basic integration with `CORE-POS`_, using
|
||||
`pyCOREPOS`_.
|
||||
|
||||
Its main purpose is to setup DB connections for CORE Office.
|
||||
|
||||
.. _CORE-POS: https://www.core-pos.com/
|
||||
|
||||
.. _pyCOREPOS: https://pypi.org/project/pyCOREPOS/
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Documentation
|
||||
|
||||
narr/install
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: API
|
||||
|
||||
api/wutta_corepos
|
||||
api/wutta_corepos.app
|
||||
api/wutta_corepos.conf
|
||||
api/wutta_corepos.handler
|
35
docs/make.bat
Normal file
35
docs/make.bat
Normal 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
|
32
docs/narr/install.rst
Normal file
32
docs/narr/install.rst
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
Installation
|
||||
============
|
||||
|
||||
This assumes you already have a :doc:`WuttJamaican app
|
||||
<wuttjamaican:narr/install/index>` setup and working.
|
||||
|
||||
Install the Wutta-COREPOS package to your virtual environment:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
pip install Wutta-COREPOS
|
||||
|
||||
Edit your :term:`config file` to add CORE-POS DB connection info, and
|
||||
related settings. Note that so far, only CORE Office DB connections
|
||||
are supported.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[corepos]
|
||||
office.url = http://localhost/fannie/
|
||||
|
||||
[corepos.db.office_op]
|
||||
default.url = mysql+mysqlconnector://localhost/core_op
|
||||
|
||||
[corepos.db.office_trans]
|
||||
default.url = mysql+mysqlconnector://localhost/core_trans
|
||||
|
||||
[corepos.db.office_arch]
|
||||
default.url = mysql+mysqlconnector://localhost/trans_archive
|
||||
|
||||
And that's it, the CORE-POS integration is configured.
|
Loading…
Add table
Add a link
Reference in a new issue