17 Commits

Author SHA1 Message Date
Marcel Nijenhof
664b215f16 Verplaatsen test directory
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-03 18:32:08 +01:00
Marcel Nijenhof
5fe756ce97 Small corrections setup.cfg 2022-01-03 18:14:40 +01:00
Marcel Nijenhof
bf28862f1f Update README: install via pypi 2022-01-03 18:03:03 +01:00
Marcel Nijenhof
fe29441d1d Versie update
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-02 23:50:13 +01:00
Marcel Nijenhof
d0043f3f18 Upload pypi test
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-02 23:45:44 +01:00
Marcel Nijenhof
583997d64c Versie update
All checks were successful
continuous-integration/drone/push Build is passing
2021-12-31 23:18:45 +01:00
Marcel Nijenhof
04daf49b0a Update drone voor verplaatsing files
Some checks failed
continuous-integration/drone/push Build is failing
2021-12-31 23:16:26 +01:00
Marcel Nijenhof
b19f5d9049 Merge branch 'master' of https://git.marceln.org/Werk/lmwsip
Some checks failed
continuous-integration/drone/push Build is failing
2021-12-31 22:56:23 +01:00
Marcel Nijenhof
2052bfd2cc Verplaatse files. 2021-12-31 22:56:01 +01:00
Marcel Nijenhof
418d3e6041 Correctie pre-commit hoek 2021-12-31 22:54:49 +01:00
Marcel Nijenhof
08cd160713 Lokale test omgeschreven naar tox
Some checks failed
continuous-integration/drone/push Build is failing
2021-12-31 22:42:04 +01:00
Marcel Nijenhof
da80bd93d9 Files verwijderd uit oorspronkelijke dir. 2021-12-31 22:25:43 +01:00
Marcel Nijenhof
61997df1f3 Build weer werkend gemaakt.
Some checks failed
continuous-integration/drone/push Build is failing
2021-12-31 22:18:17 +01:00
Marcel Nijenhof
047bb783b7 Versie update
Some checks failed
continuous-integration/drone/push Build is failing
2021-12-29 15:14:53 +01:00
Marcel Nijenhof
281bbfdac4 Correctie setup.cfg voor upload pypi 2021-12-28 22:47:03 +01:00
Marcel Nijenhof
bcd761653f Aanpassing precommit hoek op setup.cfg 2021-12-28 22:27:42 +01:00
Marcel Nijenhof
f521992f58 pyproject.toml & setup.cfg toegevoegd 2021-12-28 22:22:39 +01:00
12 changed files with 70 additions and 56 deletions

View File

@@ -10,10 +10,8 @@ platform:
steps: steps:
- name: Run unit test - name: Run unit test
environment:
PYTHONPATH: .
commands: commands:
- python3 setup.py test - python3 tests/main.py
--- ---
kind: pipeline kind: pipeline
@@ -27,10 +25,8 @@ platform:
steps: steps:
- name: Run unit test - name: Run unit test
environment:
PYTHONPATH: .
commands: commands:
- python3 setup.py test - python3 tests/main.py
--- ---
kind: pipeline kind: pipeline
@@ -44,10 +40,8 @@ platform:
steps: steps:
- name: Run unit test - name: Run unit test
environment:
PYTHONPATH: .
commands: commands:
- python3 setup.py test - python3 tests/main.py
--- ---
kind: pipeline kind: pipeline
@@ -64,7 +58,7 @@ steps:
environment: environment:
PYTHONPATH: . PYTHONPATH: .
commands: commands:
- python3 setup.py test - tox
--- ---
kind: pipeline kind: pipeline
@@ -74,11 +68,9 @@ name: docker_python:3.6
steps: steps:
- name: Run unit test - name: Run unit test
image: python:3.6 image: python:3.6
environment:
PYTHONPATH: .
commands: commands:
- pip install python-dateutil - pip install python-dateutil
- python setup.py test - tests/main.py
--- ---
kind: pipeline kind: pipeline
@@ -88,12 +80,10 @@ name: docker_python:latest
steps: steps:
- name: Run unit test - name: Run unit test
image: python:latest image: python:latest
environment:
PYTHONPATH: .
commands: commands:
- pip install python-dateutil - pip install python-dateutil
- python --version - python --version
- python setup.py test - python tests/main.py
--- ---
kind: pipeline kind: pipeline
@@ -108,8 +98,10 @@ platform:
steps: steps:
- name: Build package files - name: Build package files
commands: commands:
- python3 setup.py sdist bdist_wheel - python3 -m build
- name: Run final test after build
commands:
- tox
- name: Versie toevoegen aan download - name: Versie toevoegen aan download
environment: environment:
DOWNLOADDIR: /usr/share/nginx/html/download/python/lmwsip DOWNLOADDIR: /usr/share/nginx/html/download/python/lmwsip
@@ -128,6 +120,14 @@ steps:
fi fi
done done
- ls -l "$${DOWNLOADDIR}" - ls -l "$${DOWNLOADDIR}"
- name: Versie upload naar pypi test
environment:
TWINE_USERNAME:
from_secret: twine_username
TWINE_PASSWORD:
from_secret: twine_password
commands:
- python3 -m twine upload --repository testpypi dist/*
when: when:
branch: branch:
- master - master
@@ -150,14 +150,14 @@ steps:
image: python:3.6 image: python:3.6
# Make sure we run the pip installed version # Make sure we run the pip installed version
commands: commands:
- rm -rf lmwsip - rm -rf src
- pip install --extra-index-url https://marceln.org/download/python lmwsip - pip install --extra-index-url https://marceln.org/download/python lmwsip
- python -c "import lmwsip" - python -c "import lmwsip"
- python -c "import lmwsip; print(lmwsip.__version__)" - python -c "import lmwsip; print(lmwsip.__version__)"
- > - >
[ $(python -c "import lmwsip; print(lmwsip.__version__)") = [ $(python -c "import lmwsip; print(lmwsip.__version__)") =
$(python setup.py --version) ] $(python setup.py --version) ]
- python -m unittest -v lmwsip.tests - python tests/main.py
when: when:
branch: branch:
- master - master

1
.gitignore vendored
View File

@@ -7,3 +7,4 @@ lmwsip_marceln.egg-info
test/__pycache__ test/__pycache__
lmwsip.egg-info lmwsip.egg-info
*.swp *.swp
.tox

View File

@@ -12,12 +12,10 @@ how to use it.
## Installing ## Installing
The package is not available on [PyPI](https://pypi.org/). Just install the package with 'pip':
At the moment the package is hosted at https://marceln.org/download/python.
You can install the package with pip:
``` ```
pip install --extra-index-url https://marceln.org/download/python lmwsip pip install lmwsip
``` ```
## Examples ## Examples

View File

@@ -2,9 +2,9 @@
set -e set -e
VERSION=$(grep version setup.py | sed -e 's/.*="//' -e 's/",//') VERSION=$(grep version setup.cfg | sed 's/.*= *//')
sed -i "s/^__version__ = .*/__version__ = '${VERSION}'/" lmwsip/__init__.py sed -i "s/^__version__ = .*/__version__ = '${VERSION}'/" src/lmwsip/__init__.py
git add lmwsip/__init__.py git add src/lmwsip/__init__.py
python setup.py test tox
yamllint .drone.yml yamllint .drone.yml

6
pyproject.toml Normal file
View File

@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"

25
setup.cfg Normal file
View File

@@ -0,0 +1,25 @@
[metadata]
name = lmwsip
version = 0.9.4
author = Marcel Nijenhof
author_email = pypi@marceln.org
description = Interface for the lmw sip protocol
long_description = file: README.md
long_description_content_type = text/markdown
url = https://git.marceln.org/Werk/lmwsip
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Development Status :: 4 - Beta
[options]
package_dir =
= src
install_requires =
python-dateutil
packages = find:
python_requires = >= 3.6
[options.packages.find]
where = src

View File

@@ -1,26 +1,4 @@
import setuptools from setuptools import setup
with open("README.md", "r") as fh: if __name__ == "__main__":
long_description = fh.read() setup()
setuptools.setup(
name="lmwsip", # Replace with your own username
version="0.9.0",
author="Marcel Nijenhof",
author_email="pip@marceln.org",
description="Interface for the lmw sip protocol",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://marceln.org/git/Werk/lmwsip",
packages=setuptools.find_packages(),
install_requires=[
'python-dateutil'
],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Lmw sip interface"
],
python_requires='>=3.6',
)

View File

@@ -12,7 +12,7 @@ from datetime import datetime, timedelta
from dateutil import tz from dateutil import tz
""" Version info changed by git hook """ """ Version info changed by git hook """
__version__ = '0.9.0' __version__ = '0.9.4'
class LmwSip: class LmwSip:
"""Class to connect to the LMW Standard Interface prototcol (sip) """Class to connect to the LMW Standard Interface prototcol (sip)

View File

@@ -4,10 +4,10 @@ import sys
import io import io
import unittest import unittest
import lmwsip import lmwsip
import lmwsip.tests.stubSipServer import stubSipServer
import logging import logging
from lmwsip.tests.stubSipServer import sipServer from stubSipServer import sipServer
from lmwsip.run import run from lmwsip.run import run
from datetime import datetime, timedelta from datetime import datetime, timedelta
from dateutil import tz from dateutil import tz

6
tox.ini Normal file
View File

@@ -0,0 +1,6 @@
[tox]
envlist = py36,py37,py38,py310
[testenv]
deps = python-dateutil
commands = python tests/main.py