This repository has been archived by the owner on Jan 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add infrastructure doc * add initial usage doc * fully (almost) document repositories and controllers * start readthedocs.org integration
- Loading branch information
Showing
62 changed files
with
16,996 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 6107c1a220ad21e8aaa1e8bc5c9b0f9d | ||
config: c8a4da0d08d0c500e60c29330945b947 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.. _infrastructure: | ||
|
||
The Sheriff Infrastructure | ||
========================== | ||
.. module:: thesheriff.infrastructure | ||
|
||
This part of the documentation covers all interfaces on | ||
thesheriff.infrastructure module. | ||
|
||
Controllers | ||
----------- | ||
|
||
.. _gang_controller: | ||
.. automodule:: thesheriff.infrastructure.controllers.gang_controller | ||
:members: | ||
.. _outlaw_controller: | ||
.. automodule:: thesheriff.infrastructure.controllers.outlaw_controller | ||
:members: | ||
.. _raid_controller: | ||
.. automodule:: thesheriff.infrastructure.controllers.raid_controller | ||
:members: | ||
|
||
Repositories | ||
------------ | ||
|
||
.. _mysql_gang_repository: | ||
.. module:: thesheriff.infrastructure.repository.mysql_gang_repository | ||
.. autoclass:: MySQLGangRepository | ||
:members: | ||
.. _mysql_outlaw_repository: | ||
.. module:: thesheriff.infrastructure.repository.mysql_outlaw_repository | ||
.. autoclass:: MySQLOutlawRepository | ||
:members: | ||
.. _mysql_raid_repository: | ||
.. module:: thesheriff.infrastructure.repository.mysql_raid_repository | ||
.. autoclass:: MySQLRaidRepository | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
The Sheriff Usage | ||
================= | ||
|
||
The project includes a *Makefile* with the following targets: | ||
|
||
- **run**: cleans previously built images and runs the stack, | ||
the application and the DB. | ||
- **lint**: runs *pycodestyle* over the *thesheriff* directory | ||
and reports any linting problems on the code. | ||
- **tests**: runs *pytest* and reports the results | ||
of the unit tests. | ||
|
||
Runtime Requirements | ||
-------------------- | ||
|
||
To run and validate the application locally, the following tools are required: | ||
|
||
- `Docker Compose <https://docs.docker.com/compose/>`_ | ||
- `Curl <https://curl.haxx.se/>`_ | ||
|
||
Validating use cases | ||
-------------------- | ||
|
||
- Start the stack | ||
|
||
.. code-block:: console | ||
$ make run | ||
- Create an Outlaw | ||
|
||
.. code-block:: console | ||
$ curl localhost:5000/api/v1/outlaw/ -X POST \ | ||
--data @examples/json/create_outlaw.json \ | ||
-H 'Content-Type: application/json' | ||
{"message":"Outlaw added successfully","status":201} | ||
Development Requirements | ||
------------------------ | ||
|
||
To hack on the application, the following tools are required: | ||
|
||
- `Python >= 3.8 <https://www.python.org>`_ | ||
- `pipenv <https://pipenv.readthedocs.io/en/latest/>`_ | ||
- `GNU make <https://www.gnu.org/software/make/>`_ | ||
- `Git <https://git-scm.com/>`_ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,69 @@ | ||
.highlight .hll { background-color: #ffffcc } | ||
.highlight { background: #f8f8f8; } | ||
.highlight .c { color: #8f5902; font-style: italic } /* Comment */ | ||
.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ | ||
.highlight .g { color: #000000 } /* Generic */ | ||
.highlight .k { color: #004461; font-weight: bold } /* Keyword */ | ||
.highlight .l { color: #000000 } /* Literal */ | ||
.highlight .n { color: #000000 } /* Name */ | ||
.highlight .o { color: #582800 } /* Operator */ | ||
.highlight .x { color: #000000 } /* Other */ | ||
.highlight .p { color: #000000; font-weight: bold } /* Punctuation */ | ||
.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ | ||
.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ | ||
.highlight .cp { color: #8f5902 } /* Comment.Preproc */ | ||
.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ | ||
.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ | ||
.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ | ||
.highlight .gd { color: #a40000 } /* Generic.Deleted */ | ||
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ | ||
.highlight .gr { color: #ef2929 } /* Generic.Error */ | ||
.highlight { background: #eeffcc; } | ||
.highlight .c { color: #408090; font-style: italic } /* Comment */ | ||
.highlight .err { border: 1px solid #FF0000 } /* Error */ | ||
.highlight .k { color: #007020; font-weight: bold } /* Keyword */ | ||
.highlight .o { color: #666666 } /* Operator */ | ||
.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ | ||
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ | ||
.highlight .cp { color: #007020 } /* Comment.Preproc */ | ||
.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ | ||
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ | ||
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ | ||
.highlight .gd { color: #A00000 } /* Generic.Deleted */ | ||
.highlight .ge { font-style: italic } /* Generic.Emph */ | ||
.highlight .gr { color: #FF0000 } /* Generic.Error */ | ||
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ | ||
.highlight .gi { color: #00A000 } /* Generic.Inserted */ | ||
.highlight .go { color: #888888 } /* Generic.Output */ | ||
.highlight .gp { color: #745334 } /* Generic.Prompt */ | ||
.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ | ||
.highlight .go { color: #333333 } /* Generic.Output */ | ||
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ | ||
.highlight .gs { font-weight: bold } /* Generic.Strong */ | ||
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ | ||
.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ | ||
.highlight .kc { color: #004461; font-weight: bold } /* Keyword.Constant */ | ||
.highlight .kd { color: #004461; font-weight: bold } /* Keyword.Declaration */ | ||
.highlight .kn { color: #004461; font-weight: bold } /* Keyword.Namespace */ | ||
.highlight .kp { color: #004461; font-weight: bold } /* Keyword.Pseudo */ | ||
.highlight .kr { color: #004461; font-weight: bold } /* Keyword.Reserved */ | ||
.highlight .kt { color: #004461; font-weight: bold } /* Keyword.Type */ | ||
.highlight .ld { color: #000000 } /* Literal.Date */ | ||
.highlight .m { color: #990000 } /* Literal.Number */ | ||
.highlight .s { color: #4e9a06 } /* Literal.String */ | ||
.highlight .na { color: #c4a000 } /* Name.Attribute */ | ||
.highlight .nb { color: #004461 } /* Name.Builtin */ | ||
.highlight .nc { color: #000000 } /* Name.Class */ | ||
.highlight .no { color: #000000 } /* Name.Constant */ | ||
.highlight .nd { color: #888888 } /* Name.Decorator */ | ||
.highlight .ni { color: #ce5c00 } /* Name.Entity */ | ||
.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ | ||
.highlight .nf { color: #000000 } /* Name.Function */ | ||
.highlight .nl { color: #f57900 } /* Name.Label */ | ||
.highlight .nn { color: #000000 } /* Name.Namespace */ | ||
.highlight .nx { color: #000000 } /* Name.Other */ | ||
.highlight .py { color: #000000 } /* Name.Property */ | ||
.highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */ | ||
.highlight .nv { color: #000000 } /* Name.Variable */ | ||
.highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */ | ||
.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ | ||
.highlight .mb { color: #990000 } /* Literal.Number.Bin */ | ||
.highlight .mf { color: #990000 } /* Literal.Number.Float */ | ||
.highlight .mh { color: #990000 } /* Literal.Number.Hex */ | ||
.highlight .mi { color: #990000 } /* Literal.Number.Integer */ | ||
.highlight .mo { color: #990000 } /* Literal.Number.Oct */ | ||
.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ | ||
.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ | ||
.highlight .sc { color: #4e9a06 } /* Literal.String.Char */ | ||
.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ | ||
.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ | ||
.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ | ||
.highlight .se { color: #4e9a06 } /* Literal.String.Escape */ | ||
.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ | ||
.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ | ||
.highlight .sx { color: #4e9a06 } /* Literal.String.Other */ | ||
.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ | ||
.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ | ||
.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ | ||
.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ | ||
.highlight .fm { color: #000000 } /* Name.Function.Magic */ | ||
.highlight .vc { color: #000000 } /* Name.Variable.Class */ | ||
.highlight .vg { color: #000000 } /* Name.Variable.Global */ | ||
.highlight .vi { color: #000000 } /* Name.Variable.Instance */ | ||
.highlight .vm { color: #000000 } /* Name.Variable.Magic */ | ||
.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */ | ||
.highlight .gt { color: #0044DD } /* Generic.Traceback */ | ||
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ | ||
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ | ||
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ | ||
.highlight .kp { color: #007020 } /* Keyword.Pseudo */ | ||
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ | ||
.highlight .kt { color: #902000 } /* Keyword.Type */ | ||
.highlight .m { color: #208050 } /* Literal.Number */ | ||
.highlight .s { color: #4070a0 } /* Literal.String */ | ||
.highlight .na { color: #4070a0 } /* Name.Attribute */ | ||
.highlight .nb { color: #007020 } /* Name.Builtin */ | ||
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ | ||
.highlight .no { color: #60add5 } /* Name.Constant */ | ||
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ | ||
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ | ||
.highlight .ne { color: #007020 } /* Name.Exception */ | ||
.highlight .nf { color: #06287e } /* Name.Function */ | ||
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ | ||
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ | ||
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ | ||
.highlight .nv { color: #bb60d5 } /* Name.Variable */ | ||
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ | ||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */ | ||
.highlight .mb { color: #208050 } /* Literal.Number.Bin */ | ||
.highlight .mf { color: #208050 } /* Literal.Number.Float */ | ||
.highlight .mh { color: #208050 } /* Literal.Number.Hex */ | ||
.highlight .mi { color: #208050 } /* Literal.Number.Integer */ | ||
.highlight .mo { color: #208050 } /* Literal.Number.Oct */ | ||
.highlight .sa { color: #4070a0 } /* Literal.String.Affix */ | ||
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ | ||
.highlight .sc { color: #4070a0 } /* Literal.String.Char */ | ||
.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ | ||
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ | ||
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ | ||
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ | ||
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ | ||
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ | ||
.highlight .sx { color: #c65d09 } /* Literal.String.Other */ | ||
.highlight .sr { color: #235388 } /* Literal.String.Regex */ | ||
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ | ||
.highlight .ss { color: #517918 } /* Literal.String.Symbol */ | ||
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ | ||
.highlight .fm { color: #06287e } /* Name.Function.Magic */ | ||
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ | ||
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ | ||
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ | ||
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ | ||
.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ |
Oops, something went wrong.