From e9a65af74ddf0713f77b41c3a3dfe37a89d852f1 Mon Sep 17 00:00:00 2001 From: Marcel Nijenhof Date: Sun, 8 Aug 2021 13:46:35 +0200 Subject: [PATCH 1/3] Update README --- README.md | 50 +++++++++++++++++++------------------------------- setup.py | 2 +- 2 files changed, 20 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 61007d3..95533bb 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ lmwsip is a python library for the lmw sip protocol. ## Package 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. ## Installing @@ -16,35 +17,18 @@ At the moment the package is hosted at https://marceln.org/download/python. You can install the package with pip: ``` -pip install -i https://marceln.org/download/python lmwsip +pip install --extra-index-url https://marceln.org/download/python lmwsip ``` -## Tools -### lmwsip-test - -A small test program containing some functions to test the library. - -### siprun - -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. -Otherwise the connection fails. - ## Examples -### Library +### Username password -#### Use send (low level) +All examples contain "USER", "PASS". +These values should be replaced by real credentials. +Otherwise the connection fails. + +### Use send (low level) ``` python 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 -worden door hem te symlinken naar .git/hooks. +The code containts a python unittest. -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 -`__version__`. +## Git pre commit hook + +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. diff --git a/setup.py b/setup.py index a48a813..415a67d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as fh: setuptools.setup( name="lmwsip", # Replace with your own username - version="0.1.5", + version="0.1.6", author="Marcel Nijenhof", author_email="pip@pion.xs4all.nl", description="Interface for the lmw sip protocol", From 9bd1d668da6fa9825777ec84360594d3ffa44911 Mon Sep 17 00:00:00 2001 From: Marcel Nijenhof Date: Sun, 8 Aug 2021 13:50:27 +0200 Subject: [PATCH 2/3] Correctie git hook --- lmwsip/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmwsip/__init__.py b/lmwsip/__init__.py index 7616a99..0d275ae 100644 --- a/lmwsip/__init__.py +++ b/lmwsip/__init__.py @@ -12,7 +12,7 @@ from datetime import datetime, timedelta from dateutil import tz """ Version info changed by git hook """ -__version__ = '0.1.5' +__version__ = '0.1.6' class LmwSip: """Class to connect to the LMW Standard Interface prototcol (sip) From 7df03add426ac419df6c2974463eb04a428afb52 Mon Sep 17 00:00:00 2001 From: Marcel Nijenhof Date: Sun, 8 Aug 2021 14:25:39 +0200 Subject: [PATCH 3/3] Correctie email adres --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 415a67d..80d1cf3 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setuptools.setup( name="lmwsip", # Replace with your own username version="0.1.6", author="Marcel Nijenhof", - author_email="pip@pion.xs4all.nl", + author_email="pip@marceln.org", description="Interface for the lmw sip protocol", long_description=long_description, long_description_content_type="text/markdown",