README.md 1.53 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 11 12 13 14
# Installation

Either clone the repo directly or use pip install.

`pip install git+<ssh-link>`

Make sure to replace `<ssh-link>` with the correct URL.

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 46
*  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
*  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