Skip to content

Commit

Permalink
Dev/hshami/support py38 and py39 (#523)
Browse files Browse the repository at this point in the history
* introducing PY38 and PY39
  • Loading branch information
mhshami01 authored Mar 7, 2022
1 parent cfebd97 commit db42060
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 22 deletions.
7 changes: 5 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Dependencies versions
ARG PYTHON_VERSION="3.7.10"
ARG PYTHON_VERSION="3.9.10"

# see https://hub.docker.com/_/python/?tab=tag
FROM python:${PYTHON_VERSION}-buster

# Dependencies versions
Expand All @@ -11,11 +12,13 @@ ARG JDK_VERSION="2:1.11-71"
ARG MAVEN_VERSION="3.6.0-1"

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends build-essential && \
apt-get install -y libffi-dev libssl-dev
apt-get install -y libffi-dev libssl-dev vim

# Install python development dependencies
ADD requirements_dev.txt requirements.txt /tmp/
RUN python -m pip install --upgrade pip
RUN pip install -r /tmp/requirements_dev.txt

RUN \
Expand Down
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,25 @@
"dockerfile": "Dockerfile",
"context": "..",
},

"runArgs": [
"--network",
"host"
],

"postCreateCommand": "pip install -e .",
"mounts": [
// Keep command history
"source=ostf-bashhistory,target=/commandhistory,type=volume",
// Use hosts docker socket
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
],

// Set *default* container specific settings.json values on container create.
"settings": {
"#terminal.integrated.defaultProfile.linux#": "/bin/bash",
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
Expand All @@ -31,4 +35,4 @@
"yzhang.markdown-all-in-one",
"davidanson.vscode-markdownlint"
]
}
}
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"module": "pytest",
"args": [
"-v",
"${workspaceFolder}/tests/test_simulator.py::test_monitor"
"${workspaceFolder}/tests/test_iotedgedev_iothub_deploy.py::test_iothub_deploy"
],
"cwd": "${workspaceFolder}"
},
Expand All @@ -20,7 +20,7 @@
"args": [
"init"
],
"cwd": "${workspaceFolder}/tests/test_solution"
"cwd": "${workspaceFolder}/tests/test_iotedgedev_solution"
}
]
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project since 0.82.0 will be documented in this file.

## [3.3.3] - 2022-03-15
- Add support for python 3.8, 3.9
- Lock simulator version at 0.14.12
- Upgrade docker SDK to version 5.0.3

## [3.3.2] - 2022-03-02
- Lock simulator version at 0.14.11

Expand Down
4 changes: 2 additions & 2 deletions iotedgedev/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

__author__ = 'Microsoft Corporation'
__email__ = '[email protected]'
__version__ = '3.3.2'
__AIkey__ = '95b20d64-f54f-4de3-8ad5-165a75a6c6fe'
__version__ = '3.3.3'
__AIkey__ = '95b20d64-f54f-4de3-8ad5-165a75a6c6fe'
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
click==8.0.1
docker==5.0.0
docker==5.0.3
python-dotenv==0.19.0
requests==2.25.1
fstrings==0.1.0
msrestazure==0.4.34
iotedgehubdev==0.14.11
iotedgehubdev==0.14.12
applicationinsights==0.11.9
commentjson==0.9.0
azure-cli-core==2.25.0
pypiwin32==219; sys_platform == 'win32' and python_version < '3.6'
pypiwin32==223; sys_platform == 'win32' and python_version >= '3.6'
1 change: 0 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-r requirements.txt
pip==21.2.3
bumpversion==0.5.3
wheel==0.30.0
watchdog==0.8.3
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.3.2
current_version = 3.3.3
commit = True
tag = True

Expand Down
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'requests >= 2.20.0, <= 2.25.1',
'fstrings',
'azure-cli-core >= 2.25.0',
'iotedgehubdev == 0.14.11',
'iotedgehubdev == 0.14.12',
'applicationinsights == 0.11.9',
'commentjson == 0.9.0',
'pyyaml>=4.1,<=4.2b4',
Expand All @@ -31,7 +31,7 @@

setup(
name='iotedgedev',
version='3.3.2',
version='3.3.3',
description='The Azure IoT Edge Dev Tool greatly simplifies the IoT Edge development process by automating many routine manual tasks, such as building, deploying, pushing modules and configuring the IoT Edge Runtime.',
long_description='See https://github.com/azure/iotedgedev for usage instructions.',
author='Microsoft Corporation',
Expand All @@ -48,15 +48,17 @@
license='MIT license',
zip_safe=False,
keywords='azure iot edge dev tool',
python_requires='>=3.6, <3.8',
python_requires='>=3.6, <3.10',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7'
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9'
],
test_suite='tests',
tests_require=test_requirements,
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = 'Microsoft Corporation'
__email__ = '[email protected]'
__version__ = '3.3.2'
__version__ = '3.3.3'
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36, py37, py38
envlist = py36, py37, py38, py39

#[travis]
#python =
Expand All @@ -11,9 +11,8 @@ envlist = py36, py37, py38
#commands=flake8 iotedgedev

[testenv]
deps =
pytest
-rrequirements_dev.txt
deps = -rrequirements_dev.txt
#setenv = PIP_EXTRA_INDEX_URL=https://test.pypi.org/simple/
commands = pytest -s -v {posargs}
#setenv =
# PYTHONPATH = {toxinidir}
Expand Down
41 changes: 40 additions & 1 deletion vsts_ci/.vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ jobs:
Python37:
python.version: "3.7"
TOXENV: "py37"
Python38:
python.version: "3.8"
TOXENV: "py38"
Python39:
python.version: "3.9"
TOXENV: "py39"
maxParallel: 1
steps:
- template: win32/continuous-build-win32.yml
Expand All @@ -34,11 +40,17 @@ jobs:
# Python37:
# python.version: "3.7"
# TOXENV: "py37"
# Python38:
# python.version: "3.8"
# TOXENV: "py38"
# Python39:
# python.version: "3.9"
# TOXENV: "py39"
# maxParallel: 1
# steps:
# - template: darwin/continuous-build-darwin.yml

- job: Linux
- job: Ubuntu18
pool:
vmImage: ubuntu-18.04
strategy:
Expand All @@ -49,6 +61,33 @@ jobs:
Python37:
python.version: "3.7"
TOXENV: "py37"
Python38:
python.version: "3.8"
TOXENV: "py38"
Python39:
python.version: "3.9"
TOXENV: "py39"
maxParallel: 1
steps:
- template: linux/continuous-build-linux.yml

- job: Ubuntu20
pool:
vmImage: ubuntu-20.04
strategy:
matrix:
Python36:
python.version: "3.6"
TOXENV: "py36"
Python37:
python.version: "3.7"
TOXENV: "py37"
Python38:
python.version: "3.8"
TOXENV: "py38"
Python39:
python.version: "3.9"
TOXENV: "py39"
maxParallel: 1
steps:
- template: linux/continuous-build-linux.yml
1 change: 0 additions & 1 deletion vsts_ci/win32/continuous-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ steps:
npm i -g iothub-explorer yo generator-azure-iot-edge-module
az --version
az extension add --name azure-iot
& "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe" -m pip install -U setuptools==52.0.0
displayName: "Install IoT Hub explorer, Yeoman and Azure IoT Edge Node.js module generator packages"
- pwsh: |
Expand Down

0 comments on commit db42060

Please sign in to comment.