Skip to content

Commit

Permalink
adding missing sections to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikoleta-v3 committed Aug 22, 2024
1 parent ffde84c commit 0def92b
Show file tree
Hide file tree
Showing 15 changed files with 113 additions and 65 deletions.
Binary file modified docs/build/doctrees/contributing/contributing_function.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/contributing/contributing_test.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ like to work on. Some of these issues are tagged as :code:`enhancement`. The
issue will have a description of the function that needs to be implemented, and
where the function code should be included.


Install the package in development mode
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To contribute any source code such a test, you need to install the package in
development mode. To do this, run the following command from the root of the
project folder::

$ pip install -e .


Implementing your function
^^^^^^^^^^^^^^^^^^^^^^^^^^^

In your function you need to remember to include a docstring that describes what
the function does. This is important for users of the software to understand how
to use the function. The docstring should be in the following format::
Expand Down Expand Up @@ -76,6 +90,7 @@ Checklist

| |uncheck| Choose an issue labeled :code:`enhancement` from the issues section.
| |uncheck| Familiarize yourself with the structure of the source code.
| |uncheck| Install the package in development mode.
| |uncheck| Implement the new function.
| |uncheck| Include a docstring in the function.
| |uncheck| Implement a test for your new function.
Expand Down
40 changes: 21 additions & 19 deletions docs/build/html/_sources/contributing/contributing_test.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,29 @@
----------------------

Navigate to the issues tab of the repository and find an issue that you would
like to work on. Some of these issues are tagged as :code:`enhancement`. The
like to work on. Some of these issues are tagged as :code:`Tests`. The
issue will have a description of the function that needs to be implemented, and
where the function code should be included.

Testing your function
^^^^^^^^^^^^^^^^^^^^^
Install the package in development mode
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Before you commit your changes, you need to test your function. To do this, you
need to run the test suite. The test suite is in the :code:`tests` directory.
The test suite is written using `pytest <https://docs.pytest.org/en/stable/>`_.
To run the test suite, run the command from the root of the project folder::
To contribute any source code such a test, you need to install the package in
development mode. To do this, run the following command from the root of the
project folder::

$ pip install -e .

$ pytest tests
============================= test session starts ==============================
platform linux -- Python 3.8.5, pytest-6.2.2, pluggy-0.13.1
rootdir: /home/nikoleta/Documents/a-hitchhikers-guide-to-contributing-to-open-source
collected 0 items

============================== no tests ran in 0.01s ==============================
Running the test suite
^^^^^^^^^^^^^^^^^^^^^^

Once you have implemented your test you need to run the test suite to ensure
that your test is working correctly. The test suite is written using `pytest
<https://docs.pytest.org/en/stable/>`_. To run it, , run the following command
from the root of the project folder::

$ pytest tests


Committing the change
Expand All @@ -48,11 +52,9 @@ This will open a text editor where you can write your commit title and message.
Checklist
^^^^^^^^^

| |uncheck| Choose an issue labeled :code:`enhancement` from the issues section.
| |uncheck| Familiarize yourself with the structure of the source code.
| |uncheck| Implement the new function.
| |uncheck| Include a docstring in the function.
| |uncheck| Implement a test for your new function.
| |uncheck| Test the function using the test suite.
| |uncheck| Choose an issue labeled :code:`Tests` from the issues section.
| |uncheck| Install the package in development mode.
| |uncheck| Implement the test.
| |uncheck| Run the test suite.
| |uncheck| Add the changes to the staging area.
| |uncheck| Commit the changes.
5 changes: 0 additions & 5 deletions docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ streaks, and identify the most frequently occurring elements::
Table of Contents
=================

.. To install the package your computer see the installation guideliens.
.. The purpose of this package is to help you learn how to contribute to open
.. source projects. For more information, check out the tutorial:
.. toctree::
:maxdepth: 2

Expand Down
15 changes: 15 additions & 0 deletions docs/build/html/contributing/contributing_function.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
<li class="toctree-l2"><a class="reference internal" href="contributing_docs.html">3. Contributing to the documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing_test.html">4. Contributing a test</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">5. Contributing a new function</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#install-the-package-in-development-mode">Install the package in development mode</a></li>
<li class="toctree-l3"><a class="reference internal" href="#implementing-your-function">Implementing your function</a></li>
<li class="toctree-l3"><a class="reference internal" href="#documenting-your-function">Documenting your function</a></li>
<li class="toctree-l3"><a class="reference internal" href="#testing-your-function">Testing your function</a></li>
<li class="toctree-l3"><a class="reference internal" href="#committing-the-change">Committing the change</a></li>
Expand Down Expand Up @@ -94,6 +96,17 @@
like to work on. Some of these issues are tagged as <code class="code docutils literal notranslate"><span class="pre">enhancement</span></code>. The
issue will have a description of the function that needs to be implemented, and
where the function code should be included.</p>
<section id="install-the-package-in-development-mode">
<h2>Install the package in development mode<a class="headerlink" href="#install-the-package-in-development-mode" title="Permalink to this heading"></a></h2>
<p>To contribute any source code such a test, you need to install the package in
development mode. To do this, run the following command from the root of the
project folder:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ pip install -e .
</pre></div>
</div>
</section>
<section id="implementing-your-function">
<h2>Implementing your function<a class="headerlink" href="#implementing-your-function" title="Permalink to this heading"></a></h2>
<p>In your function you need to remember to include a docstring that describes what
the function does. This is important for users of the software to understand how
to use the function. The docstring should be in the following format:</p>
Expand All @@ -115,6 +128,7 @@
<span class="c1"># code for the function</span>
</pre></div>
</div>
</section>
<section id="documenting-your-function">
<h2>Documenting your function<a class="headerlink" href="#documenting-your-function" title="Permalink to this heading"></a></h2>
</section>
Expand Down Expand Up @@ -153,6 +167,7 @@ <h2>Checklist<a class="headerlink" href="#checklist" title="Permalink to this he
<div class="line-block">
<div class="line"><input type="checkbox"> Choose an issue labeled <code class="code docutils literal notranslate"><span class="pre">enhancement</span></code> from the issues section.</div>
<div class="line"><input type="checkbox"> Familiarize yourself with the structure of the source code.</div>
<div class="line"><input type="checkbox"> Install the package in development mode.</div>
<div class="line"><input type="checkbox"> Implement the new function.</div>
<div class="line"><input type="checkbox"> Include a docstring in the function.</div>
<div class="line"><input type="checkbox"> Implement a test for your new function.</div>
Expand Down
41 changes: 21 additions & 20 deletions docs/build/html/contributing/contributing_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
<li class="toctree-l2"><a class="reference internal" href="branching.html">2. Creating a branch</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing_docs.html">3. Contributing to the documentation</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">4. Contributing a test</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#testing-your-function">Testing your function</a></li>
<li class="toctree-l3"><a class="reference internal" href="#install-the-package-in-development-mode">Install the package in development mode</a></li>
<li class="toctree-l3"><a class="reference internal" href="#running-the-test-suite">Running the test suite</a></li>
<li class="toctree-l3"><a class="reference internal" href="#committing-the-change">Committing the change</a></li>
<li class="toctree-l3"><a class="reference internal" href="#checklist">Checklist</a></li>
</ul>
Expand Down Expand Up @@ -90,22 +91,24 @@
<section id="contributing-a-test">
<span id="contributingtest"></span><h1>4. Contributing a test<a class="headerlink" href="#contributing-a-test" title="Permalink to this heading"></a></h1>
<p>Navigate to the issues tab of the repository and find an issue that you would
like to work on. Some of these issues are tagged as <code class="code docutils literal notranslate"><span class="pre">enhancement</span></code>. The
like to work on. Some of these issues are tagged as <code class="code docutils literal notranslate"><span class="pre">Tests</span></code>. The
issue will have a description of the function that needs to be implemented, and
where the function code should be included.</p>
<section id="testing-your-function">
<h2>Testing your function<a class="headerlink" href="#testing-your-function" title="Permalink to this heading"></a></h2>
<p>Before you commit your changes, you need to test your function. To do this, you
need to run the test suite. The test suite is in the <code class="code docutils literal notranslate"><span class="pre">tests</span></code> directory.
The test suite is written using <a class="reference external" href="https://docs.pytest.org/en/stable/">pytest</a>.
To run the test suite, run the command from the root of the project folder:</p>
<section id="install-the-package-in-development-mode">
<h2>Install the package in development mode<a class="headerlink" href="#install-the-package-in-development-mode" title="Permalink to this heading"></a></h2>
<p>To contribute any source code such a test, you need to install the package in
development mode. To do this, run the following command from the root of the
project folder:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ pip install -e .
</pre></div>
</div>
</section>
<section id="running-the-test-suite">
<h2>Running the test suite<a class="headerlink" href="#running-the-test-suite" title="Permalink to this heading"></a></h2>
<p>Once you have implemented your test you need to run the test suite to ensure
that your test is working correctly. The test suite is written using <a class="reference external" href="https://docs.pytest.org/en/stable/">pytest</a>. To run it, , run the following command
from the root of the project folder:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ pytest tests
============================= test session starts ==============================
platform linux -- Python 3.8.5, pytest-6.2.2, pluggy-0.13.1
rootdir: /home/nikoleta/Documents/a-hitchhikers-guide-to-contributing-to-open-source
collected 0 items

============================== no tests ran in 0.01s ==============================
</pre></div>
</div>
</section>
Expand All @@ -126,12 +129,10 @@ <h2>Committing the change<a class="headerlink" href="#committing-the-change" tit
<section id="checklist">
<h2>Checklist<a class="headerlink" href="#checklist" title="Permalink to this heading"></a></h2>
<div class="line-block">
<div class="line"><input type="checkbox"> Choose an issue labeled <code class="code docutils literal notranslate"><span class="pre">enhancement</span></code> from the issues section.</div>
<div class="line"><input type="checkbox"> Familiarize yourself with the structure of the source code.</div>
<div class="line"><input type="checkbox"> Implement the new function.</div>
<div class="line"><input type="checkbox"> Include a docstring in the function.</div>
<div class="line"><input type="checkbox"> Implement a test for your new function.</div>
<div class="line"><input type="checkbox"> Test the function using the test suite.</div>
<div class="line"><input type="checkbox"> Choose an issue labeled <code class="code docutils literal notranslate"><span class="pre">Tests</span></code> from the issues section.</div>
<div class="line"><input type="checkbox"> Install the package in development mode.</div>
<div class="line"><input type="checkbox"> Implement the test.</div>
<div class="line"><input type="checkbox"> Run the test suite.</div>
<div class="line"><input type="checkbox"> Add the changes to the staging area.</div>
<div class="line"><input type="checkbox"> Commit the changes.</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion docs/build/html/contributing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,15 @@ <h1>Make a Contribution to <cite>listwiz</cite><a class="headerlink" href="#make
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="contributing_test.html">4. Contributing a test</a><ul>
<li class="toctree-l2"><a class="reference internal" href="contributing_test.html#testing-your-function">Testing your function</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing_test.html#install-the-package-in-development-mode">Install the package in development mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing_test.html#running-the-test-suite">Running the test suite</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing_test.html#committing-the-change">Committing the change</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing_test.html#checklist">Checklist</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="contributing_function.html">5. Contributing a new function</a><ul>
<li class="toctree-l2"><a class="reference internal" href="contributing_function.html#install-the-package-in-development-mode">Install the package in development mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing_function.html#implementing-your-function">Implementing your function</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing_function.html#documenting-your-function">Documenting your function</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing_function.html#testing-your-function">Testing your function</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing_function.html#committing-the-change">Committing the change</a></li>
Expand Down
Binary file modified docs/build/html/objects.inv
Binary file not shown.
Loading

0 comments on commit 0def92b

Please sign in to comment.