README.md 1.64 KB
Newer Older
 Lukas Eller's avatar
Lukas Eller committed
1 2
# Measurement Processor

 Lukas Eller's avatar
Lukas Eller committed
3
**Meas**urement**Process**or
 Lukas Eller's avatar
Lukas Eller committed
4

 Lukas Eller's avatar
Lukas Eller committed
5
Collection of different measurement processors --- especially with regards to geospatial data
 Lukas Eller's avatar
Lukas Eller committed
6

 Lukas Eller's avatar
Lukas Eller committed
7 8 9 10
# Installation

Either clone the repo directly or use pip install.

11
`pip install git+<https-link>`
 Lukas Eller's avatar
Lukas Eller committed
12

13
Make sure to replace `<https-link>` with the correct URL.
 Lukas Eller's avatar
Lukas Eller committed
14

15
# Requirements
 Lukas Eller's avatar
Lukas Eller committed
16

 Lukas Eller's avatar
Lukas Eller committed
17
To install all necessary requirements use:
 Lukas Eller's avatar
Lukas Eller committed
18 19 20 21 22

`pip install -r requirements.txt`

`conda install -r requirements.txt`

 Lukas Eller's avatar
Lukas Eller committed
23 24
# Testing

25
To run all available unit-tests:
 Lukas Eller's avatar
Lukas Eller committed
26

27 28 29 30 31
`python -m pytest tests`

to also output stdout use:

`python -m pytest -s tests`
Lukas Eller's avatar
Lukas Eller committed
32 33 34 35

Alternatively you can directly call individual test modules. For instance:

`python -m  pytest -s tests/overpy_series_test.py`
 Lukas Eller's avatar
Lukas Eller committed
36

 Lukas Eller's avatar
Lukas Eller committed
37
# Coding Guidlines
 Lukas Eller's avatar
Lukas Eller committed
38

 Lukas Eller's avatar
Lukas Eller committed
39
**General**
 Lukas Eller's avatar
Lukas Eller committed
40 41
*  Use [type hints](https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html) for parameters and return values for each function you implement
*  Each module should have basic [unit tests](https://realpython.com/python-testing/) so that we can catch coding errors before we push changes
 Lukas Eller's avatar
Lukas Eller committed
42 43
*  Each function and class should include a [docstring](https://realpython.com/documenting-python-code/#documenting-your-python-code-base-using-docstrings) 

 Lukas Eller's avatar
Lukas Eller committed
44
**Good Practices**
 Lukas Eller's avatar
Lukas Eller committed
45
*  Common pittfalls --- for instance wrong EPSG --- should be handled via [warnings](https://docs.python.org/3/library/warnings.html) or exceptions so that errors are not introduced silently
 Lukas Eller's avatar
Lukas Eller committed
46 47
*  Whenever we are dealing with coordinates, we try to use [geopandas.GeoSeries](https://geopandas.org/reference/geopandas.GeoSeries.html) so that the projection is handled explicitly
*  Use progress bars such as [tqdm](https://tqdm.github.io/) for jobs which take a considerable amount of time