Merge branch 'master' of https://git.marceln.org/Werk/lmwsip
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Marcel Nijenhof
2021-08-30 16:26:01 +02:00
2 changed files with 17 additions and 29 deletions

View File

@@ -6,7 +6,8 @@ lmwsip is a python library for the lmw sip protocol.
## Package ## Package
The lmwsip package contains the class LmwSip to connect to the The lmwsip package contains the class LmwSip to connect to the
LMW meetnet using de SIP protocol. The library contains documentation [LMW](https://waterberichtgeving.rws.nl/water-en-weer/metingen/lmw-info)
meetnet using de SIP protocol. The library contains documentation
how to use it. how to use it.
## Installing ## Installing
@@ -19,32 +20,15 @@ You can install the package with pip:
pip install --extra-index-url https://marceln.org/download/python lmwsip pip install --extra-index-url https://marceln.org/download/python lmwsip
``` ```
## Tools ## Examples
### lmwsip-test
A small test program containing some functions to test the library. ### Username password
### siprun All examples contain "USER", "PASS".
A prgram to run SIP command files.
See "siprun -H" for usage information.
#### hoek-h10.sip
A sample sip command file to request the waterlevel at hoek van holland
from the last hour
## Username password
All files contain "USER", "PASS".
These values should be replaced by real credentials. These values should be replaced by real credentials.
Otherwise the connection fails. Otherwise the connection fails.
## Examples ### Use send (low level)
### Library
#### Use send (low level)
``` python ``` python
from lmwsip import LmwSip from lmwsip import LmwSip
@@ -94,12 +78,16 @@ $ python -m lmwsip.run /tmp/hoek-h10.sip
< [! ] < [! ]
``` ```
### Git pre commit hook ## Unit tests
Er is een git pre-commit hook aanwezig in "githooks". Deze moet geactiveerd The code containts a python unittest.
worden door hem te symlinken naar .git/hooks.
Deze git hook verzorgt een versie nummer en een syntax check voor commit. This code runs a dummy sip server and runs a number of test against the dummy
server.
Het versie nummer komt uit de setup.py en word in de module geplaats als ## Git pre commit hook
`__version__`.
There is a pre-commit `githooks/pre-commit' with two functions:
* Updating the `__version__` in the module from setup.py
* Running the unit test code.
* Running a syntaxt test.

View File

@@ -7,7 +7,7 @@ setuptools.setup(
name="lmwsip", # Replace with your own username name="lmwsip", # Replace with your own username
version="0.1.6", version="0.1.6",
author="Marcel Nijenhof", author="Marcel Nijenhof",
author_email="pip@pion.xs4all.nl", author_email="pip@marceln.org",
description="Interface for the lmw sip protocol", description="Interface for the lmw sip protocol",
long_description=long_description, long_description=long_description,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",