diff --git a/docs/source/conf.py b/docs/source/conf.py index 38af583cffad5bb6cc39c40f8c68f91a06da1544..b0bdf7d4ebe1f4c38003ea5c5e81fb3a31f77e0f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -10,9 +10,9 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # +from datetime import datetime import os import sys - import django sys.path.insert(0, os.path.abspath("../../")) @@ -22,8 +22,8 @@ django.setup() # -- Project information ----------------------------------------------------- project = "Sage Validation" -copyright = "2024, GÉANT" -author = "GÉANT" +copyright = f"{datetime.now().year}, GÉANT" +author = 'swd@geant.org' # The full version, including alpha/beta/rc tags release = "0.1" @@ -38,11 +38,19 @@ extensions = [ "sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx_autodoc_typehints", + "sphinxcontrib.plantuml", ] +# tags is injected by sphinx into conf.py +# toggle this by running ``sphinx-build -t drawio`` +if tags.has("drawio"): # noqa F821 + extensions.append("sphinxcontrib.drawio") + # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] +plantuml = f'java -jar {os.path.expanduser("~/bin/plantuml.jar")}' + # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. @@ -54,7 +62,7 @@ exclude_patterns = [] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "alabaster" +html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/docs/source/design.drawio b/docs/source/design.drawio new file mode 100644 index 0000000000000000000000000000000000000000..2f60bb85316571ab48f0192b7079e0c32c57148b --- /dev/null +++ b/docs/source/design.drawio @@ -0,0 +1,193 @@ +<mxfile host="Electron" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.0.9 Chrome/128.0.6613.186 Electron/32.2.5 Safari/537.36" version="26.0.9"> + <diagram name="rough-components" id="2wKz08ucE9ZSfC6cHHmf"> + <mxGraphModel dx="1841" dy="664" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"> + <root> + <mxCell id="0" /> + <mxCell id="1" parent="0" /> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-1" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;dashed=1;" vertex="1" parent="1"> + <mxGeometry x="-110" y="390" width="170" height="130" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-2" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;dashed=1;" vertex="1" parent="1"> + <mxGeometry x="-280" y="30" width="220" height="330" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-3" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;dashed=1;" vertex="1" parent="1"> + <mxGeometry x="240" y="390" width="250" height="100" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-4" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;dashed=1;" vertex="1" parent="1"> + <mxGeometry x="310" y="10" width="300" height="330" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;strokeColor=default;strokeWidth=3;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-17" target="Vhyd4QMVW4GItpBF_Vwm-14"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-6" value="validations<div><b>(FINSUP-6)</b></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1"> + <mxGeometry x="60" y="147.5" width="90" height="65" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-7" value="MEO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1"> + <mxGeometry x="-480" y="65" width="70" height="60" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-8" value="Finance<div>Team</div><div>Member</div>" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1"> + <mxGeometry x="-200" y="250" width="30" height="50" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-9" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-24"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="45" y="190" as="sourcePoint" /> + <mxPoint x="60" y="180" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-10" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-20" target="Vhyd4QMVW4GItpBF_Vwm-15"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="280" y="70" as="sourcePoint" /> + <mxPoint x="400" y="140" as="targetPoint" /> + <Array as="points"> + <mxPoint x="415" y="179" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-11" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-20" target="Vhyd4QMVW4GItpBF_Vwm-17"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="290" y="110" as="sourcePoint" /> + <mxPoint x="415" y="249.69000000000005" as="targetPoint" /> + <Array as="points"> + <mxPoint x="415" y="179" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-12" value="<b>FINSUP-4</b>" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="490" y="10" width="90" height="35" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-13" value="" style="endArrow=none;html=1;rounded=0;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;endFill=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-6" target="Vhyd4QMVW4GItpBF_Vwm-3"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="200" y="230" as="sourcePoint" /> + <mxPoint x="200" y="400" as="targetPoint" /> + <Array as="points"> + <mxPoint x="130" y="440" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-14" value="<div><font color="#80ff00">Sage DB</font></div>" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#000A00;strokeColor=#66CC00;" vertex="1" parent="1"> + <mxGeometry x="375" y="415" width="80" height="60" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-15" value="fileserver" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1"> + <mxGeometry x="380" y="40" width="70" height="60" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-16" value="<div>other db's or</div><div>sources?</div>" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1"> + <mxGeometry x="260" y="415" width="80" height="60" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-17" value="" style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/png,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;" vertex="1" parent="1"> + <mxGeometry x="380" y="250" width="70" height="65.89" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-18" value="<span style="font-size: 10px;"><i>direct Sage API?</i></span>" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="420" y="200" width="70" height="30" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-19" value="<i><font style="font-size: 10px;">saved to shared folder?</font></i>" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="420" y="125" width="70" height="30" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-20" value="validated<div>sage input</div><div>doc</div>" style="whiteSpace=wrap;html=1;shape=mxgraph.basic.document" vertex="1" parent="1"> + <mxGeometry x="190" y="150" width="70" height="60" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-21" value="<b>FINSUP-3</b>" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="-150" y="30" width="90" height="35" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-22" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-7" target="Vhyd4QMVW4GItpBF_Vwm-25"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="-140" y="100" as="sourcePoint" /> + <mxPoint x="-360" y="95" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-23" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-8" target="Vhyd4QMVW4GItpBF_Vwm-24"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="-100" y="241" as="sourcePoint" /> + <mxPoint x="20" y="260" as="targetPoint" /> + <Array as="points"> + <mxPoint x="-185" y="180" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-24" value="input<div>doc</div>" style="whiteSpace=wrap;html=1;shape=mxgraph.basic.document" vertex="1" parent="1"> + <mxGeometry x="-20" y="150" width="45" height="60" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-25" value="meo<div>output<div>doc</div></div>" style="whiteSpace=wrap;html=1;shape=mxgraph.basic.document" vertex="1" parent="1"> + <mxGeometry x="-360" y="65" width="42.5" height="60" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-26" value="... or<div>something</div><div>else?</div>" style="whiteSpace=wrap;html=1;shape=mxgraph.basic.document" vertex="1" parent="1"> + <mxGeometry x="530" y="65" width="70" height="60" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-27" value="" style="endArrow=none;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.85;entryDx=0;entryDy=0;entryPerimeter=0;endFill=0;dashed=1;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-19" target="Vhyd4QMVW4GItpBF_Vwm-26"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="480" y="200" as="sourcePoint" /> + <mxPoint x="530" y="150" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-28" value="" style="endArrow=none;html=1;rounded=0;exitX=0.75;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.85;entryDx=0;entryDy=0;entryPerimeter=0;endFill=0;dashed=1;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-18"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="500" y="150" as="sourcePoint" /> + <mxPoint x="540" y="126" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-29" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-6" target="Vhyd4QMVW4GItpBF_Vwm-20"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="150" y="185" as="sourcePoint" /> + <mxPoint x="72" y="189" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-30" value="fileserver" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1"> + <mxGeometry x="-220" y="65" width="70" height="60" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-31" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-25" target="Vhyd4QMVW4GItpBF_Vwm-30"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="-320" y="100" as="sourcePoint" /> + <mxPoint x="-350" y="105" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-32" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-30" target="Vhyd4QMVW4GItpBF_Vwm-24"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="-165" y="260" as="sourcePoint" /> + <mxPoint x="-10" y="190" as="targetPoint" /> + <Array as="points"> + <mxPoint x="-185" y="180" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-33" value="<i><font style="font-size: 10px;">polll shared</font></i><div style="text-align: right;"><i><font style="font-size: 10px;">folder?</font></i></div>" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="-250" y="130" width="70" height="30" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-34" value="<div><span style="font-size: 10px;"><i>drag-and-drop?</i></span></div>" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="-260" y="220" width="90" height="20" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-35" value="db credentials,<div>access info,&nbsp;<span style="background-color: initial;">etc</span></div><div><b>(FINSUP-7</b>)</div>" style="whiteSpace=wrap;html=1;shape=mxgraph.basic.document;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1"> + <mxGeometry x="160" y="310" width="90" height="59.69" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-36" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;dashed=1;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-35"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="50" y="270" as="sourcePoint" /> + <mxPoint x="160" y="440" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-37" value="invalid doc<div>and/or</div><div>error message?</div>" style="whiteSpace=wrap;html=1;shape=mxgraph.basic.document" vertex="1" parent="1"> + <mxGeometry x="-75" y="435" width="100" height="60" as="geometry" /> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-38" value="" style="endArrow=classic;html=1;rounded=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-6" target="Vhyd4QMVW4GItpBF_Vwm-1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="-90" y="360" as="sourcePoint" /> + <mxPoint x="-40" y="310" as="targetPoint" /> + <Array as="points"> + <mxPoint x="105" y="455" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-39" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="Vhyd4QMVW4GItpBF_Vwm-1" target="Vhyd4QMVW4GItpBF_Vwm-2"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="115" y="223" as="sourcePoint" /> + <mxPoint x="70" y="465" as="targetPoint" /> + <Array as="points"> + <mxPoint x="-170" y="455" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="Vhyd4QMVW4GItpBF_Vwm-40" value="<b>FINSUP-5</b>" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="-70" y="400" width="90" height="35" as="geometry" /> + </mxCell> + </root> + </mxGraphModel> + </diagram> +</mxfile> diff --git a/docs/source/design.rst b/docs/source/design.rst new file mode 100644 index 0000000000000000000000000000000000000000..315f5ea6443530bb09e77e0d92ab29dd3aca62bb --- /dev/null +++ b/docs/source/design.rst @@ -0,0 +1,12 @@ +==================================== +Design Notes +=========================================== + + +Rough Component Flow +------------------------- + +.. only:: drawio + + .. drawio-image:: design.drawio + :page-name: rough-components \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index a050f1caa539762e6b3e00d3a3a887b0c9efdc0d..7fbed918fc7de196e9ead5887206cf41949add9b 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -11,4 +11,5 @@ Welcome to Sage Validation's documentation! :caption: Contents: validations - file_validator/index \ No newline at end of file + file_validator/index + design \ No newline at end of file diff --git a/docs/source/validations.rst b/docs/source/validations.rst index 5f2042ced17773463685c99c6ca99a4beaafc69b..86c40639f5b9579a1372f0a8a6270bb3cfd5f36d 100644 --- a/docs/source/validations.rst +++ b/docs/source/validations.rst @@ -12,56 +12,47 @@ The following table describes the validation rules applied when uploading a CSV - **Field** - **Logic** - **Comments** - * - Structural - *(All Fields)* - Ensure that all required field names are present. - - - + - * - Update - - `...NominalAccountNumber` (*n) + - `...NominalAccountNumber` (*n*) - If value starts with `xx-`, map `NominalCostCentre` using `dbo.meoCostCentres` and retrieve `NominalAccountNumber` from `dbo.vw_xx-data`. - Ensure the correct nominal code is assigned. - * - Checks - AccountNumber - Validate against `dbo.meoValidSuppliers`. - Ensure the account exists in the valid suppliers list. - * - Checks - Source - Should always be `80`. - Reject rows where `Source != 80`. - * - Checks - SYSTraderTranType - Should always be `4`. - Reject rows where `SYSTraderTranType != 4`. - * - Update - TransactionDate - Set to today’s date (`dd/mm/yyyy`). - Ensure all rows have a consistent transaction date. - * - Checks - - `...NominalAccountNumber` (*n) + - `...NominalAccountNumber` (*n*) - Validate against `[Nom]` in `dbo.meoNominal`. - Ensure all nominal account numbers exist. - * - Checks - - `...NominalCostCentre` (*n) + - `...NominalCostCentre` (*n*) - Validate against `dbo.meoCostCentres`. - Ensure cost centres exist. - * - Checks - Combination of `...NominalAccountNumber`, `...NominalCostCentre`, and `...NominalDepartment` - Validate against `dbo.meoValidSageAccounts`. - The combination of the three fields must be valid. - * - Checks - `...TaxRate` - Validate against `[Tax code]` in `dbo.meoValidVAT`. - Ensure valid tax rates. - - * - Checks - - `ChequeCurrencyName`, `ChequeToBankExchangeRate`, `ChequeValueInChequeCurrency` - - Cheque fields must be empty. \ No newline at end of file + * - Checks + - `ChequeCurrencyName`, `ChequeToBankExchangeRate`, `ChequeValueInChequeCurrency` + - Cheque fields must be empty. + - diff --git a/requirements.txt b/requirements.txt index a1b9380c20310dd608358bc08ff1c634d5cc92c9..4d7863fa8dc1f27589745741857ff0dd48f6bd17 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,20 @@ Django>=5.0,<5.1 djangorestframework==3.15.2 +mssql-django +social-auth-app-django==5.4.3 +psycopg[binary,pool] + ruff mypy tox -sphinx -sphinx-autodoc-typehints -mssql-django +coverage +faker + pytest pytest-django pytest-mock -faker -coverage -social-auth-app-django==5.4.3 -psycopg[binary,pool] \ No newline at end of file + +sphinx +sphinx-rtd-theme +sphinxcontrib-plantuml +sphinxcontrib-drawio diff --git a/tox.ini b/tox.ini index 1db7951f22971976c85cee2b4ecf9259839e4724..95ffe2cfbd496086eaec92747734492c891259b9 100644 --- a/tox.ini +++ b/tox.ini @@ -18,4 +18,4 @@ commands = coverage report --fail-under=90 coverage xml coverage html - + sphinx-build -b html docs/source docs/build