Skip to content

Commit

Permalink
documentation initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed Oct 29, 2023
1 parent b9c34d6 commit 5cc649d
Show file tree
Hide file tree
Showing 14 changed files with 252 additions and 19 deletions.
23 changes: 23 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
---
# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

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

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
...
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Introduction
============

.. inclusion-marker-do-not-remove
PyGeoIf provides a `GeoJSON-like protocol <https://gist.github.com/2217756>`_ for geo-spatial (GIS) vector data.

Other Python programs and packages that you may have heard of already
Expand Down
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions docs/LICENSE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

License
=======

Copyright (C) 2012 - 2023 Christian Ledermann

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License (LGPL_) as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License (LGPL_) for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

.. _LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.0.en.html
19 changes: 0 additions & 19 deletions docs/LICENSE.txt

This file was deleted.

20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
42 changes: 42 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# noqa: D100, INP001
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "pygeoif"
copyright = "2023, Christian Ledermann" # noqa: A001
author = "Christian Ledermann"
release = "1.2"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.duration",
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
]

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


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

html_theme = "alabaster"
html_static_path = ["_static"]
try:
import sphinx_rtd_theme

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
pass

autodoc_member_order = "bysource"
24 changes: 24 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. pygeoif documentation master file, created by
sphinx-quickstart on Sun Oct 29 13:56:59 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to pygeoif's documentation!
===================================

.. toctree::
:maxdepth: 2
:caption: Contents:

overview
modules
HISTORY
CONTRIBUTORS
LICENSE

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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
10 changes: 10 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
API Reference
=============

.. toctree::
:maxdepth: 4

pygeoif

.. autosummary::
:toctree: generated
5 changes: 5 additions & 0 deletions docs/overview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Overview
=========

.. include:: ../README.rst
:start-after: inclusion-marker-do-not-remove
67 changes: 67 additions & 0 deletions docs/pygeoif.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
pygeoif
=======


Module contents
---------------


Submodules
----------

pygeoif.geometry module
-----------------------

.. automodule:: pygeoif.geometry
:members:
:member-order: bysource
:undoc-members:
:show-inheritance:

pygeoif.feature module
----------------------

.. automodule:: pygeoif.feature
:members:
:undoc-members:
:show-inheritance:

pygeoif.factories module
------------------------

.. automodule:: pygeoif.factories
:members:
:undoc-members:
:show-inheritance:

pygeoif.functions module
------------------------

.. automodule:: pygeoif.functions
:members:
:undoc-members:
:show-inheritance:

pygeoif.exceptions module
-------------------------

.. automodule:: pygeoif.exceptions
:members:
:undoc-members:
:show-inheritance:

pygeoif.types module
--------------------

.. automodule:: pygeoif.types
:members:
:undoc-members:
:show-inheritance:

pygeoif.about module
--------------------

.. automodule:: pygeoif.about
:members:
:undoc-members:
:special-members: __version__
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx
sphinx-autodoc-typehints
sphinx-rtd-theme

0 comments on commit 5cc649d

Please sign in to comment.