diff --git a/README.md b/README.md index 899d1357177c8d4157a7027ba764f0babe6967fb..00bc77c2fcc0c3772c51926798af2d2194714578 100644 --- a/README.md +++ b/README.md @@ -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): `git clone https://git.rwth-aachen.de/plotid/plotid_python.git` `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: `python3 tests/runner_tests.py` 4. Build the package @@ -110,4 +110,4 @@ To install all optional dependencies use `pip install .[test,docs]` or `pip inst ## Documentation 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. diff --git a/docs/source/about.rst b/docs/source/about.rst new file mode 100644 index 0000000000000000000000000000000000000000..6e46bf0e75a2e543fdb5bfe86f2211285412b70b --- /dev/null +++ b/docs/source/about.rst @@ -0,0 +1,9 @@ +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 diff --git a/docs/source/conf.py b/docs/source/conf.py index dfec1e430ace2b700542e35042c0d1d4da97d67b..dbd16bdb547bea25b4eb461140b0e4f9f7a82a83 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -38,6 +38,8 @@ release = __version__ extensions = ["sphinx.ext.napoleon", "autoapi.extension", "myst_parser"] autoapi_type = "python" autoapi_dirs = ["../../plotid", "../../tests"] +# autoapi_keep_files = True +myst_heading_anchors = 2 # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] diff --git a/docs/source/dependencies.rst b/docs/source/dependencies.rst index 0229267378228945a58b3d9b5022f8ee24085de9..ddcde8bb4ee0e9214359d9144b926c6d3145c2ee 100644 --- a/docs/source/dependencies.rst +++ b/docs/source/dependencies.rst @@ -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. - `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. - `sphinx <https://www.sphinx-doc.org/en/master/>`_: Program to build documentation. For example, this documentatio is generated with the help of sphinx. diff --git a/docs/source/index.rst b/docs/source/index.rst index d6c673c14b0d29ed3baa329fc17d22ebc155e19a..47476c219e1ed184ab832705fc63177d9fe64278 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -10,9 +10,11 @@ Welcome to plotID's documentation! :maxdepth: 2 :caption: Contents: - README <readme_link.rst> - Structure and architecture <structure.rst> + Overview <readme_link.rst> + Installation <installation.rst> Dependencies <dependencies.rst> + Structure and architecture <structure.rst> + About <about.rst> Indices and tables diff --git a/docs/source/installation.rst b/docs/source/installation.rst new file mode 100644 index 0000000000000000000000000000000000000000..aac633f952e67956d810ea2e312530c84c664885 --- /dev/null +++ b/docs/source/installation.rst @@ -0,0 +1,55 @@ +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. diff --git a/docs/source/modules.rst b/docs/source/modules.rst deleted file mode 100644 index dd354c8698ea6d990ff1b421ad0822ef78a8bb65..0000000000000000000000000000000000000000 --- a/docs/source/modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -plotid -====== - -.. toctree:: - :maxdepth: 4 - - plotid diff --git a/docs/source/plotid.rst b/docs/source/plotid.rst deleted file mode 100644 index 005afcdb7f40bef97789edbedf0d42196589d5b4..0000000000000000000000000000000000000000 --- a/docs/source/plotid.rst +++ /dev/null @@ -1,85 +0,0 @@ -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: diff --git a/docs/source/readme_link.md b/docs/source/readme_link.md new file mode 100644 index 0000000000000000000000000000000000000000..4bae9f3fd2d9f5dc887a61d6b0964f73c429c3d9 --- /dev/null +++ b/docs/source/readme_link.md @@ -0,0 +1,4 @@ +```{include} ../../README.md +:relative-docs: docs/ +:relative-images: +``` \ No newline at end of file diff --git a/docs/source/readme_link.rst b/docs/source/readme_link.rst deleted file mode 100644 index 5b96f4d2576abcb33c94a270826d2c3ae6a6d0bd..0000000000000000000000000000000000000000 --- a/docs/source/readme_link.rst +++ /dev/null @@ -1,5 +0,0 @@ -Readme File ------------ - -.. include:: ../../README.md - :parser: myst_parser.sphinx_ \ No newline at end of file diff --git a/docs/source/structure.rst b/docs/source/structure.rst index bef1bc936a5ea1273721f18010632d306f7ce504..932f3f41baccbcb2ffca3918e9652f3d4d459da9 100644 --- a/docs/source/structure.rst +++ b/docs/source/structure.rst @@ -1,5 +1,5 @@ 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: diff --git a/plotid/publish.py b/plotid/publish.py index d10d0223c6c23c259363fe5a147502aa31b5a99c..9c2c5114443d132b191ca0c73a44dad3eb779b79 100644 --- a/plotid/publish.py +++ b/plotid/publish.py @@ -245,7 +245,7 @@ def publish(figs_and_ids, src_datapath, dst_path, plot_name, **kwargs): Path to data that should be published. dst_path : str Path to the destination directory. - plot_name : str or list of str + plot_name : str or list of str Name for the exported plot. **kwargs : dict, optional Extra arguments for additional publish options.