Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Commit

Permalink
validation: rate raid (#104)
Browse files Browse the repository at this point in the history
* Rename standalon variables named 'id' as it turns out it's a python
keyword
* Validate rate raid (while using create outlaw, create gang and create
raid)
* Update some docs and examples
  • Loading branch information
tripledes committed Dec 28, 2019
1 parent e9d669a commit adae645
Show file tree
Hide file tree
Showing 44 changed files with 278 additions and 138 deletions.
Binary file modified doc/build/doctrees/application.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/domain.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified doc/build/doctrees/index.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/infrastructure.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/introduction.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/tools.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/usage.doctree
Binary file not shown.
4 changes: 2 additions & 2 deletions doc/build/html/_sources/introduction.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ Document Contents
In all the other sections basically it is going to be explained the next information:

- **Functionality - The Sheriff usage**: How to run the application, how to run the code static analysis,
how to test the application and the tools needed for it.
how to test the application and the tools needed for it.

- **Design - Hexagonal architecture**: How the project is designed.
- **The Sheriff Aplication**
- **The Sheriff Domain**
- **The Sheriff Infraestructure**

- **Tools**: Explanation of the technologies used to make the infrastructure work, the relations they have in the design
with other classes and an analysis of the impact of modifying every technology used in the project.
with other classes and an analysis of the impact of modifying every technology used in the project.

- **API Documentation**: To check the information on a specific function, class, or method.

Expand Down
5 changes: 3 additions & 2 deletions doc/build/html/_sources/tools.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,13 @@ persistence patterns.
In *The Sheriff*, it has let the application to persist all the information dealt in the concrete use case.

The libraries used are:

- *Create_engine* to enable the connection to the MySQL repositories.

- *MetaData* to share this object type to many SQL repositories.

- *Table* to abstract the way to deal with the SQL repositories. It allows to deal with Object Collections
as if they were tables.
- *Table* to abstract the way to deal with the SQL repositories.
It allows to deal with Object Collections as if they were tables.

Reference website:
`SQLAlchemy <https://www.sqlalchemy.org/>`_
Expand Down
4 changes: 2 additions & 2 deletions doc/build/html/application.html
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
</dl>
<dl class="method">
<dt id="thesheriff.application.outlaw.list_friends.ListFriends.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">outlaw_id</em><span class="sig-paren">)</span> &#x2192; List[thesheriff.domain.outlaw.outlaw.Outlaw]<a class="headerlink" href="#thesheriff.application.outlaw.list_friends.ListFriends.execute" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">outlaw_id: int</em><span class="sig-paren">)</span> &#x2192; List[thesheriff.domain.outlaw.outlaw.Outlaw]<a class="headerlink" href="#thesheriff.application.outlaw.list_friends.ListFriends.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the List Outlaw’s Friends use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
Expand Down Expand Up @@ -407,7 +407,7 @@ <h2>Raid<a class="headerlink" href="#raid" title="Permalink to this headline">¶

<span class="target" id="module-thesheriff.application.raid.request.create_raid_request"><span id="create-raid-request"></span></span><dl class="class">
<dt id="thesheriff.application.raid.request.create_raid_request.CreateRaidRequest">
<em class="property">class </em><code class="sig-prename descclassname">thesheriff.application.raid.request.create_raid_request.</code><code class="sig-name descname">CreateRaidRequest</code><span class="sig-paren">(</span><em class="sig-param">name: str, date: datetime.datetime, location: str, gang_id: int, sheriff_id: int, outlaw_ids: List[int]</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.raid.request.create_raid_request.CreateRaidRequest" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">thesheriff.application.raid.request.create_raid_request.</code><code class="sig-name descname">CreateRaidRequest</code><span class="sig-paren">(</span><em class="sig-param">name: str, date: str, location: str, gang_id: int, sheriff_id: int, outlaw_ids: List[int]</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.raid.request.create_raid_request.CreateRaidRequest" title="Permalink to this definition"></a></dt>
<dd><p>Class CreateRaidRequest holds data required to create a Raid.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
Expand Down
87 changes: 67 additions & 20 deletions doc/build/html/domain.html

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion doc/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,16 @@ <h2 id="C">C</h2>
<li><a href="domain.html#thesheriff.domain.raid.raid_factory.RaidFactory.create">(thesheriff.domain.raid.raid_factory.RaidFactory static method)</a>
</li>
</ul></li>
<li><a href="application.html#thesheriff.application.outlaw.create_gang.CreateGang">CreateGang (class in thesheriff.application.outlaw.create_gang)</a>
<li><a href="domain.html#thesheriff.domain.gang.gang_factory.GangFactory.create_with_id">create_with_id() (thesheriff.domain.gang.gang_factory.GangFactory static method)</a>

<ul>
<li><a href="domain.html#thesheriff.domain.outlaw.outlaw_factory.OutlawFactory.create_with_id">(thesheriff.domain.outlaw.outlaw_factory.OutlawFactory static method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="application.html#thesheriff.application.outlaw.create_gang.CreateGang">CreateGang (class in thesheriff.application.outlaw.create_gang)</a>
</li>
<li><a href="application.html#thesheriff.application.gang.request.create_gang_request.CreateGangRequest">CreateGangRequest (class in thesheriff.application.gang.request.create_gang_request)</a>
</li>
<li><a href="application.html#thesheriff.application.outlaw.create_outlaw.CreateOutlaw">CreateOutlaw (class in thesheriff.application.outlaw.create_outlaw)</a>
Expand Down Expand Up @@ -420,6 +426,12 @@ <h2 id="U">U</h2>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="domain.html#thesheriff.domain.raid.repository.raid_repository.RaidRepository.update_rates">update_rates() (thesheriff.domain.raid.repository.raid_repository.RaidRepository method)</a>

<ul>
<li><a href="infrastructure.html#thesheriff.infrastructure.repository.mysql_raid_repository.MySQLRaidRepository.update_rates">(thesheriff.infrastructure.repository.mysql_raid_repository.MySQLRaidRepository method)</a>
</li>
</ul></li>
<li><a href="domain.html#thesheriff.domain.outlaw.sheriff.Sheriff.update_score">update_score() (thesheriff.domain.outlaw.sheriff.Sheriff method)</a>
</li>
</ul></td>
Expand Down
18 changes: 18 additions & 0 deletions doc/build/html/infrastructure.html
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,24 @@ <h2>Repositories<a class="headerlink" href="#repositories" title="Permalink to t
</dl>
</dd></dl>

<dl class="method">
<dt id="thesheriff.infrastructure.repository.mysql_raid_repository.MySQLRaidRepository.update_rates">
<code class="sig-name descname">update_rates</code><span class="sig-paren">(</span><em class="sig-param">raid: thesheriff.domain.raid.raid.Raid</em><span class="sig-paren">)</span> &#x2192; NoReturn<a class="headerlink" href="#thesheriff.infrastructure.repository.mysql_raid_repository.MySQLRaidRepository.update_rates" title="Permalink to this definition"></a></dt>
<dd><p>Method update_rates, specialized update that handles rates
transformation before running the actual update.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>raid</strong> (<a class="reference internal" href="domain.html#thesheriff.domain.raid.raid.Raid" title="thesheriff.domain.raid.raid.Raid"><em>Raid</em></a>) – Raid to be rated.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>No returned value.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>NoReturn</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
Expand Down
12 changes: 4 additions & 8 deletions doc/build/html/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ <h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to t
<h2>Document Contents<a class="headerlink" href="#document-contents" title="Permalink to this headline"></a></h2>
<p>In all the other sections basically it is going to be explained the next information:</p>
<ul class="simple">
<li><p><strong>Functionality - The Sheriff usage</strong>: How to run the application, how to run the code static analysis,</p></li>
</ul>
<p>how to test the application and the tools needed for it.</p>
<ul class="simple">
<li><p><strong>Functionality - The Sheriff usage</strong>: How to run the application, how to run the code static analysis,
how to test the application and the tools needed for it.</p></li>
<li><dl class="simple">
<dt><strong>Design - Hexagonal architecture</strong>: How the project is designed.</dt><dd><ul>
<li><p><strong>The Sheriff Aplication</strong></p></li>
Expand All @@ -69,10 +67,8 @@ <h2>Document Contents<a class="headerlink" href="#document-contents" title="Perm
</dd>
</dl>
</li>
<li><p><strong>Tools</strong>: Explanation of the technologies used to make the infrastructure work, the relations they have in the design</p></li>
</ul>
<p>with other classes and an analysis of the impact of modifying every technology used in the project.</p>
<ul class="simple">
<li><p><strong>Tools</strong>: Explanation of the technologies used to make the infrastructure work, the relations they have in the design
with other classes and an analysis of the impact of modifying every technology used in the project.</p></li>
<li><p><strong>API Documentation</strong>: To check the information on a specific function, class, or method.</p></li>
<li><p><strong>Conclusions</strong></p></li>
</ul>
Expand Down
Binary file modified doc/build/html/objects.inv
Binary file not shown.

0 comments on commit adae645

Please sign in to comment.