Skip to content

Commit e06ac30

Browse files
committed
Set up GitHub Actions & remove QuickStart support
1 parent 96a7622 commit e06ac30

31 files changed

+288
-432
lines changed

.coveragerc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.coveralls.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/python-package.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: ["3.9", "3.10", "3.11"]
18+
primary-config: ["true", "false"]
19+
include:
20+
- python-version: "3.9"
21+
primary-config: "false"
22+
- python-version: "3.10"
23+
primary-config: "false"
24+
- python-version: "3.11"
25+
primary-config: "true"
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v3
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
- name: Install
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install .[dev] flake8
36+
- name: Lint with flake8
37+
run: |
38+
# stop the build if there are Python syntax errors or undefined names
39+
flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics
40+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
41+
flake8 src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
42+
- name: Test with pytest
43+
env:
44+
ONE_JOB_ONLY_TESTS: ${{secrets[matrix.primary-config]}}
45+
run: |
46+
pytest
47+
# If needed we can gate this step to only run on master
48+
# BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
49+
# if [[ "$BRANCH" == 'refs/heads/master' ]]; then
50+
# pytest
51+
# else
52+
# echo "Tests are only ran for pushes to master"
53+
# fi

.github/workflows/python-publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
deploy:
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up Python
26+
uses: actions/setup-python@v3
27+
with:
28+
python-version: '3.x'
29+
- name: Install
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install .[dev]
33+
- name: Build package
34+
run: python -m build
35+
- name: Publish package
36+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
37+
with:
38+
user: __token__
39+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ samples/deviceFactory/bin
2424
samples/*.exe
2525
samples/rbac-config.yaml
2626
test/.DS_Store
27+
/venv
28+
pandoc-*-amd64.deb
29+
README.rst

.tox.ini.swp

-12 KB
Binary file not shown.

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.PHONY: docs install test build clean
2+
3+
venv:
4+
python3 -m venv venv
5+
6+
clean:
7+
rm -rf venv
8+
9+
install: venv
10+
. venv/bin/activate && python -m pip install --editable .[dev]
11+
12+
test: venv
13+
. venv/bin/activate && pytest
14+
15+
build: venv
16+
rm README.rst
17+
. venv/bin/activate && python -m build
18+
19+
docs:
20+
cd docs && make html

README.md

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,59 @@
1-
# Python for IBM Watson IoT Platform
1+
Python for IBM Watson IoT Platform
2+
===============================================================================
23

3-
[![Build Status](https://travis-ci.org/ibm-watson-iot/iot-python.svg?branch=master)](https://travis-ci.org/ibm-watson-iot/iot-python)
4-
[![Coverage Status](https://coveralls.io/repos/github/ibm-watson-iot/iot-python/badge.svg?branch=master)](https://coveralls.io/github/ibm-watson-iot/iot-python?branch=master)
54
[![GitHub issues](https://img.shields.io/github/issues/ibm-watson-iot/iot-python.svg)](https://github.com/ibm-watson-iot/iot-python/issues)
65
[![GitHub](https://img.shields.io/github/license/ibm-watson-iot/iot-python.svg)](https://github.com/ibm-watson-iot/iot-python/blob/master/LICENSE)
76
[![PyPI](https://img.shields.io/pypi/v/wiotp-sdk.svg)](https://pypi.org/project/wiotp-sdk/)
7+
![Project Status](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11-blue)
88
[![Downloads](https://pepy.tech/badge/ibmiotf)](https://pepy.tech/project/ibmiotf)
99
[![Downloads](https://pepy.tech/badge/wiotp-sdk)](https://pepy.tech/project/wiotp-sdk)
1010
[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
1111

12-
Python module for interacting with the [IBM Watson IoT Platform](https://internetofthings.ibmcloud.com).
12+
Python module for interacting with **Maximo IoT** and **[IBM Watson IoT Platform](https://internetofthings.ibmcloud.com)**
1313

14-
- [Python 3.8](https://www.python.org/downloads/release/python-382/) (recommended)
15-
- Python 3.7
16-
- Python 3.6
14+
- Python 3.11
15+
- Python 3.10
16+
- Python 3.9
1717

18-
Note: As of version 0.12, versions of Python less than 3.6 are not officially supported. Compatability with older versions of Python is not guaranteed.
1918

20-
## Product Withdrawal Notice
19+
Product Withdrawal Notice
20+
-------------------------------------------------------------------------------
2121
Per the September 8, 2020 [announcement](https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?subtype=ca&infotype=an&appname=iSource&supplier=897&letternum=ENUS920-136#rprodnx) IBM Watson IoT Platform (5900-A0N) has been withdrawn from marketing effective **December 9, 2020**. As a result, updates to this project will be limited.
2222

2323

24-
## Dependencies
25-
24+
Dependencies
25+
-------------------------------------------------------------------------------
2626
- [paho-mqtt](https://pypi.python.org/pypi/paho-mqtt)
2727
- [iso8601](https://pypi.python.org/pypi/iso8601)
2828
- [pytz](https://pypi.python.org/pypi/pytz)
2929
- [requests](https://pypi.python.org/pypi/requests)
3030

3131

32-
## Installation
33-
32+
Installation
33+
-------------------------------------------------------------------------------
3434
Install the [latest version](https://pypi.org/project/wiotp-sdk/) of the library with pip
3535

3636
```
3737
# pip install wiotp-sdk
3838
```
3939

4040

41-
## Uninstall
42-
41+
Uninstall
42+
-------------------------------------------------------------------------------
4343
Uninstalling the module is simple.
4444

4545
```
4646
# pip uninstall wiotp-sdk
4747
```
4848

49-
## Legacy ibmiotf Module
50-
51-
Version `0.4.0` of the old [ibmiotf](https://pypi.python.org/pypi/ibmiotf) pre-release is still available, if you do not wish to upgrade to the new version, we have no plans to remove this from pypi at this time, however it will not be getting any updates.
52-
53-
54-
## Documentation
5549

50+
Documentation
51+
-------------------------------------------------------------------------------
5652
https://ibm-watson-iot.github.io/iot-python/
5753

5854

59-
## Supported Features
60-
55+
Supported Features
56+
-------------------------------------------------------------------------------
6157
- **Device Connectivity**: Connect your device(s) to Watson IoT Platform with ease using this library
6258
- **Gateway Connectivity**: Connect your gateway(s) to Watson IoT Platform with ease using this library
6359
- **Application connectivity**: Connect your application(s) to Watson IoT Platform with ease using this library
@@ -69,7 +65,3 @@ https://ibm-watson-iot.github.io/iot-python/
6965
- **Scalable Applications**: Supports load balancing of MQTT subscriptions over multiple application instances.
7066
- **Auto Reconnect**: All clients support automatic reconnect to the Platform in the event of a network interruption.
7167
- **Websockets**: Support device/gateway/application connectivity to Watson IoT Platform using WebSocket
72-
73-
74-
## Unsupported Features
75-
- **Client side Certificate based authentication**: [Client side Certificate based authentication](https://console.ng.bluemix.net/docs/services/IoT/reference/security/RM_security.html)n

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build-system]
2+
requires = [
3+
"setuptools",
4+
"pypandoc"
5+
]
6+
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy