Navigation Menu

Skip to content

Commit

Permalink
Add CI configuration and initial Sphinx docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roel Huybrechts committed Nov 15, 2017
1 parent 9737730 commit 3cbc0a5
Show file tree
Hide file tree
Showing 27 changed files with 1,325 additions and 46 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
@@ -0,0 +1,21 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.bat]
indent_style = tab
end_of_line = crlf

[LICENSE]
insert_final_newline = false

[Makefile]
indent_style = tab
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE.md
@@ -0,0 +1,15 @@
* PyDOV version:
* Python version:
* Operating System:

### Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

### What I Did

```
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
```
32 changes: 1 addition & 31 deletions .gitignore
Expand Up @@ -51,42 +51,12 @@ coverage.xml

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# IPython Notebook
.ipynb_checkpoints

# pyenv
# pyenv python configuration file
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject

# pycharm exclusion
.idea
34 changes: 34 additions & 0 deletions .travis.yml
@@ -0,0 +1,34 @@
# This file was autogenerated and will overwrite each time you run travis_pypi_setup.py
before-deploy:
- travis-sphinx --source=docs --outdir='docs/_build' --nowarn build
deploy:
- provider: pypi
distributions: sdist bdist_wheel
user: roel
password:
secure: !!binary |
WUpMV01FQzJoZUhudDVIQ1BEV1ZBRmlJSU5zaEFqWldjWU1pTktnVUwzOHdMR3FLZEFMbk43aWQr
RnFoajZqT2FtVnIrWHRVU1RKODlWYlpIM3dKc0gwNk1zZTN3MXRYR1V3eWxpNi9SRXNGMlBPQjJi
OW1sY0NWMURhS3FpMVRhVWVkZmkvaG5ESUN4T2Q4NFg2a3dTOU11cllZYjBtN0Q1WTBtNXVNVFVr
YUpKSEtVOEdNRDlqSE1PbU5wb3FKMFF4SXRnanNDZWQ5K2poSVBNVzc5a0F5N0NZaW91UGtyQ1Qz
SmtKWjBrNXErWVZBTVczNDgrd2hGK3l2cithbTFhbUJLbjI4SnRDSTlQeHAvMVB1SWZORHpyeDRB
MFZEbndDNVd5aUxYVjQxWlNZUkdWZGNRRXNJeWpMd293TStFYVp3WnR6YUEwZWpSc0p4YTNqcmlV
ZFQ2b2k0bXRvejF0L24yQ1ljc3dsV3plYmRUNGNIaHpZa01jdTdoWDNjTVVNMzk0RTc2bVlqS3ZT
T1NRbFNOUTYxMmg1RklIR0FWeGtmRW1iUXdjcmszeC94RmEwWWRZNVNybVdFTzVRRm9QVkJ5NmpF
L3hEQldiVE5qakxVaTBEeW1hWHpMUllqVnBHOExQVE8zQVRsMzNmZmhuYkJTZlI0cVBEZ2d3UDAr
aGNzNndkWUNJWU5HNXBrNHdRSGlGS2hSUk1TRnVDcWxzVmY4cEZCL3JVbWJFd1lTNVNoNDZoeCtp
TTc2aCtpZ1FMaDhPclZSTWRiMU1VV1RSVllMUzJsL0RpS05TN2NWOTkxZUdXOEFyWlBQZUlnRjA3
QXliMVYydFJhV1J6U3liZStWOGx3RXVGVE9QWFdQU2t3QXNEbWgxcGNMbnc0b1ZzYXpPcXZqTjQ9
true:
python: 2.7
repo: DOV-Vlaanderen/pydov
tags: true
install:
- pip install -U tox-travis
- pip install -U travis-sphinx
language: python
python:
- 3.6
- 3.5
- 2.7
script: tox
8 changes: 8 additions & 0 deletions HISTORY.rst
@@ -0,0 +1,8 @@
=======
History
=======

0.1.0 (2017-11-14)
------------------

* First development version.
12 changes: 12 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,12 @@
include AUTHORS.rst
include CONTRIBUTING.rst
include HISTORY.rst
include LICENSE
include README.rst
include requirements.txt

recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]

recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
32 changes: 32 additions & 0 deletions README.rst
@@ -0,0 +1,32 @@
=====
PyDOV
=====

A Python package to download data from Databank Ondergrond Vlaanderen (DOV).

* Free software: MIT license
* Documentation: https://pydov.readthedocs.io.

Introduction
------------

The pydov package is a community effort and everyone is welcome to contribute. It is hosted on `GitHub <https://github.com/DOV-Vlaanderen/pydov>`_ and development is coordinated by `Databank Ondergrond Vlaanderen (DOV) <https://dov.vlaanderen.be/dovweb/html/index.html>`_. DOV aggregates data about soil, subsoil and groundwater of Flanders and makes them publicly available. Interactive and human-readable extraction and querying of the data is provided by a `web application <https://www.dov.vlaanderen.be/portaal/?module=verkenner#ModulePage>`_\ , whereas the focus of this package is to support **machine-based** extraction and conversion of the data. The latter aims to support a set of complementary use cases, for example:

* integrate DOV data in larger data processing pipelines
* support the reproducibility and/or repeatability of research studies
* integrate the data in third-party applications

The machine-based availability of the data can potentially serve a diverse community of researchers, consultants, modelers, and students. As performant and proper functioning of DOV data processing is of interest to the variety of users, we believe that a community-based effort to develop and maintain these functionalities as an open source package provides the optimal development traject.

Scope of the package
--------------------

The ``pydov`` provides in the first place a convenient wrapper around the XML **export** of the `DOV Verkenner <https://www.dov.vlaanderen.be/portaal/?module=verkenner#ModulePage>`_ and related applications, in combination with the available `DOV WMS/WFS webservices <https://dov.vlaanderen.be/dovweb/html/services.html>`_. By combining the information of these web services, different data request use cases can be automated.

The central elements of the package are:


#. ``download`` class, i.e. extraction part: downloading data based on a single station or a list of stations; this part could be extended towards more powerful ``download_****`` function, e.g. ``download_from_boundingbox``\ , ``download_from_aquifer()``\ ,... These extension functions of the regular ``download`` will always require some additional service calls, but will end up having a list of stations and reuse the ``download`` function.
#. ``subset_*``\ , i.e. filter part: this should provide some straightforward functions to filter the downloaded data.
#. ``to_***``\ , i.e. conversion part: the data is stored or exported to a new file-format that could be useful for the user. ``to_csv``\ / ``to_excel`` are straight forward examples, but more advanced and domain-specific export functionalities are envisioned, e.g. ``to_modflow()``\ , ``to_menyanthes()``\ , ``to_swap()``

3 changes: 3 additions & 0 deletions docs/.gitignore
@@ -0,0 +1,3 @@
/pydov.rst
/pydov.*.rst
/modules.rst
177 changes: 177 additions & 0 deletions docs/Makefile
@@ -0,0 +1,177 @@
# Makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"

clean:
rm -rf $(BUILDDIR)/*

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."

json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."

htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."

qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pydov.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pydov.qhc"

devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/pydov"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pydov"
@echo "# devhelp"

epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."

latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."

man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."

info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."

changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."

pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
1 change: 1 addition & 0 deletions docs/authors.rst
@@ -0,0 +1 @@
.. include:: ../AUTHORS.rst

0 comments on commit 3cbc0a5

Please sign in to comment.