- Changed to setup.cfg - Changed to tox - Moved module dir to src - Moved tests dir from module to tests dir - Corrected .drone for changes - Update to 0.9.0
This commit is contained in:
49
.drone.yml
49
.drone.yml
@@ -11,9 +11,9 @@ platform:
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: .
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- python3 setup.py test
|
||||
- python3 tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@@ -28,9 +28,9 @@ platform:
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: .
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- python3 setup.py test
|
||||
- python3 tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@@ -45,9 +45,9 @@ platform:
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: .
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- python3 setup.py test
|
||||
- python3 tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@@ -62,9 +62,9 @@ platform:
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: .
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- python3 setup.py test
|
||||
- tox
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@@ -75,10 +75,10 @@ steps:
|
||||
- name: Run unit test
|
||||
image: python:3.6
|
||||
environment:
|
||||
PYTHONPATH: .
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- pip install python-dateutil flask
|
||||
- python setup.py test
|
||||
- python tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@@ -89,10 +89,11 @@ steps:
|
||||
- name: Run unit test
|
||||
image: python:latest
|
||||
environment:
|
||||
PYTHONPATH: .
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- pip install python-dateutil flask
|
||||
- python setup.py test
|
||||
- python --version
|
||||
- python tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@@ -107,7 +108,10 @@ platform:
|
||||
steps:
|
||||
- name: Build package files
|
||||
commands:
|
||||
- python3 setup.py sdist
|
||||
- python3 -m build
|
||||
- name: Run final test after build
|
||||
commands:
|
||||
- tox
|
||||
- name: Versie toevoegen aan download
|
||||
environment:
|
||||
DOWNLOADDIR: /usr/share/nginx/html/download/python/ddoperapi
|
||||
@@ -122,10 +126,18 @@ steps:
|
||||
echo version error
|
||||
exit 1
|
||||
else
|
||||
cp "$${f}" "$${DOWNLOADDIR}"
|
||||
cp "$${f}" "$${DOWNLOADDIR}";
|
||||
fi
|
||||
done
|
||||
- ls -l "$${DOWNLOADDIR}"
|
||||
- name: Versie upload naar pypi
|
||||
environment:
|
||||
TWINE_USERNAME:
|
||||
from_secret: twine_username
|
||||
TWINE_PASSWORD:
|
||||
from_secret: twine_password
|
||||
commands:
|
||||
- python3 -m twine upload dist/*
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
@@ -148,17 +160,14 @@ steps:
|
||||
image: python:3.6
|
||||
# Make sure we run the pip installed version
|
||||
commands:
|
||||
- rm -rf ddOperApi
|
||||
- pip install flask
|
||||
- >
|
||||
pip install --extra-index-url
|
||||
https://marceln.org/download/python ddOperApi
|
||||
- rm -rf src
|
||||
- pip install flask ddOperApi
|
||||
- python -c "import ddOperApi"
|
||||
- python -c "import ddOperApi; print(ddOperApi.__version__)"
|
||||
- >
|
||||
[ $(python -c "import ddOperApi; print(ddOperApi.__version__)") =
|
||||
$(python setup.py --version) ]
|
||||
- python -m unittest -v ddOperApi.tests
|
||||
- python tests/main.py
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,3 +7,4 @@ PKG-INFO
|
||||
requires.txt
|
||||
SOURCES.txt
|
||||
top_level.txt
|
||||
.tox
|
||||
|
21
LICENSE
21
LICENSE
@@ -1 +1,20 @@
|
||||
TODO
|
||||
Copyright (c) 2022 Rijkswaterstaat
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh -e
|
||||
VERSION=$(grep version setup.py | sed -e 's/.*="//' -e 's/",//')
|
||||
sed -i "s/^__version__ = .*/__version__ = '${VERSION}'/" ddOperApi/__init__.py
|
||||
git add ddOperApi/__init__.py
|
||||
sed -i "s/^__version__ = .*/__version__ = '${VERSION}'/" src/ddOperApi/__init__.py
|
||||
git add src/ddOperApi/__init__.py
|
||||
|
||||
python setup.py test
|
||||
yamllint .drone.yml
|
||||
|
28
setup.cfg
Normal file
28
setup.cfg
Normal file
@@ -0,0 +1,28 @@
|
||||
[metadata]
|
||||
name = ddOperApi
|
||||
version = 0.9.0
|
||||
author = Marcel Nijenhof
|
||||
author_email = pypi@marceln.org
|
||||
description = Interface for the dd-oper protocol
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
url = https://git.marceln.org/marceln/ddOperApi
|
||||
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
|
||||
requests
|
||||
numpy
|
||||
pyopenssl
|
||||
packages = find:
|
||||
python_requires = >= 3.6
|
||||
|
||||
[options.packages.find]
|
||||
where = src
|
31
setup.py
31
setup.py
@@ -1,29 +1,4 @@
|
||||
import setuptools
|
||||
from setuptools import setup
|
||||
|
||||
with open("README.md", "r") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setuptools.setup(
|
||||
name="ddOperApi", # Replace with your own username
|
||||
version="0.1.3",
|
||||
author="Marcel Nijenhof",
|
||||
author_email="pip@pion.xs4all.nl",
|
||||
description="Interface for dd-oper 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',
|
||||
'requests',
|
||||
'numpy',
|
||||
'pyopenssl'
|
||||
],
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: TODO",
|
||||
"Operating System :: OS Independent",
|
||||
"Topic :: dd-oper api"
|
||||
],
|
||||
python_requires='>=3.6',
|
||||
)
|
||||
if __name__ == "__main__":
|
||||
setup()
|
||||
|
@@ -20,7 +20,7 @@ from datetime import datetime, timedelta
|
||||
from dateutil.parser import parse
|
||||
|
||||
""" Version info changed by git hook """
|
||||
__version__ = '0.1.3'
|
||||
__version__ = ''
|
||||
|
||||
class ddOperApi:
|
||||
"""
|
@@ -3,7 +3,7 @@
|
||||
import unittest
|
||||
import ddOperApi
|
||||
from time import sleep
|
||||
from ddOperApi.tests.testServer import forkTestServer, stopTestServer
|
||||
from testServer import forkTestServer, stopTestServer
|
||||
|
||||
|
||||
class ddOperApiTest(unittest.TestCase):
|
Reference in New Issue
Block a user