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

Commit

Permalink
doc: Update and add documentation (#100)
Browse files Browse the repository at this point in the history
* Minor fixes on code and documentation
* Add last additions to the doctrees
  • Loading branch information
tripledes committed Dec 27, 2019
1 parent 12c5cc1 commit c2c70b6
Show file tree
Hide file tree
Showing 50 changed files with 626 additions and 141 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ tests:
purge:
docker-compose rm -f || true
docker rmi thesheriff/thesheriff || true
docs:
make -C doc clean html

.PHONY: build clean lint purge run tests
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/infrastructure.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions doc/build/html/_sources/application.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Outlaw
Raid
----

.. _create_raid:
.. module:: thesheriff.application.raid.create_raid
.. autoclass:: CreateRaid
:members:
.. _end_raid:
.. module:: thesheriff.application.raid.end_raid
.. autoclass:: EndRaid
Expand Down
23 changes: 23 additions & 0 deletions doc/build/html/_sources/domain.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Gang
.. module:: thesheriff.domain.gang.repository.gang_repository
.. autoclass:: GangRepository
:members:
:undoc-members:

Outlaw
------
Expand All @@ -30,6 +31,14 @@ Outlaw
.. module:: thesheriff.domain.outlaw.outlaw
.. autoclass:: Outlaw
:members:
.. _sheriff:
.. module:: thesheriff.domain.outlaw.sheriff
.. autoclass:: Sheriff
:members:
.. _score:
.. module:: thesheriff.domain.outlaw.score
.. autoclass:: Score
:members:
.. _outlaw_factory:
.. module:: thesheriff.domain.outlaw.outlaw_factory
.. autoclass:: OutlawFactory
Expand All @@ -38,6 +47,7 @@ Outlaw
.. module:: thesheriff.domain.outlaw.repository.outlaw_repository
.. autoclass:: OutlawRepository
:members:
:undoc-members:


Raid
Expand All @@ -55,3 +65,16 @@ Raid
.. module:: thesheriff.domain.raid.repository.raid_repository
.. autoclass:: RaidRepository
:members:
:undoc-members:

Mail
----

.. _mail:
.. module:: thesheriff.domain.mail.mail
.. autoclass:: Mail
:members:
.. module:: thesheriff.domain.mail.notifier.mail_notifier
.. autoclass:: MailNotifier
:members:
:undoc-members:
8 changes: 8 additions & 0 deletions doc/build/html/_sources/infrastructure.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@ Repositories
.. module:: thesheriff.infrastructure.repository.mysql_raid_repository
.. autoclass:: MySQLRaidRepository
:members:

Notifiers
---------
.. _smtp_mail_notifier:
.. module:: thesheriff.infrastructure.notifier.smtp_mail_notifier
.. autoclass:: SMTPMailNotifier
:members:
:undoc-members:
59 changes: 44 additions & 15 deletions doc/build/html/application.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,10 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
<dl class="method">
<dt id="thesheriff.application.outlaw.create_gang.CreateGang.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">request: thesheriff.application.gang.request.create_gang_request.CreateGangRequest</em><span class="sig-paren">)</span> &#x2192; thesheriff.domain.gang.gang.Gang<a class="headerlink" href="#thesheriff.application.outlaw.create_gang.CreateGang.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the Raid rating use case.</p>
<dd><p>execute is the actual action of the Create Gang use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>owner_id</strong> (<em>Integer.</em>) – ID of the Outlaw creating the Gang.</p></li>
<li><p><strong>name</strong> (<em>String.</em>) – Given name of the Gang.</p></li>
</ul>
<dd class="field-odd"><p><strong>request</strong> (<a class="reference internal" href="#thesheriff.application.gang.request.create_gang_request.CreateGangRequest" title="thesheriff.application.gang.request.create_gang_request.CreateGangRequest"><em>CreateGangRequest</em></a>) – Request object holding the Gang details.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The created Gang.</p>
Expand All @@ -137,7 +134,7 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
<dl class="method">
<dt id="thesheriff.application.outlaw.create_outlaw.CreateOutlaw.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">request: thesheriff.application.outlaw.request.create_outlaw_request.CreateOutlawRequest</em><span class="sig-paren">)</span> &#x2192; thesheriff.domain.outlaw.outlaw.Outlaw<a class="headerlink" href="#thesheriff.application.outlaw.create_outlaw.CreateOutlaw.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the Raid rating use case.</p>
<dd><p>execute is the actual action of the Create Outlaw use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>request</strong> (<a class="reference internal" href="#thesheriff.application.outlaw.request.create_outlaw_request.CreateOutlawRequest" title="thesheriff.application.outlaw.request.create_outlaw_request.CreateOutlawRequest"><em>CreateOutlawRequest</em></a>) – Request holding the new Outlaw details.</p>
Expand All @@ -159,7 +156,7 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
<dd><p>Class InviteFriend implements the invite a friend use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>mail_notifier</strong> (<em>MailNotifier</em>) – Repository managing the Gang domain entities.</p>
<dd class="field-odd"><p><strong>mail_notifier</strong> (<a class="reference internal" href="domain.html#thesheriff.domain.mail.notifier.mail_notifier.MailNotifier" title="thesheriff.domain.mail.notifier.mail_notifier.MailNotifier"><em>MailNotifier</em></a>) – Notifier object to handle email notifications.</p>
</dd>
</dl>
<dl class="method">
Expand Down Expand Up @@ -199,7 +196,7 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
<dd><p>execute is the actual action of the Join Gang use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>request</strong> (<a class="reference internal" href="#thesheriff.application.gang.request.join_gang_request.JoinGangRequest" title="thesheriff.application.gang.request.join_gang_request.JoinGangRequest"><em>JoinGangRequest</em></a>) – Request holding for joining a Gang.</p>
<dd class="field-odd"><p><strong>request</strong> (<a class="reference internal" href="#thesheriff.application.gang.request.join_gang_request.JoinGangRequest" title="thesheriff.application.gang.request.join_gang_request.JoinGangRequest"><em>JoinGangRequest</em></a>) – Request holding details for joining a Gang.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>No value returned.</p>
Expand Down Expand Up @@ -227,7 +224,7 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
<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>
<dd class="field-odd"><p><strong>outlaw_id</strong> (<em>Integer</em>) – ID of the Outlaw performing the action.</p>
<dd class="field-odd"><p><strong>outlaw_id</strong> (<em>Integer</em>) – ID of the Outlaw for which to list friends.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The list of friends.</p>
Expand All @@ -243,7 +240,7 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
<span class="target" id="module-thesheriff.application.outlaw.list_gangs"><span id="outlaw-list-gangs"></span></span><dl class="class">
<dt id="thesheriff.application.outlaw.list_gangs.ListGangs">
<em class="property">class </em><code class="sig-prename descclassname">thesheriff.application.outlaw.list_gangs.</code><code class="sig-name descname">ListGangs</code><span class="sig-paren">(</span><em class="sig-param">gang_repository: thesheriff.domain.gang.repository.gang_repository.GangRepository</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.outlaw.list_gangs.ListGangs" title="Permalink to this definition"></a></dt>
<dd><p>Class ListGangs implements the list gangs use case.</p>
<dd><p>Class ListGangs implements the List Outlaw’s Gangs use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>gang_repository</strong> (<a class="reference internal" href="domain.html#thesheriff.domain.gang.repository.gang_repository.GangRepository" title="thesheriff.domain.gang.repository.gang_repository.GangRepository"><em>GangRepository</em></a>) – Repository managing the Gang domain entities.</p>
Expand Down Expand Up @@ -289,7 +286,7 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
<dd class="field-odd"><ul class="simple">
<li><p><strong>raid_id</strong> (<em>Integer</em>) – ID of the Raid to be rated</p></li>
<li><p><strong>outlaw_id</strong> (<em>Integer</em>) – ID of the Outlaw performing the action.</p></li>
<li><p><strong>score</strong> (<em>Score</em>) – Raid’s score.</p></li>
<li><p><strong>score</strong> (<a class="reference internal" href="domain.html#thesheriff.domain.outlaw.score.Score" title="thesheriff.domain.outlaw.score.Score"><em>Score</em></a>) – Raid’s score.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
Expand Down Expand Up @@ -320,6 +317,38 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
</div>
<div class="section" id="raid">
<h2>Raid<a class="headerlink" href="#raid" title="Permalink to this headline"></a></h2>
<span class="target" id="module-thesheriff.application.raid.create_raid"><span id="create-raid"></span></span><dl class="class">
<dt id="thesheriff.application.raid.create_raid.CreateRaid">
<em class="property">class </em><code class="sig-prename descclassname">thesheriff.application.raid.create_raid.</code><code class="sig-name descname">CreateRaid</code><span class="sig-paren">(</span><em class="sig-param">outlaw_repository: thesheriff.domain.outlaw.repository.outlaw_repository.OutlawRepository</em>, <em class="sig-param">gang_repository: thesheriff.domain.gang.repository.gang_repository.GangRepository</em>, <em class="sig-param">raid_repository: thesheriff.domain.raid.repository.raid_repository.RaidRepository</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.raid.create_raid.CreateRaid" title="Permalink to this definition"></a></dt>
<dd><p>Class CreateRaid implements the Create Raid use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>outlaw_repository</strong> (<a class="reference internal" href="domain.html#thesheriff.domain.outlaw.repository.outlaw_repository.OutlawRepository" title="thesheriff.domain.outlaw.repository.outlaw_repository.OutlawRepository"><em>OutlawRepository</em></a>) – Repository managing Outlaw domain entities.</p></li>
<li><p><strong>gang_repository</strong> (<a class="reference internal" href="domain.html#thesheriff.domain.gang.repository.gang_repository.GangRepository" title="thesheriff.domain.gang.repository.gang_repository.GangRepository"><em>GangRepository</em></a>) – Repository managing Gang domain entities.</p></li>
<li><p><strong>raid_repository</strong> (<a class="reference internal" href="domain.html#thesheriff.domain.raid.repository.raid_repository.RaidRepository" title="thesheriff.domain.raid.repository.raid_repository.RaidRepository"><em>RaidRepository</em></a>) – Repository managing Raid domain entities.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="thesheriff.application.raid.create_raid.CreateRaid.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">request: thesheriff.application.raid.request.create_raid_request.CreateRaidRequest</em><span class="sig-paren">)</span> &#x2192; thesheriff.domain.raid.raid.Raid<a class="headerlink" href="#thesheriff.application.raid.create_raid.CreateRaid.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of Create a Raid use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>request</strong> (<a class="reference internal" href="#thesheriff.application.raid.request.create_raid_request.CreateRaidRequest" title="thesheriff.application.raid.request.create_raid_request.CreateRaidRequest"><em>CreateRaidRequest</em></a>) – Request object with details for creating a Raid.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The created Raid.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="domain.html#thesheriff.domain.raid.raid.Raid" title="thesheriff.domain.raid.raid.Raid">Raid</a></p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<span class="target" id="module-thesheriff.application.raid.end_raid"><span id="end-raid"></span></span><dl class="class">
<dt id="thesheriff.application.raid.end_raid.EndRaid">
<em class="property">class </em><code class="sig-prename descclassname">thesheriff.application.raid.end_raid.</code><code class="sig-name descname">EndRaid</code><span class="sig-paren">(</span><em class="sig-param">raid_repository: thesheriff.domain.raid.repository.raid_repository.RaidRepository</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.raid.end_raid.EndRaid" title="Permalink to this definition"></a></dt>
Expand All @@ -331,13 +360,13 @@ <h2>Raid<a class="headerlink" href="#raid" title="Permalink to this headline">¶
</dl>
<dl class="method">
<dt id="thesheriff.application.raid.end_raid.EndRaid.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">raid_id: int</em>, <em class="sig-param">raid_score: int</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.raid.end_raid.EndRaid.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the Raid rating use case.</p>
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">raid_id: int</em>, <em class="sig-param">raid_score: float</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.raid.end_raid.EndRaid.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the End a Raid use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>raid_id</strong> (<em>Integer</em>) – ID of the Raid to be end.</p></li>
<li><p><strong>raid_score</strong> (<em>Integer</em>) – Score assign to the Raid.</p></li>
<li><p><strong>raid_score</strong> (<em>Float</em>) – Score assigned to the Raid.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
Expand All @@ -363,7 +392,7 @@ <h2>Raid<a class="headerlink" href="#raid" title="Permalink to this headline">¶
<dl class="method">
<dt id="thesheriff.application.raid.grade_raid.GradeRaid.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">raid: thesheriff.domain.raid.raid.Raid</em><span class="sig-paren">)</span> &#x2192; float<a class="headerlink" href="#thesheriff.application.raid.grade_raid.GradeRaid.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the Grade Raid use case.</p>
<dd><p>execute is the actual action of the Grade a Raid use case.</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>) – The Raid entity to be graded.</p>
Expand Down

0 comments on commit c2c70b6

Please sign in to comment.