Skip to content

Commit

Permalink
Merge pull request #22 from MobilityDB/documentation
Browse files Browse the repository at this point in the history
Documentation + tests3.

Add tests for many classes.
Add new documentation structure.
Synchronize with MEOS.
  • Loading branch information
Diviloper committed Oct 10, 2023
2 parents 0d9610c + 48b416a commit 6cc042d
Show file tree
Hide file tree
Showing 115 changed files with 16,568 additions and 8,291 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
Pipfile.lock
*-checkpoint.ipynb
docs/_build
12 changes: 12 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
build:
os: "ubuntu-20.04"
tools:
python: "3.10"

python:
install:
- requirements: docs/requirements.txt

sphinx:
configuration: docs/conf.py
File renamed without changes.
12 changes: 6 additions & 6 deletions pymeos/docs/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@
project = 'PyMEOS'
copyright = '2023, Víctor Diví'
author = 'Víctor Diví'
release = '1.1.2'
release = '1.1.3a5'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

sys.path.insert(0, os.path.abspath('../pymeos_cffi'))
sys.path.insert(0, os.path.abspath('../pymeos'))

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.intersphinx'
'sphinx.ext.intersphinx',
]

templates_path = ['_templates']
Expand All @@ -29,17 +31,15 @@

# -- Intersphinx config --------
intersphinx_mapping = {
'spans': ('https://runfalk.github.io/spans/', None),
'asyncpg': ('https://magicstack.github.io/asyncpg/current/', None),
'psycopg': ('https://www.psycopg.org/psycopg3/docs/', None),
'psycopg2': ('https://www.psycopg.org/docs/', None),
'shapely': ('https://shapely.readthedocs.io/en/stable/', None),
'python': ('https://docs.python.org/3', None)
}


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_theme = 'sphinx_book_theme'
html_static_path = ['_static']
File renamed without changes
File renamed without changes
File renamed without changes
66 changes: 66 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
.. PyMEOS documentation master file, created by
sphinx-quickstart on Thu Oct 5 18:26:38 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
=======
PyMEOS
=======

`MEOS (Mobility Engine, Open Source) <https://www.libmeos.org/>`__ is a
C library which enables the manipulation of temporal and spatio-temporal
data based on `MobilityDB <https://mobilitydb.com/>`__\ ’s data types
and functions.

PyMEOS is a library built on top of MEOS that provides all of its
functionality wrapped in a set of Python classes.

Requirements
============

PyMEOS 1.1 requires

* Python >=3.7
* MEOS >=1.1

Installing PyMEOS
==================

We recommend installing PyMEOS using one of the available built
distributions using ``pip``:

.. code-block:: console
$ pip install pymeos
See the `installation documentation <https://pymeos.readthedocs.io/en/latest/src/installation.html>`__
for more details and advanced installation instructions.

.. toctree::
:caption: User Guide
:hidden:

src/installation
src/manual
src/examples


.. toctree::
:caption: API Reference
:hidden:

src/api/pymeos.meos_init
src/api/pymeos.collections
src/api/pymeos.temporal
src/api/pymeos.main
src/api/pymeos.boxes
src/api/pymeos.aggregators
src/api/pymeos.plotters
src/api/pymeos.db

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
File renamed without changes.
10 changes: 10 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
python-dateutil
shapely
pymeos_cffi==1.1.0a6
asyncpg
psycopg
psycopg2
matplotlib
geopandas
sphinx
sphinx-book-theme
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions docs/src/api/pymeos.collections.base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Base Abstract Collections
===================

Set
-------------------------------

.. automodule:: pymeos.collections.base.set
:members:
:undoc-members:
:show-inheritance:

Span
-------------------------

.. automodule:: pymeos.collections.base.span
:members:
:undoc-members:
:show-inheritance:

SpanSet
----------------------------

.. automodule:: pymeos.collections.base.spanset
:members:
:undoc-members:
:show-inheritance:
53 changes: 53 additions & 0 deletions docs/src/api/pymeos.collections.numeric.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Numeric Collections
===================

IntSet
-----------------------

.. automodule:: pymeos.collections.number.intset
:members:
:undoc-members:
:show-inheritance:


FloatSet
-----------------------

.. automodule:: pymeos.collections.number.floatset
:members:
:undoc-members:
:show-inheritance:

IntSpan
-----------------------

.. automodule:: pymeos.collections.number.intspan
:members:
:undoc-members:
:show-inheritance:


FloatSpan
-----------------------

.. automodule:: pymeos.collections.number.floatspan
:members:
:undoc-members:
:show-inheritance:

IntSpanSet
-----------------------

.. automodule:: pymeos.collections.number.intspanset
:members:
:undoc-members:
:show-inheritance:


FloatSpanSet
-----------------------

.. automodule:: pymeos.collections.number.floatspanset
:members:
:undoc-members:
:show-inheritance:
13 changes: 13 additions & 0 deletions docs/src/api/pymeos.collections.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Collections
===================


.. toctree::
:maxdepth: 2

pymeos.collections.base
pymeos.collections.time
pymeos.collections.spatial
pymeos.collections.numeric
pymeos.collections.text

29 changes: 29 additions & 0 deletions docs/src/api/pymeos.collections.spatial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Spatial Collections
===================


GeoSet
-----------------------

.. autoclass:: pymeos.collections.geo.geoset.GeoSet
:members:
:undoc-members:
:show-inheritance:


GeometrySet
-----------------------

.. autoclass:: pymeos.collections.geo.geoset.GeometrySet
:members:
:undoc-members:
:show-inheritance:


GeographySet
-----------------------

.. autoclass:: pymeos.collections.geo.geoset.GeographySet
:members:
:undoc-members:
:show-inheritance:
10 changes: 10 additions & 0 deletions docs/src/api/pymeos.collections.text.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Text Collections
===================

TextSet
-------------------------------

.. automodule:: pymeos.collections.text.textset
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
Time
Time Collections
===================

Time
-----------------------

.. automodule:: pymeos.time.time
.. automodule:: pymeos.collections.time.time
:members:
:undoc-members:
:show-inheritance:

Period
-------------------------
TimestampSet
-------------------------------

.. automodule:: pymeos.time.period
.. automodule:: pymeos.collections.time.timestampset
:members:
:undoc-members:
:show-inheritance:

PeriodSet
----------------------------
Period
-------------------------

.. automodule:: pymeos.time.periodset
.. automodule:: pymeos.collections.time.period
:members:
:undoc-members:
:show-inheritance:

TimestampSet
-------------------------------
PeriodSet
----------------------------

.. automodule:: pymeos.time.timestampset
.. automodule:: pymeos.collections.time.periodset
:members:
:undoc-members:
:show-inheritance:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/src/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Examples
====================

Section under construction. However, you can check the existing examples available in the
`PyMEOS repository <https://github.com/MobilityDB/PyMEOS>`__ and the
`PyMEOS-Demo repository <https://github.com/Diviloper/PyMEOS-demo>`__.
Loading

0 comments on commit 6cc042d

Please sign in to comment.