Skip to content

Commit

Permalink
remove unnecessary in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
klifish committed Nov 21, 2023
1 parent 846cf11 commit f6d6e77
Show file tree
Hide file tree
Showing 35 changed files with 216 additions and 1,091 deletions.
91 changes: 73 additions & 18 deletions docs/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,87 @@ Before proceeding, ensure you have the following installed:

## Initial Setup

1. **Clone the Repository:**
Ensure you have the latest version of the codebase.
1. Clone the Repository:

```
git clone https://github.com/MaastrichtU-IDS/DecentralizedHealthcareBackend.git
Ensure you have the latest version of the codebase.

cd DecentralizedHealthcareBackend
```
```
git clone https://github.com/MaastrichtU-IDS/DecentralizedHealthcareBackend.git
cd DecentralizedHealthcareBackend
```

2. Install Sphinx (if not already installed):

```
pip install sphinx
```
```
pip install sphinx
```

3. Set Up Sphinx Directory:

```
sphinx-quickstart docs
```

This will create a docs directory with basic configuration files.

4. Configure Sphinx:

- Edit the `conf.py` file in the `docs/source` directory. Set the `sys.path` to include Django project's root directory, so Sphinx can find the modules
- Set Django settings modules in `conf.py`:

```
import os
import sys
import django
sys.path.insert(0, os.path.abspath('../../luce_vm/luce_django/luce'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'lucehome.settings'
django.setup()
```

5. Create Documentation with Autodoc:

3. Navigate to the Documentation Directory:
Sphinx can automatically generate documentation from your docstrings using the autodoc extension. Enable this in your `conf.py`:

```
cd docs
```
```
extensions = ['sphinx.ext.autodoc']
```

6. add `modules` in `index.rst`:

```
================================
.. toctree::
:maxdepth: 2
:caption: Contents:
modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
```

## Generating Documentation

Use `sphinx-apidoc` to automatically generate `.rst` files from the codebase.
1. Automatic .rst File Generation

Use `sphinx-apidoc` to automatically generate `.rst` files from the codebase. Check `sphinx-apidoc --help` for more information

```
# Adjust paths as necessary
sphinx-apidoc -o ./source ../luce_vm/luce_django/luce/ ../**/migrations/* ../**/tests/* ../**/utils/* ../**/lucehome/* ../**/manage.py
```

2. Build the Documentation

Generate the Documentation

```
# Adjust paths as necessary
sphinx-apidoc -o . ..
```
```
make html
```
Binary file modified docs/build/doctrees/accounts.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/blockchain.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/healthcare.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/modules.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/privacy.doctree
Binary file not shown.
9 changes: 0 additions & 9 deletions docs/build/html/_sources/accounts.rst.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
accounts package
================

Subpackages
-----------

.. toctree::
:maxdepth: 4

accounts.migrations
accounts.tests

Submodules
----------

Expand Down
9 changes: 0 additions & 9 deletions docs/build/html/_sources/blockchain.rst.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
blockchain package
==================

Subpackages
-----------

.. toctree::
:maxdepth: 4

blockchain.migrations
blockchain.tests

Submodules
----------

Expand Down
3 changes: 0 additions & 3 deletions docs/build/html/_sources/modules.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ luce
accounts
blockchain
healthcare
lucehome
manage
privacy
utils
8 changes: 0 additions & 8 deletions docs/build/html/_sources/privacy.rst.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
privacy package
===============

Subpackages
-----------

.. toctree::
:maxdepth: 4

privacy.migrations

Submodules
----------

Expand Down
26 changes: 2 additions & 24 deletions docs/build/html/accounts.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="accounts.migrations package" href="accounts.migrations.html" />
<link rel="next" title="blockchain package" href="blockchain.html" />
<link rel="prev" title="luce" href="modules.html" />

<link rel="stylesheet" href="_static/custom.css" type="text/css" />
Expand All @@ -36,25 +36,6 @@

<section id="accounts-package">
<h1>accounts package<a class="headerlink" href="#accounts-package" title="Permalink to this heading"></a></h1>
<section id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this heading"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="accounts.migrations.html">accounts.migrations package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="accounts.migrations.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="accounts.migrations.html#module-accounts.migrations.0001_initial">accounts.migrations.0001_initial module</a></li>
<li class="toctree-l2"><a class="reference internal" href="accounts.migrations.html#module-accounts.migrations">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="accounts.tests.html">accounts.tests package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="accounts.tests.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="accounts.tests.html#module-accounts.tests.test_Registration">accounts.tests.test_Registration module</a></li>
<li class="toctree-l2"><a class="reference internal" href="accounts.tests.html#module-accounts.tests">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</section>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this heading"></a></h2>
</section>
Expand Down Expand Up @@ -872,10 +853,7 @@ <h3>Navigation</h3>
<li class="toctree-l2 current"><a class="current reference internal" href="#">accounts package</a></li>
<li class="toctree-l2"><a class="reference internal" href="blockchain.html">blockchain package</a></li>
<li class="toctree-l2"><a class="reference internal" href="healthcare.html">healthcare package</a></li>
<li class="toctree-l2"><a class="reference internal" href="lucehome.html">lucehome package</a></li>
<li class="toctree-l2"><a class="reference internal" href="manage.html">manage module</a></li>
<li class="toctree-l2"><a class="reference internal" href="privacy.html">privacy package</a></li>
<li class="toctree-l2"><a class="reference internal" href="utils.html">utils package</a></li>
</ul>
</li>
</ul>
Expand All @@ -886,7 +864,7 @@ <h3>Related Topics</h3>
<li><a href="index.html">Documentation overview</a><ul>
<li><a href="modules.html">luce</a><ul>
<li>Previous: <a href="modules.html" title="previous chapter">luce</a></li>
<li>Next: <a href="accounts.migrations.html" title="next chapter">accounts.migrations package</a></li>
<li>Next: <a href="blockchain.html" title="next chapter">blockchain package</a></li>
</ul></li>
</ul></li>
</ul>
Expand Down
34 changes: 4 additions & 30 deletions docs/build/html/blockchain.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="blockchain.migrations package" href="blockchain.migrations.html" />
<link rel="prev" title="accounts.tests package" href="accounts.tests.html" />
<link rel="next" title="healthcare package" href="healthcare.html" />
<link rel="prev" title="accounts package" href="accounts.html" />

<link rel="stylesheet" href="_static/custom.css" type="text/css" />

Expand All @@ -36,29 +36,6 @@

<section id="blockchain-package">
<h1>blockchain package<a class="headerlink" href="#blockchain-package" title="Permalink to this heading"></a></h1>
<section id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this heading"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="blockchain.migrations.html">blockchain.migrations package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="blockchain.migrations.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="blockchain.migrations.html#module-blockchain.migrations.0001_initial">blockchain.migrations.0001_initial module</a></li>
<li class="toctree-l2"><a class="reference internal" href="blockchain.migrations.html#module-blockchain.migrations.0002_consentcontract_research_purpose">blockchain.migrations.0002_consentcontract_research_purpose module</a></li>
<li class="toctree-l2"><a class="reference internal" href="blockchain.migrations.html#module-blockchain.migrations">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="blockchain.tests.html">blockchain.tests package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="blockchain.tests.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="blockchain.tests.html#module-blockchain.tests.test_ConsentContract">blockchain.tests.test_ConsentContract module</a></li>
<li class="toctree-l2"><a class="reference internal" href="blockchain.tests.html#module-blockchain.tests.test_DataContract">blockchain.tests.test_DataContract module</a></li>
<li class="toctree-l2"><a class="reference internal" href="blockchain.tests.html#module-blockchain.tests.test_LuceRegistryContract">blockchain.tests.test_LuceRegistryContract module</a></li>
<li class="toctree-l2"><a class="reference internal" href="blockchain.tests.html#module-blockchain.tests.test_PlonkVerifierContract">blockchain.tests.test_PlonkVerifierContract module</a></li>
<li class="toctree-l2"><a class="reference internal" href="blockchain.tests.html#module-blockchain.tests">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</section>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this heading"></a></h2>
</section>
Expand Down Expand Up @@ -1261,10 +1238,7 @@ <h3>Navigation</h3>
<li class="toctree-l2"><a class="reference internal" href="accounts.html">accounts package</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">blockchain package</a></li>
<li class="toctree-l2"><a class="reference internal" href="healthcare.html">healthcare package</a></li>
<li class="toctree-l2"><a class="reference internal" href="lucehome.html">lucehome package</a></li>
<li class="toctree-l2"><a class="reference internal" href="manage.html">manage module</a></li>
<li class="toctree-l2"><a class="reference internal" href="privacy.html">privacy package</a></li>
<li class="toctree-l2"><a class="reference internal" href="utils.html">utils package</a></li>
</ul>
</li>
</ul>
Expand All @@ -1274,8 +1248,8 @@ <h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li><a href="modules.html">luce</a><ul>
<li>Previous: <a href="accounts.tests.html" title="previous chapter">accounts.tests package</a></li>
<li>Next: <a href="blockchain.migrations.html" title="next chapter">blockchain.migrations package</a></li>
<li>Previous: <a href="accounts.html" title="previous chapter">accounts package</a></li>
<li>Next: <a href="healthcare.html" title="next chapter">healthcare package</a></li>
</ul></li>
</ul></li>
</ul>
Expand Down
Loading

0 comments on commit f6d6e77

Please sign in to comment.