Skip to content

Commit

Permalink
Merge pull request #193 from COS301-SE-2024/documention
Browse files Browse the repository at this point in the history
Documention
  • Loading branch information
ChuufMaster authored Aug 11, 2024
2 parents f5056ec + dfb874d commit ed937af
Show file tree
Hide file tree
Showing 10 changed files with 849 additions and 127 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
beakpeek/android/app/src/main/AndroidManifest.xml
BeakPeek/lib/config_azure.dart
beakpeek/android/app/src/main/AndroidManifest.xml
548 changes: 422 additions & 126 deletions doc/ArchDiagram/BeakPeekArchDiagram.drawio

Large diffs are not rendered by default.

Binary file added doc/Code_Qaulity/CodeQaulity.pdf
Binary file not shown.
103 changes: 103 additions & 0 deletions doc/Code_Qaulity/CodeQaulity.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
\documentclass{article}

\title{

\\
{Coding Standards}
}

\author{Millenium}

\begin{document}

\tableofcontents

\newpage

\section{Tools we Use}

\begin{itemize}
\item Linting through Flutter
\item Automated tests using GitHub actions
\item GitGaurdian for secret scanning
\item Codecov for code coverage
\item Unit testing using Flutters built in tools
\item Unit testing using XUnit with .Net
\end{itemize}

\section{File Structure}

BeakPeek is made using the MVC architecture as well as the domain driven design and for this reason on
top of that we use flutter for our frontend and .Net for our backend we have separated our files
into two directories those being `beakpeek` (due to how flutters project naming works) and `dotnet`
to make it descriptive of the software bein used. For these reasons all future sections will be refered
to under subsections for `Frontend` for all of the flutter related topics and `Backend` for all of the
dotnet related topics.

\subsection{Frontend}

For the `beakpeek` directory the only directories that are of importence are the `lib` and the `test`
directories.

\subsubsection{Lib}
The `lib` directory contains all of the actual logic and styling of the frontend this is also split up
int appropriate subdirectories. These being `Controller`, `Model` and `View` to match the MVC pattern.
There are other directories as well that have uses for styling.

\subsubsection{Test}

The `test` direcotry is for the unit tests that are written for testing the flutter frontend and logic.

\subsection{Backend}

For the `dotnet` directory this is split up into two direcoties, one for the actual logic of the api
this being called `BeakPeekApi` and then another for the unit tests of the api is this being called `BeakPeekApi.Tests`.

\subsubsection{BeakPeekApi}

This directory also follows the MVC pattern however it does not have any views so there are only directories for model and
controller.

\subsubsection{BeakPeekApi.Tests}

This direcotry mirrors the directory structure of BeakPeekApi exactly as for each file in BeakPeekApi there
is also a unit test.

\subsubsection{Entire Project}

The rest of the direcoties should be self explanatory however here is a quick rundown

\begin{itemize}
\item `doc` is for all documentation for this BeakPeek.
\item `res` is for all resources and contains all of the csv's needed to run the api and load all of the birds
\item `scripts` is for any scripts that are used for automation.
\end{itemize}

\section{Formatting}

\subsection{Frontend}

For formatting we use the built in tools and linting that flutter provides and is enforced by the flutter language server
which we all use either through vscode or through neovim.

\subsection{Backend}

For formatting the backend we use the omnisharp C-sharp langauge server which has its own linting rules that are enforced on save
either in vscode or in neovim.

\section{Unit Testing}

To ensure that all of our code is of a good standard and to make the development cycle faster we use unit tests written
in either flutter or dotnet C-sharp. We aim for atleast a 70-80 percent coverage for the code.

\section{Pull Request Restrictions}

To ensure that the our code standards are maintained we have set up branch rules and pull request rules. The branch rules
are that only the DevOps engineer is able to push to the main branch and that any pull requests into the main branch require
atleast one approval from someone else to push it.

To ensure that all pull requests adhere to our standards we have made it so that only the DevOps engineer should be allowed to
approve pull requests into or from development and also for any pull requests into or from main. Any pull requests going into
main have to first pass all workflows and tests.

\end{document}
94 changes: 94 additions & 0 deletions doc/DatabaseERD/databaseRedesignSketch.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" version="24.7.6">
<diagram id="R2lEEEUBdFMjLlhIrx00" name="Page-1">
<mxGraphModel dx="2314" dy="1132" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0" extFonts="Permanent Marker^https://fonts.googleapis.com/css?family=Permanent+Marker">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="2KK8d0N5JN4w3DFjjBSp-1" value="Species_List" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="600" y="220" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-2" value="Province_Table" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="160" y="220" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-3" value="Pentad_Table" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="160" y="490" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-4" value="Ind_Bird_table" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="600" y="490" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-5" value="Total Area" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="390" y="60" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-6" value="All same - Adhoc" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="740" y="160" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-7" value="Ref from Species_list" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="600" y="420" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-9" value="Pentad_ID" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="780" y="560" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-10" value="MRR" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="660" y="610" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-11" value="TRR" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="520" y="610" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-12" value="Bird Ref" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="30" y="560" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-13" value="MRR" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="170" y="590" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-14" value="TRR" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="305" y="590" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-15" value="Province_ID" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="790" y="460" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-16" value="Pentad_ID" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="10" y="280" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-17" value="Total_Cards" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="140" y="300" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-18" value="Pentad_ID" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="160" y="430" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-19" value="" style="endArrow=classic;html=1;rounded=0;exitX=1.028;exitY=0.4;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="2KK8d0N5JN4w3DFjjBSp-3" target="2KK8d0N5JN4w3DFjjBSp-1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="500" as="sourcePoint" />
<mxPoint x="450" y="450" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-20" value="" style="endArrow=classic;html=1;rounded=0;entryX=1;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="2KK8d0N5JN4w3DFjjBSp-2">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="600" y="525" as="sourcePoint" />
<mxPoint x="650" y="475" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-21" value="" style="endArrow=classic;html=1;rounded=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="2KK8d0N5JN4w3DFjjBSp-4" target="2KK8d0N5JN4w3DFjjBSp-3">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="500" as="sourcePoint" />
<mxPoint x="450" y="450" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-22" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="2KK8d0N5JN4w3DFjjBSp-1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="720" y="490" as="sourcePoint" />
<mxPoint x="770" y="440" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-23" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="2KK8d0N5JN4w3DFjjBSp-16">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="220" y="430" as="sourcePoint" />
<mxPoint x="270" y="380" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="2KK8d0N5JN4w3DFjjBSp-27" value="province list" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="150" y="90" width="120" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Loading

0 comments on commit ed937af

Please sign in to comment.