Skip to content

Commit

Permalink
RTD docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
caspervdw committed Jul 27, 2019
1 parent 6b79864 commit 51975ce
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 11 deletions.
22 changes: 22 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf

# Optionally set the version of Python and requirements required to build your docs
conda:
environment: docs/environment.yml
16 changes: 7 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,26 @@ PyGEOS
:alt: PyPI
:target: https://badge.fury.io/py/pygeos

This is a C/Python library that wraps geometry functions in GEOS in numpy ufuncs.
This project is still in a mock-up phase: the API will most likely change.

Pygeos is a C/Python library that implements vectorized versions of the
geometry functions from GEOS. By wrapping the GEOS operations in Numpy
"universal functions", pygeos provides a significant performance improvement
when working with large sets of geometries.

Why ufuncs?
-----------

A universal function (or ufunc for short) is a function that operates on
n-dimensional arrays in an element-by-element fashion, supporting array
broadcasting. The for-loops that are involved are fully implmemented in C,
broadcasting. The for-loops that are involved are fully implmemented in C
diminishing the overhead of the python interpreter.

Pygeos aims to expose the geometry functions from GEOS into python to provide
a fast and flexible means to work with large sets of geometries from python.


The Geometry object
-------------------

GEOS geometry objects are stored in a static attribute of the Python extension
type `pygeos.Geometry`. This keeps the python interpreter out of the ufunc
inner loop. The Geometry object keeps track of the underlying geometry and
inner loop. The Geometry object keeps track of the underlying GEOSGeometry and
allows the python garbage collector to free memory when the geometry is not
used anymore.

Expand All @@ -59,7 +57,7 @@ used anymore.
>>> geometry = Geometry.from_wkt("POINT (5.2 52.1)")
Or simply:
Or using one of the provided (vectorized) functions:

.. code:: python
Expand Down
61 changes: 61 additions & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: pygeos
channels:
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- alabaster=0.7.12=py37_0
- asn1crypto=0.24.0=py37_0
- babel=2.7.0=py_0
- blas=1.0=mkl
- ca-certificates=2019.5.15=0
- certifi=2019.6.16=py37_0
- cffi=1.12.3=py37h2e261b9_0
- chardet=3.0.4=py37_1
- cryptography=2.7=py37h1ba5d50_0
- docutils=0.14=py37_0
- geos=3.7.1=he6710b0_0
- idna=2.8=py37_0
- imagesize=1.1.0=py37_0
- intel-openmp=2019.4=243
- jinja2=2.10.1=py37_0
- libedit=3.1.20181209=hc058e9b_0
- libffi=3.2.1=hd88cf55_4
- libgcc-ng=9.1.0=hdf63c60_0
- libgfortran-ng=7.3.0=hdf63c60_0
- libstdcxx-ng=9.1.0=hdf63c60_0
- markupsafe=1.1.1=py37h7b6447c_0
- mkl=2019.4=243
- mkl_fft=1.0.12=py37ha843d7b_0
- mkl_random=1.0.2=py37hd81dba3_0
- ncurses=6.1=he6710b0_1
- numpy=1.16.4=py37h7e9f1db_0
- numpy-base=1.16.4=py37hde5b4d6_0
- numpydoc=0.9.1=py_0
- openssl=1.1.1c=h7b6447c_1
- packaging=19.0=py37_0
- pip=19.1.1=py37_0
- pycparser=2.19=py37_0
- pygments=2.4.2=py_0
- pyopenssl=19.0.0=py37_0
- pyparsing=2.4.0=py_0
- pysocks=1.7.0=py37_0
- python=3.7.3=h0371630_0
- pytz=2019.1=py_0
- readline=7.0=h7b6447c_5
- requests=2.22.0=py37_0
- setuptools=41.0.1=py37_0
- six=1.12.0=py37_0
- snowballstemmer=1.9.0=py_0
- sphinx=2.1.2=py_0
- sphinxcontrib-applehelp=1.0.1=py_0
- sphinxcontrib-devhelp=1.0.1=py_0
- sphinxcontrib-htmlhelp=1.0.2=py_0
- sphinxcontrib-jsmath=1.0.1=py_0
- sphinxcontrib-qthelp=1.0.2=py_0
- sphinxcontrib-serializinghtml=1.1.3=py_0
- sqlite=3.29.0=h7b6447c_0
- tk=8.6.8=hbc83047_0
- urllib3=1.24.2=py37_0
- wheel=0.33.4=py37_0
- xz=5.2.4=h14c3975_4
- zlib=1.2.11=h7b6447c_3
21 changes: 19 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,25 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to pygeos's documentation!
==================================
Welcome to pygeos's documentation
=================================

Pygeos is a C/Python library that implements vectorized versions of the
geometry functions from GEOS. By wrapping the GEOS operations in Numpy
"universal functions", pygeos provides a significant performance improvement
when working with large sets of geometries.

Why ufuncs?
-----------

A universal function (or ufunc for short) is a function that operates on
n-dimensional arrays in an element-by-element fashion, supporting array
broadcasting. The for-loops that are involved are fully implmemented in C
diminishing the overhead of the python interpreter.

.. note::
This documentation is still work in progress: only a part of the API has
been documented.

.. toctree::
:maxdepth: 2
Expand Down

0 comments on commit 51975ce

Please sign in to comment.