Skip to content
Snippets Groups Projects
Commit e164f5b1 authored by Mayr, Hannes's avatar Mayr, Hannes
Browse files

Merge branch '105-make-sphinx-and-readme-compatible' into 'dev'

Draft: Fix documentation build

See merge request !51
parents 914b8f5b 376d13fc
Branches Sprint/2021-23
No related tags found
No related merge requests found
Pipeline #854452 waiting for manual action
...@@ -96,7 +96,7 @@ If you want to build plotID yourself, follow these steps: ...@@ -96,7 +96,7 @@ If you want to build plotID yourself, follow these steps:
1. Download the source code from [Gitlab](https://git.rwth-aachen.de/plotid/plotid_python): 1. Download the source code from [Gitlab](https://git.rwth-aachen.de/plotid/plotid_python):
`git clone https://git.rwth-aachen.de/plotid/plotid_python.git` `git clone https://git.rwth-aachen.de/plotid/plotid_python.git`
`cd plotid_python` `cd plotid_python`
2. *[Optional]* Create a virtual environment (see [Installation](#Installation)). 2. *[Optional]* Create a virtual environment (see [Installation](#installation)).
3. *[Optional]* Run unittests and coverage: 3. *[Optional]* Run unittests and coverage:
`python3 tests/runner_tests.py` `python3 tests/runner_tests.py`
4. Build the package 4. Build the package
...@@ -110,4 +110,4 @@ To install all optional dependencies use `pip install .[test,docs]` or `pip inst ...@@ -110,4 +110,4 @@ To install all optional dependencies use `pip install .[test,docs]` or `pip inst
## Documentation ## Documentation
If you have more questions about plotID, please have a look at the [documentation](https://plotid.pages.rwth-aachen.de/plotid_python). If you have more questions about plotID, please have a look at the [documentation](https://plotid.pages.rwth-aachen.de/plotid_python).
Also have a look at the [examples](./examples) that are shipped with plotID. Also have a look at the [examples](https://git.rwth-aachen.de/plotid/plotid_python/-/tree/main/examples) that are shipped with plotID.
About plotID
==================================
plotID is developed at the Institut Fluidsystemtechnik within nfdi4ing at the Technische Universität Darmstadt.
Acknowledgements
----------------
The authors would like to thank the Federal Government and the Heads of Government of the Länder, as well as the Joint Science Conference (GWK), for their funding and support within the framework of the NFDI4Ing consortium. Funded by the German Research Foundation (DFG) - project number 442146713.
\ No newline at end of file
...@@ -38,6 +38,8 @@ release = __version__ ...@@ -38,6 +38,8 @@ release = __version__
extensions = ["sphinx.ext.napoleon", "autoapi.extension", "myst_parser"] extensions = ["sphinx.ext.napoleon", "autoapi.extension", "myst_parser"]
autoapi_type = "python" autoapi_type = "python"
autoapi_dirs = ["../../plotid", "../../tests"] autoapi_dirs = ["../../plotid", "../../tests"]
# autoapi_keep_files = True
myst_heading_anchors = 2
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"] templates_path = ["_templates"]
......
...@@ -8,7 +8,7 @@ The plotID package depends on other software for its full funcionality. Since pl ...@@ -8,7 +8,7 @@ The plotID package depends on other software for its full funcionality. Since pl
- `qrcode <https://github.com/lincolnloop/python-qrcode>`_: Creates QR codes from input data. qrcode is used to create the QR code which is printed on the plot in the end. - `qrcode <https://github.com/lincolnloop/python-qrcode>`_: Creates QR codes from input data. qrcode is used to create the QR code which is printed on the plot in the end.
- `numpy <https://numpy.org/doc/stable/>`_: Package for scientific computing. Right now it is only used to generate sample data in the examples. Since it is a dependency of matplotlib, it has to be installed anyway. - `numpy <https://numpy.org/doc/stable/>`_: Package for scientific computing. Right now it is only used to generate sample data in the examples. Since it is a dependency of matplotlib, it has to be installed anyway.
Optional depedencies that are not necessary to run plotID but more to contribute to the code are the following: Optional dependencies that are not necessary to run plotID but more to contribute to the code are the following:
- `coverage <https://coverage.readthedocs.io/en/6.5.0/#>`_: Program to measure the code coverage. It is used in the development of plotID to monitor the coverage of the code when the unit tests are run. - `coverage <https://coverage.readthedocs.io/en/6.5.0/#>`_: Program to measure the code coverage. It is used in the development of plotID to monitor the coverage of the code when the unit tests are run.
- `sphinx <https://www.sphinx-doc.org/en/master/>`_: Program to build documentation. For example, this documentatio is generated with the help of sphinx. - `sphinx <https://www.sphinx-doc.org/en/master/>`_: Program to build documentation. For example, this documentatio is generated with the help of sphinx.
......
...@@ -10,9 +10,11 @@ Welcome to plotID's documentation! ...@@ -10,9 +10,11 @@ Welcome to plotID's documentation!
:maxdepth: 2 :maxdepth: 2
:caption: Contents: :caption: Contents:
README <readme_link.rst> Overview <readme_link.rst>
Structure and architecture <structure.rst> Installation <installation.rst>
Dependencies <dependencies.rst> Dependencies <dependencies.rst>
Structure and architecture <structure.rst>
About <about.rst>
Indices and tables Indices and tables
......
Installation of plotID
==================================
For installation instructions, first have a look at the general :doc:`readme_link` or the `README.md <https://git.rwth-aachen.de/plotid/plotid_python/-/blob/main/README.md>`_ file. More detailed information about the installation process can then be found here.
Wrong python version
--------------------
To install and run plotID a python version ≥ 3.10 is required. If your linux distribution is shipped with a python version < 3.10, you still can install a newer python version. Intalling python 3.10 on Debian or Ubuntu would look like this
.. code:: bash
sudo apt install python3.10 python3.10-venv
You can then create a virtual environment "venv" to run plotID inside it
.. code:: bash
python3.10 -m venv venv
Now activate the venv
.. code:: bash
source venv/bin/activate
The virtual environment now runs with python 3.10 and plotID can be installed the usual way as described in :doc:`Overview`.
Installation on Windows via pip
-------------------------------
If you're trying
.. code:: cmd
pip install .
and following error is thrown
.. code:: cmd
Fatal error in launcher: Unable to create process using '"...env\Scripts\python.exe" "..\venv\Scripts\pip.exe" install .': The system cannot find the specified file.
Try to forcefully reinstall pip
.. code:: cmd
python -m pip install --upgrade --force pip
Or use
.. code:: cmd
python -m pip install .
instead.
plotid
======
.. toctree::
:maxdepth: 4
plotid
plotid package
==============
Submodules
----------
plotid.create\_id module
------------------------
.. automodule:: plotid.create_id
:members:
:undoc-members:
:show-inheritance:
plotid.example module
---------------------
.. automodule:: plotid.example
:members:
:undoc-members:
:show-inheritance:
plotid.filecompare module
-------------------------
.. automodule:: plotid.filecompare
:members:
:undoc-members:
:show-inheritance:
plotid.hdf5\_external\_link module
----------------------------------
.. automodule:: plotid.hdf5_external_link
:members:
:undoc-members:
:show-inheritance:
plotid.plotoptions module
-------------------------
.. automodule:: plotid.plotoptions
:members:
:undoc-members:
:show-inheritance:
plotid.publish module
---------------------
.. automodule:: plotid.publish
:members:
:undoc-members:
:show-inheritance:
plotid.save\_plot module
------------------------
.. automodule:: plotid.save_plot
:members:
:undoc-members:
:show-inheritance:
plotid.tagplot module
---------------------
.. automodule:: plotid.tagplot
:members:
:undoc-members:
:show-inheritance:
plotid.tagplot\_matplotlib module
---------------------------------
.. automodule:: plotid.tagplot_matplotlib
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: plotid
:members:
:undoc-members:
:show-inheritance:
```{include} ../../README.md
:relative-docs: docs/
:relative-images:
```
\ No newline at end of file
Readme File
-----------
.. include:: ../../README.md
:parser: myst_parser.sphinx_
\ No newline at end of file
Structure and architecture of plotID Structure and architecture of plotID
================================== ====================================
A visualization of the internal structure of plotID is provided here. The structure tries to follow Object Oriented Programming (OOP) principles. First tagplot() is depicted with matplotlib as example plot engine: A visualization of the internal structure of plotID is provided here. The structure tries to follow Object Oriented Programming (OOP) principles. First tagplot() is depicted with matplotlib as example plot engine:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment