Compare commits
5 Commits
89aaa231fb
...
master
Author | SHA1 | Date | |
---|---|---|---|
aca95cc018 | |||
002e00f959 | |||
|
424e989681 | ||
|
67ddec8e0d | ||
|
2ea0a9c7fb |
174
.drone.yml
174
.drone.yml
@@ -1,174 +0,0 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: CentOS7_test
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
variant: CentOS7
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- python3 tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: CentOS8_test
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
variant: CentOS8
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- python3 tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: Ubuntu1804_test
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
variant: Ubuntu1804
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- python3 tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: Fedora_test
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
variant: Fedora
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
commands:
|
||||
- tox
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: docker_python:3.6
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
image: python:3.6
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- pip install python-dateutil flask requests numpy pyopenssl
|
||||
- python tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: docker_python:latest
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
image: python:latest
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- pip install python-dateutil flask flask requests numpy pyopenssl
|
||||
- python --version
|
||||
- python tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: Build
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
variant: Fedora
|
||||
|
||||
steps:
|
||||
- name: Build package files
|
||||
commands:
|
||||
- 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
|
||||
commands:
|
||||
- mkdir -p "$${DOWNLOADDIR}"
|
||||
- cd dist
|
||||
- |
|
||||
for f in *
|
||||
do
|
||||
if [ -f "$${DOWNLOADDIR}/$${f}" ]
|
||||
then
|
||||
echo version error
|
||||
exit 1
|
||||
else
|
||||
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
|
||||
|
||||
depends_on:
|
||||
- CentOS7_test
|
||||
- CentOS8_test
|
||||
- Ubuntu1804_test
|
||||
- Fedora_test
|
||||
- docker_python:latest
|
||||
- docker_python:3.6
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: installCheck
|
||||
|
||||
steps:
|
||||
- name: install Check
|
||||
image: python:3.6
|
||||
# Make sure we run the pip installed version
|
||||
commands:
|
||||
- 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 tests/main.py
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
depends_on:
|
||||
- Build
|
91
.gitea/workflows/build.yml
Normal file
91
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,91 @@
|
||||
---
|
||||
name: build
|
||||
on:
|
||||
- push
|
||||
|
||||
jobs:
|
||||
testFedoraBuilder:
|
||||
runs-on: fedora-builder
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Test
|
||||
run: tox
|
||||
testRockylinux8:
|
||||
runs-on: rockylinux8
|
||||
steps:
|
||||
- name: add ca
|
||||
run: |
|
||||
curl -o /etc/pki/ca-trust/source/anchors/ca-marceln.org.crt \
|
||||
https://marceln.org/ca-marceln.org.crt
|
||||
update-ca-trust
|
||||
- name: Update yum conf
|
||||
run: "/usr/bin/sed -i -e \
|
||||
's@#baseurl=http://dl.rockylinux.org/$contentdir@\
|
||||
baseurl=https://rock64.fritz.box/nluug/os/Linux/distr/rocky@' \
|
||||
-e 's@^mirrorlist=https@#mirrorlist=https@' \
|
||||
$(grep -l '#baseurl=http://dl.rockylinux.org/$contentdir' \
|
||||
/etc/yum.repos.d/*)"
|
||||
- name: Setup
|
||||
run: |
|
||||
dnf install -y git nodejs \
|
||||
python36 python38 python39 python3.11 python3.12 \
|
||||
python3.11-pip python3.12-pip
|
||||
pip-3 install tox
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Test
|
||||
run: tox -e py36,py38,py39,py311
|
||||
testRockylinux9:
|
||||
runs-on: rockylinux9
|
||||
steps:
|
||||
- name: add ca
|
||||
run: |
|
||||
curl -o /etc/pki/ca-trust/source/anchors/ca-marceln.org.crt \
|
||||
https://marceln.org/ca-marceln.org.crt
|
||||
update-ca-trust
|
||||
- name: Update yum conf
|
||||
run: "/usr/bin/sed -i -e \
|
||||
's@#baseurl=http://dl.rockylinux.org/$contentdir@\
|
||||
baseurl=https://rock64.fritz.box/nluug/os/Linux/distr/rocky@' \
|
||||
-e 's@^mirrorlist=https@#mirrorlist=https@' \
|
||||
$(grep -l '#baseurl=http://dl.rockylinux.org/$contentdir' \
|
||||
/etc/yum.repos.d/*)"
|
||||
- name: Setup
|
||||
run: |
|
||||
dnf install -y git nodejs \
|
||||
python39 python3.11 python3.12 \
|
||||
python3-pip python3.11-pip python3.12-pip
|
||||
pip-3 install tox
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Test
|
||||
run: tox -e py39,py311,py312
|
||||
testUbuntu22:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Setup
|
||||
run: |
|
||||
apt update
|
||||
apt install -y git nodejs python3 python3-pip tox
|
||||
pip
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Test
|
||||
run: tox -e py310
|
||||
buildAndPublish:
|
||||
needs: [testFedoraBuilder, testRocky8, testRocky9, testUbuntu22]
|
||||
runs-on: fedora-builder
|
||||
env:
|
||||
TWINE_USERNAME: $(( secrets.PYPI_USER ))
|
||||
TWINE_PASSWORD: $(( secrets.PYPI_PASSWORD ))
|
||||
if: gitea.ref_name == 'main'
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: python3 -m build
|
||||
- name: Test
|
||||
run: tox
|
||||
- name: Upload naar pypi
|
||||
run: python3 -m twine upload dist/*
|
@@ -24,12 +24,9 @@ inclusief:
|
||||
|
||||
## Installatie
|
||||
|
||||
De package is op dit moment nog niet beschikbaar via [PyPI](https://pypi.org/).
|
||||
De package is beschikbaar via https://marceln.org/download/python
|
||||
|
||||
Het installeren gaat via:
|
||||
```
|
||||
pip install --extra-index-url https://marceln.org/download/python ddOperApi
|
||||
pip ddOperApi
|
||||
```
|
||||
|
||||
## De inhoud van de git repository
|
||||
|
@@ -1,7 +1,10 @@
|
||||
#!/bin/sh -e
|
||||
VERSION=$(grep version setup.py | sed -e 's/.*="//' -e 's/",//')
|
||||
|
||||
yamllint .gitea/workflows/build.yml
|
||||
|
||||
VERSION=$(python setup.py --version)
|
||||
sed -i "s/^__version__ = .*/__version__ = '${VERSION}'/" src/ddOperApi/__init__.py
|
||||
|
||||
git add src/ddOperApi/__init__.py
|
||||
|
||||
tox
|
||||
yamllint .drone.yml
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = ddOperApi
|
||||
version = 0.9.0
|
||||
version = 0.9.3
|
||||
author = Marcel Nijenhof
|
||||
author_email = pypi@marceln.org
|
||||
description = Interface for the dd-oper protocol
|
||||
|
@@ -20,7 +20,7 @@ from datetime import datetime, timedelta
|
||||
from dateutil.parser import parse
|
||||
|
||||
""" Version info changed by git hook """
|
||||
__version__ = ''
|
||||
__version__ = '0.9.3'
|
||||
|
||||
class ddOperApi:
|
||||
"""
|
||||
|
Reference in New Issue
Block a user