Installation¶
Stable release¶
To install pydov, run this command in your terminal:
$ pip install pydov
This is the preferred method to install pydov, as it will always install the most recent stable release.
If you don’t have pip installed, this Python installation guide can guide you through the process.
Note
To be able to use vector files not defined as GML (for example ESRI Shape files), some additional dependencies are required which are not installed by default. One of the dependencies is Fiona, it is described as “GDAL’s neat and nimble vector API for Python programmers”. GDAL is a translator library for raster and vector geospatial data formats. Fiona is also required by GeoPandas. Combining these three packages, vector files like ESRI Shape files can be converted to GML files and used in spatial queries to DOV. To install the required dependencies to handle vector files, add the vectorfile option to the installation instruction:
pip install pydov[vectorfile]
Installing these package on Windows can be cumbersome. Please consult the installation guides of the
different packages. If you are using conda, pre-install them with conda install -c conda-forge fiona geopandas
in your pydov conda environment before running the pydov installation. If you are not using conda,
give the following a try:
Install pipwin using
pip install pipwin
Using pipwin, download the latest Windows binaries for GDAL, Fiona and GeoPandas provided by Christoph Gohlke:
From sources¶
The sources for pydov can be downloaded from the Github repo.
You can either clone the public repository:
$ git clone git://github.com/DOV-Vlaanderen/pydov
Or download the tarball:
$ curl -OL https://github.com/DOV-Vlaanderen/pydov/tarball/master
Once you have a copy of the source, you can install it with:
$ python setup.py install
For package contributors¶
Noticed a bug, want to improve the documentation? Great! Want to dive into the code directly on your local machine? Make sure to have the development environment setup:
Fork the project repository by clicking on the ‘Fork’ button near the top right of the page. This creates a copy of the code under your personal GitHub user account.
Clone the Github repo:
$ git clone git://github.com/YOUR-GITHUB-USERNAME/pydov
# using conda:
$ conda create -n pydov python=3.7
$ conda activate pydov
# or using venv (commands are OS dependent):
# linux users
$ python3 -m venv pydov/venv # linux users
$ source pydov/venv/bin/activate # linux users
# windows users
$ python3 -m venv pydov\venv # windows users
$ pydov\venv\Scripts\activate # windows users
The Python documentation on virtual environments provides more guidance on using a development environment.
From inside the “pydov” repository folder, install all development dependencies and the package in development mode:
$ pip install -e .[devs]
To build the documentation, make sure to also install pandoc as it is required by Sphinx, the tool used to generate the documentation website. See the pandoc installation instructions.
Note
If the sphinx-build
(or make html
) CLI command returns an error, try to reinstall sphinx separately in the environment using
pip install -U sphinx
.
Have a look at the development guidelines to see how we develop the pydov package and get more information on the workflow.