Browse Source

Extended documentation

refactoring
Matthias Volk 7 years ago
parent
commit
89ed130335
  1. 6
      doc/source/advanced_topics.rst
  2. 17
      doc/source/api.rst
  3. 8
      doc/source/api/core.rst
  4. 7
      doc/source/api/dft.rst
  5. 7
      doc/source/api/exceptions.rst
  6. 7
      doc/source/api/info.rst
  7. 7
      doc/source/api/logic.rst
  8. 7
      doc/source/api/pars.rst
  9. 7
      doc/source/api/storage.rst
  10. 7
      doc/source/api/utility.rst
  11. 12
      doc/source/code_stormpy_logic.rst
  12. 11
      doc/source/code_stormpy_storage.rst
  13. 2
      doc/source/conf.py
  14. 3
      doc/source/contributors.rst
  15. 0
      doc/source/doc/building_models.rst
  16. 0
      doc/source/doc/reward_models.rst
  17. 0
      doc/source/doc/shortest_paths.rst
  18. 10
      doc/source/getting_started.rst
  19. 10
      doc/source/index.rst
  20. 60
      doc/source/installation.rst

6
doc/source/advanced_topics.rst

@ -8,6 +8,6 @@ This guide is a collection of examples meant to bridge the gap between the getti
:maxdepth: 2 :maxdepth: 2
:caption: Contents: :caption: Contents:
building_models
reward_models
shortest_paths
doc/building_models
doc/reward_models
doc/shortest_paths

17
doc/source/api.rst

@ -0,0 +1,17 @@
Stormpy API Reference
====================================
Work in progress!
.. toctree::
:maxdepth: 2
:caption: Modules:
api/core
api/info
api/exceptions
api/logic
api/storage
api/utility
api/dft
api/pars

8
doc/source/code_stormpy_core.rst → doc/source/api/core.rst

@ -5,11 +5,3 @@ Stormpy.core
:members: :members:
:undoc-members: :undoc-members:
:imported-members: :imported-members:
Core members
=========================
.. automodule:: stormpy.core
:members:
:undoc-members:

7
doc/source/api/dft.rst

@ -0,0 +1,7 @@
Stormpy.dft
**************************
.. automodule:: stormpy.dft
:members:
:undoc-members:
:imported-members:

7
doc/source/api/exceptions.rst

@ -0,0 +1,7 @@
Stormpy.exceptions
**************************
.. automodule:: stormpy.exceptions
:members:
:undoc-members:
:imported-members:

7
doc/source/api/info.rst

@ -0,0 +1,7 @@
Stormpy.info
**************************
.. automodule:: stormpy.info
:members:
:undoc-members:
:imported-members:

7
doc/source/api/logic.rst

@ -0,0 +1,7 @@
Stormpy.logic
**************************
.. automodule:: stormpy.logic
:members:
:undoc-members:
:imported-members:

7
doc/source/api/pars.rst

@ -0,0 +1,7 @@
Stormpy.pars
**************************
.. automodule:: stormpy.pars
:members:
:undoc-members:
:imported-members:

7
doc/source/api/storage.rst

@ -0,0 +1,7 @@
Stormpy.storage
**************************
.. automodule:: stormpy.storage
:members:
:undoc-members:
:imported-members:

7
doc/source/api/utility.rst

@ -0,0 +1,7 @@
Stormpy.utility
**************************
.. automodule:: stormpy.utility
:members:
:undoc-members:
:imported-members:

12
doc/source/code_stormpy_logic.rst

@ -1,12 +0,0 @@
Stormpy.logic
**************************
.. automodule:: stormpy
Members
=========================
.. automodule:: stormpy.logic.logic
:members:

11
doc/source/code_stormpy_storage.rst

@ -1,11 +0,0 @@
Stormpy.storage
**************************
.. automodule:: stormpy
Members
==============================
.. automodule:: stormpy.storage.storage
:members:

2
doc/source/conf.py

@ -56,7 +56,7 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = 'stormpy' project = 'stormpy'
copyright = '2016--2017 Moves RWTH Aachen'
copyright = '2016--2018 Moves RWTH Aachen'
author = 'Sebastian Junges, Matthias Volk' author = 'Sebastian Junges, Matthias Volk'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for

3
doc/source/contributors.rst

@ -2,7 +2,8 @@
Contributors Contributors
************** **************
Stormpy is an extension to `Storm <http://www.stormchecker.org/>`_. As a consequence, developers of Storm contributed significantly to the functionality offered by these Python bindings.
Stormpy is an extension to `Storm <http://www.stormchecker.org/>`_.
As a consequence, developers of Storm contributed significantly to the functionality offered by these Python bindings.
The bindings themselves have been developed by (lexicographically ordered): The bindings themselves have been developed by (lexicographically ordered):
* Sebastian Junges * Sebastian Junges

0
doc/source/building_models.rst → doc/source/doc/building_models.rst

0
doc/source/reward_models.rst → doc/source/doc/reward_models.rst

0
doc/source/shortest_paths.rst → doc/source/doc/shortest_paths.rst

10
doc/source/getting_started.rst

@ -11,15 +11,17 @@ This guide is intended for people which have a basic understanding of probabilis
`Storm website <http://www.stormchecker.org/>`_. `Storm website <http://www.stormchecker.org/>`_.
While we assume some very basic programming concepts, we refrain from using more advanced concepts of python throughout the guide. While we assume some very basic programming concepts, we refrain from using more advanced concepts of python throughout the guide.
We start with a selection of high-level constructs in stormpy, and go into more details afterwards. More in-depth examples can be found in the :doc:`advanced_examples`.
We start with a selection of high-level constructs in stormpy, and go into more details afterwards. More in-depth examples can be found in the :doc:`advanced_topics`.
.. seealso:: The code examples are also given in the `examples/ <https://github.com/moves-rwth/stormpy/blob/master/examples/>`_ folder. These boxes throughout the text will tell you which example contains the code discussed. .. seealso:: The code examples are also given in the `examples/ <https://github.com/moves-rwth/stormpy/blob/master/examples/>`_ folder. These boxes throughout the text will tell you which example contains the code discussed.
In order to do this, we import stormpy::
We start by launching the python 3 interpreter::
>>> import stormpy
>>> import stormpy.core
$ python3
First we import stormpy::
>>> import stormpy
Building models Building models
------------------------------------------------ ------------------------------------------------

10
doc/source/index.rst

@ -20,15 +20,7 @@ Stormpy is a set of python bindings for the probabilistic model checker `Storm <
contributors contributors
Stormpy API Reference
====================================
.. toctree::
:maxdepth: 2
:caption: Modules:
code_stormpy_core
code_stormpy_logic
code_stormpy_storage
.. include:: api.rst
Indices and tables Indices and tables

60
doc/source/installation.rst

@ -7,28 +7,46 @@ Requirements
Before installing stormpy, make sure Before installing stormpy, make sure
- `pycarl <https://moves-rwth.github.io/pycarl>`_
- `Storm <http://www.stormchecker.org/>`_
- Python 3 is available on your system. Stormpy does not work with python 2.
- `pycarl <https://moves-rwth.github.io/pycarl>`_ is available.
- `Storm <http://www.stormchecker.org/>`_ is available on your system.
are both available on your system. To avoid issues, we suggest that both use the same version of `carl <https://smtrat.github.io/carl>`_.
To avoid issues, we suggest that both pycarl and Storm use the same version of `carl <https://smtrat.github.io/carl>`_.
The simplest way of ensuring this is to first install carl as explained in the `Storm installation guide <http://www.stormchecker.org/documentation/installation/manual-configuration.html#carl>`_. The simplest way of ensuring this is to first install carl as explained in the `Storm installation guide <http://www.stormchecker.org/documentation/installation/manual-configuration.html#carl>`_.
You can then install Storm and pycarl independently. You can then install Storm and pycarl independently.
.. topic:: Virtual Environments
Virtual environments create isolated environments for your projects. This helps to keep your system clean, work with different versions of packages and different versions of python. While it is not required, we recommend the use of
such virtual environments. To get you started, we recommend `this guide <http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_ or `this primer <https://realpython.com/blog/python/python-virtual-environments-a-primer>`_.
Installation Steps Installation Steps
==================== ====================
Virtual Environments
--------------------
Virtual environments create isolated environments for your projects.
This helps to keep your system clean, work with different versions of packages and different version of python.
While it is not required, we recommend the use of such virtual environments. To get you started, we recommend
`this guide <http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_ or
`this primer <https://realpython.com/blog/python/python-virtual-environments-a-primer>`_.
In short you can create a virtual environment ``env`` with::
$ pip install virtualenv
$ virtualenv -p python3 env
$ source env/bin/activate
The last step activates the virtual environment.
Whenever using the environment the console prompt is prefixed with ``(env)``.
Building stormpy
----------------
Clone stormpy into any suitable location:: Clone stormpy into any suitable location::
$ git clone https://github.com/moves-rwth/stormpy.git $ git clone https://github.com/moves-rwth/stormpy.git
$ cd stormpy $ cd stormpy
Here, build stormpy in develop mode using your favourite python distribution way of installing: e.g.::
Build stormpy in develop mode using your favourite python distribution way of installing: e.g.::
$ python3 setup.py develop $ python3 setup.py develop
@ -37,17 +55,31 @@ or::
$ pip install -ve . $ pip install -ve .
.. topic:: Specifying which Storm library to use
Optional build arguments
^^^^^^^^^^^^^^^^^^^^^^^^
The build step also takes optional arguments for a more advanced configuration of stormpy.
* *Specifying which Storm library to use*
If you have multiple versions of Storm or cmake is not able to find your Storm version, If you have multiple versions of Storm or cmake is not able to find your Storm version,
you can specify the `--storm-dir YOUR-PATH-TO-STORM` flag in the build_ext step::
you can specify the ``--storm-dir YOUR-PATH-TO-STORM`` flag in the ``build_ext`` step::
$ python3 setup.py build_ext --storm-dir YOUR-PATH-TO-STORM develop $ python3 setup.py build_ext --storm-dir YOUR-PATH-TO-STORM develop
After building, you can run the test files by::
* *Building stormpy in debug mode*
py.test tests/
If you want to build stormpy in debug mode you can add the ``--debug`` flag in the ``build_ext`` step::
$ python3 setup.py build_ext --debug develop
If tests pass, you can continue with our :doc:`getting_started`.
Testing stormpy installation
----------------------------
After building, you can run the test files by::
py.test tests/
If the tests pass, you can now use stormpy.
To get started, continue with our :doc:`getting_started`, consult the test files in ``tests/`` or the :doc:`api` (work in progress).
Loading…
Cancel
Save