Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: arduino/arduino-iot-cloud-py
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.1
Choose a base ref
...
head repository: arduino/arduino-iot-cloud-py
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Sep 21, 2022

  1. Copy the full SHA
    3c91544 View commit details
  2. Bump version to v0.0.2.

    iabdalkader committed Sep 21, 2022
    Copy the full SHA
    c77bffb View commit details
  3. Copy the full SHA
    808c9ae View commit details
  4. Copy the full SHA
    b0b7008 View commit details
  5. Copy the full SHA
    b3bd566 View commit details
  6. Merge pull request #5 from bcmi-labs/rename_package

    all: Rename python package.
    iabdalkader authored Sep 21, 2022
    Copy the full SHA
    57cabc1 View commit details
  7. Copy the full SHA
    8fb2414 View commit details
  8. Merge pull request #6 from bcmi-labs/mp_cloud_fix

    ucloud: Fix set/get attr to work with MicroPython.
    iabdalkader authored Sep 21, 2022
    Copy the full SHA
    a792db4 View commit details

Commits on Sep 22, 2022

  1. Copy the full SHA
    ee3a75c View commit details
  2. Copy the full SHA
    6d59644 View commit details
  3. Merge pull request #7 from bcmi-labs/mp_fix

    ucloud: Fix set/get attr compatibility issue with CPython/MicroPython.
    iabdalkader authored Sep 22, 2022
    Copy the full SHA
    e0df7b1 View commit details
  4. ucloud: Simplify the build_dict and add_to_pack logic.

    * Add arg to set if records are added to a pack to be pushed to or updated
    from the cloud.
    * When adding records to be pushed to the cloud, only initialized records
    are added. When adding records to be updated from the cloud, uninitialized
    records are allowed to be initialized from the cloud.
    iabdalkader committed Sep 22, 2022
    Copy the full SHA
    030f950 View commit details
  5. Merge pull request #8 from bcmi-labs/add_to_pack

    ucloud: Simplify the build_dict and add_to_pack logic.
    iabdalkader authored Sep 22, 2022
    Copy the full SHA
    a83c58a View commit details
  6. ucloud: Fix default ssl_params value.

    * The ssl_params default value can't be None.
    iabdalkader committed Sep 22, 2022
    Copy the full SHA
    4fcd055 View commit details
  7. Merge pull request #9 from bcmi-labs/ssl_params_fix

    ucloud: Fix default ssl_params value.
    iabdalkader authored Sep 22, 2022
    Copy the full SHA
    1fd5139 View commit details

Commits on Sep 23, 2022

  1. Copy the full SHA
    42e80f1 View commit details
  2. Merge pull request #10 from bcmi-labs/cloudinit

    ucloud: Allow None sub-records in init values.
    iabdalkader authored Sep 23, 2022
    Copy the full SHA
    b500d96 View commit details
  3. Copy the full SHA
    816a86f View commit details
  4. Merge pull request #11 from bcmi-labs/logging_levels

    ucloud: Update logging messages and levels.
    iabdalkader authored Sep 23, 2022
    Copy the full SHA
    cae015d View commit details

Commits on Sep 24, 2022

  1. ucloud: Fix compatibility with MicroPython.

    * Fix AIOTObject set/get attr to work with both CPython and MicroPython.
    * Workaround uasyncio task not having an exception() function.
    iabdalkader committed Sep 24, 2022
    Copy the full SHA
    6262516 View commit details
  2. Merge pull request #12 from bcmi-labs/compat

    ucloud: Fix compatibility with MicroPython.
    iabdalkader authored Sep 24, 2022
    Copy the full SHA
    7e73472 View commit details

Commits on Sep 26, 2022

  1. Copy the full SHA
    4adc0ae View commit details
  2. Copy the full SHA
    1fee2af View commit details
  3. Merge pull request #14 from bcmi-labs/load_creds

    ucloud: Support loading DER key/cert from path passed in ssl_params.
    iabdalkader authored Sep 26, 2022
    Copy the full SHA
    87b75b0 View commit details
  4. Merge pull request #13 from bcmi-labs/examples

    examples: Add separate example for MicroPython.
    iabdalkader authored Sep 26, 2022
    Copy the full SHA
    efc6593 View commit details
  5. Update README.md

    iabdalkader authored Sep 26, 2022
    Copy the full SHA
    57be1ab View commit details
  6. Update README.md

    iabdalkader authored Sep 26, 2022
    Copy the full SHA
    bc12dca View commit details
  7. umqtt: Check if socket is None before trying to close it.

    * If connect fails at resolving the address, sock can be None.
    iabdalkader committed Sep 26, 2022
    Copy the full SHA
    67dcdb3 View commit details
  8. Merge pull request #15 from bcmi-labs/umqtt_sock_error

    umqtt: Check if socket is None before trying to close it.
    iabdalkader authored Sep 26, 2022
    Copy the full SHA
    e19674a View commit details
  9. Copy the full SHA
    7e00d36 View commit details

Commits on Sep 27, 2022

  1. Merge pull request #16 from pennam/username-pwd-params

    example: Add server and port parameters to connect using username and password
    iabdalkader authored Sep 27, 2022
    Copy the full SHA
    d6b9d52 View commit details
  2. Fix example formatting.

    iabdalkader committed Sep 27, 2022
    Copy the full SHA
    4c817cc View commit details
  3. Copy the full SHA
    1c2a942 View commit details
  4. Merge pull request #17 from bcmi-labs/default_servers

    ucloud: Set default server/port based on auth type.
    iabdalkader authored Sep 27, 2022
    Copy the full SHA
    743dace View commit details
  5. Copy the full SHA
    e29c2a1 View commit details
  6. Merge pull request #18 from bcmi-labs/prod_server

    ucloud: Switch default servers URL to production servers.
    iabdalkader authored Sep 27, 2022
    Copy the full SHA
    da9d804 View commit details

Commits on Sep 28, 2022

  1. ucloud: Set updated flag on update and init to push the initial values.

    * Set the updated flag on updates and on initialization to push
    the initialized non-period variables to the cloud at least once.
    iabdalkader committed Sep 28, 2022
    Copy the full SHA
    0262de3 View commit details
  2. Merge pull request #19 from bcmi-labs/cloud_init_update

    ucloud: Set updated flag on update and init to push the initial values.
    iabdalkader authored Sep 28, 2022
    Copy the full SHA
    be3ab01 View commit details
  3. Copy the full SHA
    5c04410 View commit details
  4. Merge pull request #20 from bcmi-labs/update_devid

    examples: Update device ID.
    iabdalkader authored Sep 28, 2022
    Copy the full SHA
    9eaf104 View commit details

Commits on Oct 5, 2022

  1. Copy the full SHA
    34e18d3 View commit details
  2. Merge pull request #21 from bcmi-labs/qos_update

    ucloud: Update QoS settings.
    iabdalkader authored Oct 5, 2022
    Copy the full SHA
    b29de44 View commit details
  3. Copy the full SHA
    d5b69d1 View commit details
  4. Merge pull request #22 from bcmi-labs/devtopic_qos

    ucloud: Subscribe to device topic with QoS 1.
    iabdalkader authored Oct 5, 2022
    Copy the full SHA
    522e3a4 View commit details

Commits on Oct 8, 2022

  1. ucloud: Load root CA file from DER for MicroPython.

    * MicroPython now supports verifying root CA, passed as binary blob
    in cadata.
    iabdalkader committed Oct 8, 2022
    Copy the full SHA
    449bd65 View commit details
  2. Merge pull request #23 from bcmi-labs/ca_root

    ucloud: Load root CA file from DER for MicroPython.
    iabdalkader authored Oct 8, 2022
    Copy the full SHA
    dc82433 View commit details

Commits on Oct 11, 2022

  1. Copy the full SHA
    269ca41 View commit details
  2. Merge pull request #24 from bcmi-labs/mp_example

    examples: Update MicroPython example device ID.
    iabdalkader authored Oct 11, 2022
    Copy the full SHA
    bcaa0df View commit details

Commits on Oct 12, 2022

  1. Copy the full SHA
    144b5bf View commit details
  2. Merge pull request #25 from bcmi-labs/add_cert_reqs

    ussl: Add and check cert_reqs arg.
    iabdalkader authored Oct 12, 2022
    Copy the full SHA
    1e76584 View commit details
15 changes: 15 additions & 0 deletions .github/workflows/changelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"transformers": [
{
"pattern": "^(.*)\/(.+:.*)",
"target": "- $2"
}
],
"sort": "DESC",
"template": "🪄 Changelog:\n\n${{UNCATEGORIZED}}\n",
"pr_template": "- ${{TITLE}}",
"empty_template": "- no changes",
"max_tags_to_fetch": 100,
"max_pull_requests": 100,
"max_back_track_time_days": 100
}
135 changes: 135 additions & 0 deletions .github/workflows/client-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: '🧪 Test Cloud Client'

on:
push:
branches:
- 'main'
paths:
- '**.py'
- '.github/workflows/*.yml'
- '.github/workflows/*.json'
- '!**/README.md'

pull_request:
types:
- opened
- edited
- reopened
- synchronize
branches:
- 'main'
paths:
- '**.py'
- '.github/workflows/*.yml'
- '.github/workflows/*.json'
- '!**/README.md'

schedule:
- cron: '0 12 * * *' # Runs every day at 12 PM UTC

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: '⏳ Checkout repository'
uses: actions/checkout@v3

- name: '♻ Caching dependencies'
uses: actions/cache@v4.2.2
id: cache
with:
path: ~/cache/bin/
key: 'micropython'

- name: '🐍 Set up Python'
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: "3.10"

- name: '🐍 Set up MicroPython'
if: steps.cache.outputs.cache-hit != 'true'
run: source tests/ci.sh && ci_install_micropython

- name: '🛠 Install dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install build==0.10.0 cbor2==5.4.6 M2Crypto==0.38.0 micropython-senml==0.1.0
sudo apt-get update
sudo apt-get install softhsm2 gnutls-bin libengine-pkcs11-openssl
- name: '📦 Build package'
run: python3 -m build

- name: '🛠 Install package'
run: |
python3 -m build
pip install --user dist/arduino_iot_cloud-*.whl
pip install --target=${HOME}/.micropython/lib dist/arduino_iot_cloud-*.whl
- name: '🔑 Configure secure element'
env:
KEY_PEM: ${{ secrets.KEY_PEM }}
CERT_PEM: ${{ secrets.CERT_PEM }}
CA_PEM: ${{ secrets.CA_PEM }}
run: |
source tests/ci.sh && ci_configure_softhsm
- name: '☁️ Connect to IoT cloud (CPython / Basic Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
python tests/ci.py --basic-auth
- name: '☁️ Connect to IoT cloud (CPython / Basic Auth / Sync)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
python tests/ci.py --basic-auth --sync
- name: '☁️ Connect to IoT cloud (CPython / Key-Cert Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID2 }}
run: |
python tests/ci.py --file-auth
- name: '☁️ Connect to IoT cloud (CPython / Key-Cert Auth / CADATA / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID2 }}
run: |
python tests/ci.py --file-auth --ca-data
- name: '☁️ Connect to IoT cloud (CPython / Crypto Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID2 }}
run: |
export SOFTHSM2_CONF="${HOME}/softhsm/tokens/softhsm2.conf"
python tests/ci.py --crypto-device
- name: '☁️ Connect to IoT cloud (MicroPython / Basic Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
export PATH="${HOME}/cache/bin:${PATH}"
micropython -c "import sys; print(sys.path)"
micropython tests/ci.py --basic-auth
- name: '☁️ Connect to IoT cloud (MicroPython / Basic Auth / Sync)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
export PATH="${HOME}/cache/bin:${PATH}"
micropython -c "import sys; print(sys.path)"
micropython tests/ci.py --basic-auth --sync
- name: '☁️ Connect to IoT cloud (MicroPython / Key-Cert Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID2 }}
run: |
export PATH="${HOME}/cache/bin:${PATH}"
micropython -c "import sys; print(sys.path)"
micropython tests/ci.py --file-auth
14 changes: 6 additions & 8 deletions .github/workflows/python-linter.yml
Original file line number Diff line number Diff line change
@@ -15,26 +15,24 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]

steps:
- name: '⏳ Checkout repository'
uses: actions/checkout@v3

- name: '🐍 Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v3
- name: '🐍 Set up Python'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
python-version: "3.10"

- name: '🛠 Install dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install flake8==6.0.0 pytest==7.4.0
- name: '😾 Lint with flake8'
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --max-complexity=10 --max-line-length=120 --statistics
flake8 . --count --ignore=C901 --max-complexity=15 --max-line-length=120 --statistics
12 changes: 8 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -16,13 +16,12 @@ on:
- '!**/README.md'

permissions:
contents: read
contents: write
pull-requests: read

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: '⏳ Checkout repository'
@@ -45,7 +44,7 @@ jobs:
id: changelog
uses: mikepenz/release-changelog-builder-action@v3
with:
toTag: ${{ github.sha }}
configuration: '.github/workflows/changelog.json'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@@ -57,3 +56,8 @@ jobs:
body: ${{steps.changelog.outputs.changelog}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: '📦 Publish package'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
Loading