iotedgedev 3.3.4__zip

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. s/.devcontainer/Dockerfile +75 -0
  2. s/.devcontainer/devcontainer.json +40 -0
  3. s/.devcontainer/library-scripts/docker-in-docker-debian.sh +236 -0
  4. s/.env.tmp +108 -0
  5. s/.git/FETCH_HEAD +61 -0
  6. s/.git/HEAD +1 -0
  7. s/.git/config +12 -0
  8. s/.git/description +1 -0
  9. s/.git/hooks/applypatch-msg.sample +15 -0
  10. s/.git/hooks/commit-msg.sample +24 -0
  11. s/.git/hooks/fsmonitor-watchman.sample +173 -0
  12. s/.git/hooks/post-update.sample +8 -0
  13. s/.git/hooks/pre-applypatch.sample +14 -0
  14. s/.git/hooks/pre-commit.sample +49 -0
  15. s/.git/hooks/pre-merge-commit.sample +13 -0
  16. s/.git/hooks/pre-push.sample +53 -0
  17. s/.git/hooks/pre-rebase.sample +169 -0
  18. s/.git/hooks/pre-receive.sample +24 -0
  19. s/.git/hooks/prepare-commit-msg.sample +42 -0
  20. s/.git/hooks/push-to-checkout.sample +78 -0
  21. s/.git/hooks/update.sample +128 -0
  22. s/.git/index +0 -0
  23. s/.git/info/exclude +6 -0
  24. s/.git/logs/HEAD +1 -0
  25. s/.git/logs/refs/remotes/origin/EO +1 -0
  26. s/.git/logs/refs/remotes/origin/avagraw/security_fix +1 -0
  27. s/.git/logs/refs/remotes/origin/cherry-pick-rename +1 -0
  28. s/.git/logs/refs/remotes/origin/chyuan/fix-validation-not-fail-test +1 -0
  29. s/.git/logs/refs/remotes/origin/chyuan/update-linux-agent +1 -0
  30. s/.git/logs/refs/remotes/origin/dependabot/pip/pyyaml-5.4 +1 -0
  31. s/.git/logs/refs/remotes/origin/eliises/add-device-tagging-docs +1 -0
  32. s/.git/logs/refs/remotes/origin/main +1 -0
  33. s/.git/logs/refs/remotes/origin/ray-deps +1 -0
  34. s/.git/logs/refs/remotes/origin/ray-dev-setup +1 -0
  35. s/.git/logs/refs/remotes/origin/ray-tox +1 -0
  36. s/.git/logs/refs/remotes/origin/release-pipeline-automation +1 -0
  37. s/.git/logs/refs/remotes/origin/spmcdono/fix-pipeline-test-install +1 -0
  38. s/.git/logs/refs/remotes/origin/spmcdono/layered-deployments +1 -0
  39. s/.git/logs/refs/remotes/origin/spmcdono/pypi-package-test-pipeline +1 -0
  40. s/.git/logs/refs/remotes/origin/spmcdono/remove-py2 +1 -0
  41. s/.git/logs/refs/remotes/origin/spmcdono/remove-py2-dev +1 -0
  42. s/.git/logs/refs/remotes/origin/spmcdono/test-native-runtime-install +1 -0
  43. s/.git/logs/refs/remotes/origin/spmcdono/update-pipeline +1 -0
  44. s/.git/logs/refs/remotes/origin/user/marine/EliiseS/devcontainer +1 -0
  45. s/.git/logs/refs/remotes/origin/user/marine/fixsimver +1 -0
  46. s/.git/logs/refs/remotes/origin/user/marine/layereddeploymentsbuildtest +1 -0
  47. s/.git/logs/refs/remotes/origin/user/marine/master-to-main +1 -0
  48. s/.git/logs/refs/remotes/origin/user/marine/pipeline +1 -0
  49. s/.git/logs/refs/remotes/origin/user/vikas +1 -0
  50. s/.git/logs/refs/remotes/origin/user/vikas0212/verify-tests +1 -0
  51. s/.git/logs/refs/remotes/origin/user/vikas2 +1 -0
  52. s/.git/logs/refs/remotes/origin/user/vikas_pypi +1 -0
  53. s/.git/logs/refs/remotes/origin/user/vikas_pypi-1 +1 -0
  54. s/.git/logs/refs/remotes/origin/user/vikas_testing +1 -0
  55. s/.git/logs/refs/remotes/origin/user/xinzed/dps_conn_str +1 -0
  56. s/.git/logs/refs/remotes/origin/user/xinzed/update-python-docker +1 -0
  57. s/.git/logs/refs/remotes/origin/vikas/azure +1 -0
  58. s/.git/logs/refs/remotes/origin/vikas/dependebot +1 -0
  59. s/.git/logs/refs/remotes/origin/xinzed/3_1_0rc1 +1 -0
  60. s/.git/logs/refs/remotes/origin/xinzed/update-runtime +1 -0
  61. s/.git/objects/pack/pack-a8179feb7da51d11a42c37c5b3c8593cffe17075.idx +0 -0
  62. s/.git/objects/pack/pack-a8179feb7da51d11a42c37c5b3c8593cffe17075.pack +0 -0
  63. s/.git/refs/remotes/origin/EO +1 -0
  64. s/.git/refs/remotes/origin/avagraw/security_fix +1 -0
  65. s/.git/refs/remotes/origin/cherry-pick-rename +1 -0
  66. s/.git/refs/remotes/origin/chyuan/fix-validation-not-fail-test +1 -0
  67. s/.git/refs/remotes/origin/chyuan/update-linux-agent +1 -0
  68. s/.git/refs/remotes/origin/dependabot/pip/pyyaml-5.4 +1 -0
  69. s/.git/refs/remotes/origin/eliises/add-device-tagging-docs +1 -0
  70. s/.git/refs/remotes/origin/main +1 -0
  71. s/.git/refs/remotes/origin/ray-deps +1 -0
  72. s/.git/refs/remotes/origin/ray-dev-setup +1 -0
  73. s/.git/refs/remotes/origin/ray-tox +1 -0
  74. s/.git/refs/remotes/origin/release-pipeline-automation +1 -0
  75. s/.git/refs/remotes/origin/spmcdono/fix-pipeline-test-install +1 -0
  76. s/.git/refs/remotes/origin/spmcdono/layered-deployments +1 -0
  77. s/.git/refs/remotes/origin/spmcdono/pypi-package-test-pipeline +1 -0
  78. s/.git/refs/remotes/origin/spmcdono/remove-py2 +1 -0
  79. s/.git/refs/remotes/origin/spmcdono/remove-py2-dev +1 -0
  80. s/.git/refs/remotes/origin/spmcdono/test-native-runtime-install +1 -0
  81. s/.git/refs/remotes/origin/spmcdono/update-pipeline +1 -0
  82. s/.git/refs/remotes/origin/user/marine/EliiseS/devcontainer +1 -0
  83. s/.git/refs/remotes/origin/user/marine/fixsimver +1 -0
  84. s/.git/refs/remotes/origin/user/marine/layereddeploymentsbuildtest +1 -0
  85. s/.git/refs/remotes/origin/user/marine/master-to-main +1 -0
  86. s/.git/refs/remotes/origin/user/marine/pipeline +1 -0
  87. s/.git/refs/remotes/origin/user/vikas +1 -0
  88. s/.git/refs/remotes/origin/user/vikas0212/verify-tests +1 -0
  89. s/.git/refs/remotes/origin/user/vikas2 +1 -0
  90. s/.git/refs/remotes/origin/user/vikas_pypi +1 -0
  91. s/.git/refs/remotes/origin/user/vikas_pypi-1 +1 -0
  92. s/.git/refs/remotes/origin/user/vikas_testing +1 -0
  93. s/.git/refs/remotes/origin/user/xinzed/dps_conn_str +1 -0
  94. s/.git/refs/remotes/origin/user/xinzed/update-python-docker +1 -0
  95. s/.git/refs/remotes/origin/vikas/azure +1 -0
  96. s/.git/refs/remotes/origin/vikas/dependebot +1 -0
  97. s/.git/refs/remotes/origin/xinzed/3_1_0rc1 +1 -0
  98. s/.git/refs/remotes/origin/xinzed/update-runtime +1 -0
  99. s/.git/refs/tags/v0.49.0 +1 -0
  100. s/.git/refs/tags/v0.50.0 +1 -0
  101. s/.git/refs/tags/v0.51.0 +1 -0
  102. s/.git/refs/tags/v0.52.0 +1 -0
  103. s/.git/refs/tags/v0.53.0 +1 -0
  104. s/.git/refs/tags/v0.54.0 +1 -0
  105. s/.git/refs/tags/v0.55.0 +1 -0
  106. s/.git/refs/tags/v0.56.0 +1 -0
  107. s/.git/refs/tags/v0.57.0 +1 -0
  108. s/.git/refs/tags/v0.58.0 +1 -0
  109. s/.git/refs/tags/v0.59.0 +1 -0
  110. s/.git/refs/tags/v0.60.0 +1 -0
  111. s/.git/refs/tags/v0.61.0 +1 -0
  112. s/.git/refs/tags/v0.62.0 +1 -0
  113. s/.git/refs/tags/v0.63.0 +1 -0
  114. s/.git/refs/tags/v0.64.0 +1 -0
  115. s/.git/refs/tags/v0.65.0 +1 -0
  116. s/.git/refs/tags/v0.66.0 +1 -0
  117. s/.git/refs/tags/v0.67.0 +1 -0
  118. s/.git/refs/tags/v0.68.0 +1 -0
  119. s/.git/refs/tags/v0.69.0 +1 -0
  120. s/.git/refs/tags/v0.70.0 +1 -0
  121. s/.git/refs/tags/v0.71.0 +1 -0
  122. s/.git/refs/tags/v0.72.0 +1 -0
  123. s/.git/refs/tags/v0.73.0 +1 -0
  124. s/.git/refs/tags/v0.74.0 +1 -0
  125. s/.git/refs/tags/v0.75.0 +1 -0
  126. s/.git/refs/tags/v0.76.0 +1 -0
  127. s/.git/refs/tags/v0.77.0 +1 -0
  128. s/.git/refs/tags/v0.78.0 +1 -0
  129. s/.git/refs/tags/v0.79.0 +1 -0
  130. s/.git/refs/tags/v0.82.0 +1 -0
  131. s/.git/refs/tags/v0.82.0-container +1 -0
  132. s/.git/refs/tags/v1.0.0 +1 -0
  133. s/.git/refs/tags/v1.1.0 +1 -0
  134. s/.git/refs/tags/v1.2.0 +1 -0
  135. s/.git/refs/tags/v1.3.0 +1 -0
  136. s/.git/refs/tags/v2.0.0 +1 -0
  137. s/.git/refs/tags/v2.0.1 +1 -0
  138. s/.git/refs/tags/v2.0.2 +1 -0
  139. s/.git/refs/tags/v2.1.0 +1 -0
  140. s/.git/refs/tags/v2.1.1 +1 -0
  141. s/.git/refs/tags/v2.1.2 +1 -0
  142. s/.git/refs/tags/v2.1.3 +1 -0
  143. s/.git/refs/tags/v2.1.4 +1 -0
  144. s/.git/refs/tags/v2.1.6 +1 -0
  145. s/.git/refs/tags/v2.2.0 +1 -0
  146. s/.git/refs/tags/v3.0.0 +1 -0
  147. s/.git/refs/tags/v3.0.0-rc +1 -0
  148. s/.git/refs/tags/v3.1.0 +1 -0
  149. s/.git/refs/tags/v3.1.1 +1 -0
  150. s/.git/refs/tags/v3.1.2 +1 -0
  151. s/.git/refs/tags/v3.2.0 +1 -0
  152. s/.git/refs/tags/v3.2.0rc0 +1 -0
  153. s/.git/refs/tags/v3.3.0 +1 -0
  154. s/.git/refs/tags/v3.3.1 +1 -0
  155. s/.git/refs/tags/v3.3.2 +1 -0
  156. s/.git/refs/tags/v3.3.3 +1 -0
  157. s/.git/refs/tags/v3.3.3-rc0 +1 -0
  158. s/.git/refs/tags/v3.3.4 +1 -0
  159. s/.github/ISSUE_TEMPLATE/bug_report.md +16 -0
  160. s/.github/ISSUE_TEMPLATE/feature_request.md +7 -0
  161. s/.github/workflows/wiki.yml +54 -0
  162. s/.gitignore +103 -0
  163. s/.vscode/launch.json +26 -0
  164. s/.vscode/settings.json +30 -0
  165. s/CHANGELOG.md +156 -0
  166. s/CODE_OF_CONDUCT.md +1 -0
  167. s/CONTRIBUTING.md +122 -0
  168. s/LICENSE +14 -0
  169. s/MANIFEST.in +7 -0
  170. s/Makefile +87 -0
  171. s/README.md +204 -0
  172. s/assets/armdeployment.png +0 -0
  173. s/assets/armoutputs.png +0 -0
  174. s/assets/deploy/ARMDeployment/ARMDeployment.deployproj +36 -0
  175. s/assets/deploy/ARMDeployment/Deploy-AzureResourceGroup.ps1 +118 -0
  176. s/assets/deploy/ARMDeployment/azuredeploy.json +145 -0
  177. s/assets/deploy/ARMDeployment/azuredeploy.parameters.json +6 -0
  178. s/assets/deploy/ARMDeployment.sln +25 -0
  179. s/assets/edgedevtool2mins.png +0 -0
  180. s/assets/edgedevtoolintro.png +0 -0
  181. s/assets/edgedevtoolquickstartlarge.png +0 -0
  182. s/assets/edgedevtoolquickstartsmall.png +0 -0
  183. s/assets/edgedevtoolwsl.png +0 -0
  184. s/azure-pipelines.yml +144 -0
  185. s/build/lib/iotedgedev/__init__.py +6 -0
  186. s/build/lib/iotedgedev/args.py +18 -0
  187. s/build/lib/iotedgedev/azurecli.py +542 -0
  188. s/build/lib/iotedgedev/buildoptionsparser.py +151 -0
  189. s/build/lib/iotedgedev/buildprofile.py +5 -0
  190. s/build/lib/iotedgedev/cli.py +830 -0
  191. s/build/lib/iotedgedev/connectionstring.py +58 -0
  192. s/build/lib/iotedgedev/constants.py +12 -0
  193. s/build/lib/iotedgedev/containerregistry.py +5 -0
  194. s/build/lib/iotedgedev/decorators.py +116 -0
  195. s/build/lib/iotedgedev/deploymentmanifest.py +313 -0
  196. s/build/lib/iotedgedev/dockercls.py +255 -0
  197. s/build/lib/iotedgedev/dotnet.py +31 -0
  198. s/build/lib/iotedgedev/edge.py +33 -0
  199. s/build/lib/iotedgedev/envvars.py +240 -0
  200. s/build/lib/iotedgedev/iothub.py +65 -0
  201. s/build/lib/iotedgedev/module.py +62 -0
  202. s/build/lib/iotedgedev/modules.py +332 -0
  203. s/build/lib/iotedgedev/organizedgroup.py +48 -0
  204. s/build/lib/iotedgedev/output.py +57 -0
  205. s/build/lib/iotedgedev/simulator.py +58 -0
  206. s/build/lib/iotedgedev/solution.py +48 -0
  207. s/build/lib/iotedgedev/telemetry.py +155 -0
  208. s/build/lib/iotedgedev/telemetryconfig.py +85 -0
  209. s/build/lib/iotedgedev/telemetryuploader.py +53 -0
  210. s/build/lib/iotedgedev/template/.env.tmp +87 -0
  211. s/build/lib/iotedgedev/template/.gitignore +10 -0
  212. s/build/lib/iotedgedev/template/deployment.template.json +79 -0
  213. s/build/lib/iotedgedev/template/launch_c.json +50 -0
  214. s/build/lib/iotedgedev/template/launch_csharp.json +43 -0
  215. s/build/lib/iotedgedev/template/launch_java.json +27 -0
  216. s/build/lib/iotedgedev/template/launch_node.json +36 -0
  217. s/build/lib/iotedgedev/template/launch_python.json +22 -0
  218. s/build/lib/iotedgedev/utility.py +179 -0
  219. s/build/lib/iotedgedev/version.py +4 -0
  220. s/build.sh +150 -0
  221. s/cleanup.sh +7 -0
  222. s/dist/iotedgedev-3.3.4-py3-none-any.whl +0 -0
  223. s/docker/tool/build-docker.sh +168 -0
  224. s/docker/tool/deps.txt +7 -0
  225. s/docker/tool/linux/Dockerfile +7 -0
  226. s/docker/tool/linux/Dockerfile.base +61 -0
  227. s/docker/tool/linux/install-dev.sh +8 -0
  228. s/docker/tool/linux/run.ps1 +5 -0
  229. s/docker/tool/linux/run.sh +5 -0
  230. s/docker/tool/push-docker.sh +35 -0
  231. s/docker/tool/windows/Dockerfile +4 -0
  232. s/docker/tool/windows/Dockerfile.base +63 -0
  233. s/docker/tool/windows/install-dev.bat +4 -0
  234. s/docker/tool/windows/run.ps1 +30 -0
  235. s/docs/Azure-Setup.md +102 -0
  236. s/docs/Command-List.md +564 -0
  237. s/docs/Command-Tips.md +51 -0
  238. s/docs/Edge-Device-Setup.md +23 -0
  239. s/docs/Home.md +10 -0
  240. s/docs/Manual-Dev-Machine-Setup.md +77 -0
  241. s/docs/Migration-Guides.md +131 -0
  242. s/docs/Overview.md +66 -0
  243. s/docs/Python-Virtual-Environment-Setup.md +35 -0
  244. s/docs/Quickstart-with-IoT-Edge-Dev-Container.md +145 -0
  245. s/docs/Test-Coverage.md +7 -0
  246. s/docs/Troubleshooting.md +21 -0
  247. s/docs/Usage.md +123 -0
  248. s/docs/_Sidebar.md +13 -0
  249. s/iotedgedev/__init__.py +6 -0
  250. s/iotedgedev/args.py +18 -0
  251. s/iotedgedev/azurecli.py +542 -0
  252. s/iotedgedev/buildoptionsparser.py +151 -0
  253. s/iotedgedev/buildprofile.py +5 -0
  254. s/iotedgedev/cli.py +830 -0
  255. s/iotedgedev/connectionstring.py +58 -0
  256. s/iotedgedev/constants.py +12 -0
  257. s/iotedgedev/containerregistry.py +5 -0
  258. s/iotedgedev/decorators.py +116 -0
  259. s/iotedgedev/deploymentmanifest.py +313 -0
  260. s/iotedgedev/dockercls.py +255 -0
  261. s/iotedgedev/dotnet.py +31 -0
  262. s/iotedgedev/edge.py +33 -0
  263. s/iotedgedev/envvars.py +240 -0
  264. s/iotedgedev/iothub.py +65 -0
  265. s/iotedgedev/module.py +62 -0
  266. s/iotedgedev/modules.py +332 -0
  267. s/iotedgedev/organizedgroup.py +48 -0
  268. s/iotedgedev/output.py +57 -0
  269. s/iotedgedev/simulator.py +58 -0
  270. s/iotedgedev/solution.py +48 -0
  271. s/iotedgedev/telemetry.py +155 -0
  272. s/iotedgedev/telemetryconfig.py +85 -0
  273. s/iotedgedev/telemetryuploader.py +53 -0
  274. s/iotedgedev/template/.env.tmp +87 -0
  275. s/iotedgedev/template/.gitignore +10 -0
  276. s/iotedgedev/template/deployment.template.json +79 -0
  277. s/iotedgedev/template/launch_c.json +50 -0
  278. s/iotedgedev/template/launch_csharp.json +43 -0
  279. s/iotedgedev/template/launch_java.json +27 -0
  280. s/iotedgedev/template/launch_node.json +36 -0
  281. s/iotedgedev/template/launch_python.json +22 -0
  282. s/iotedgedev/utility.py +179 -0
  283. s/iotedgedev/version.py +4 -0
  284. s/iotedgedev.egg-info/PKG-INFO +21 -0
  285. s/iotedgedev.egg-info/SOURCES.txt +100 -0
  286. s/iotedgedev.egg-info/dependency_links.txt +1 -0
  287. s/iotedgedev.egg-info/entry_points.txt +3 -0
  288. s/iotedgedev.egg-info/not-zip-safe +1 -0
  289. s/iotedgedev.egg-info/requires.txt +18 -0
  290. s/iotedgedev.egg-info/top_level.txt +1 -0
  291. s/pull_request_template.md +9 -0
  292. s/pytest.ini +4 -0
  293. s/requirements.txt +12 -0
  294. s/requirements_dev.txt +17 -0
  295. s/scripts/gen-help-markdown.bat +177 -0
  296. s/scripts/install-pip.sh +1 -0
  297. s/scripts/setup-wsl.sh +7 -0
  298. s/setup.cfg +18 -0
  299. s/setup.py +66 -0
  300. s/tests/__init__.py +5 -0
  301. s/tests/assets/deployment.manifest_invalid.json +106 -0
  302. s/tests/assets/deployment.manifest_invalid_createoptions.json +102 -0
  303. s/tests/assets/deployment.manifest_invalid_schema.json +69 -0
  304. s/tests/assets/deployment.template.non_str_placeholder.json +79 -0
  305. s/tests/assets/deployment.template_1.json +163 -0
  306. s/tests/assets/deployment.template_2.json +163 -0
  307. s/tests/assets/deployment.template_3.json +174 -0
  308. s/tests/assets/deployment.template_4.json +79 -0
  309. s/tests/assets/deployment.template_invalidresult.json +183 -0
  310. s/tests/assets/deployment.template_without_schema_template.json +99 -0
  311. s/tests/assets/launch.json +225 -0
  312. s/tests/assets/launch_without_nodejs.json +194 -0
  313. s/tests/assets/test_solution_shared_lib/.gitignore +2 -0
  314. s/tests/assets/test_solution_shared_lib/.vscode/launch.json +43 -0
  315. s/tests/assets/test_solution_shared_lib/deployment.debug.template.json +100 -0
  316. s/tests/assets/test_solution_shared_lib/deployment.escapedpath.template.json +90 -0
  317. s/tests/assets/test_solution_shared_lib/deployment.template.json +106 -0
  318. s/tests/assets/test_solution_shared_lib/layered_deployment.flattened_props.template.json +21 -0
  319. s/tests/assets/test_solution_shared_lib/layered_deployment.no_modules.template.json +12 -0
  320. s/tests/assets/test_solution_shared_lib/libs/sharedlib/Class1.cs +12 -0
  321. s/tests/assets/test_solution_shared_lib/libs/sharedlib/sharedlib.csproj +7 -0
  322. s/tests/assets/test_solution_shared_lib/modules/non_module_project/placeholder.txt +0 -0
  323. s/tests/assets/test_solution_shared_lib/modules/sample_module/.gitignore +34 -0
  324. s/tests/assets/test_solution_shared_lib/modules/sample_module/Dockerfile.amd64 +18 -0
  325. s/tests/assets/test_solution_shared_lib/modules/sample_module/Dockerfile.amd64.debug +25 -0
  326. s/tests/assets/test_solution_shared_lib/modules/sample_module/Dockerfile.windows-amd64 +15 -0
  327. s/tests/assets/test_solution_shared_lib/modules/sample_module/Program.cs +91 -0
  328. s/tests/assets/test_solution_shared_lib/modules/sample_module/module.json +18 -0
  329. s/tests/assets/test_solution_shared_lib/modules/sample_module/sample_module.csproj +26 -0
  330. s/tests/assets/test_solution_shared_lib/sample_module_2/.gitignore +34 -0
  331. s/tests/assets/test_solution_shared_lib/sample_module_2/Dockerfile.amd64 +18 -0
  332. s/tests/assets/test_solution_shared_lib/sample_module_2/Dockerfile.amd64.debug +25 -0
  333. s/tests/assets/test_solution_shared_lib/sample_module_2/Dockerfile.windows-amd64 +15 -0
  334. s/tests/assets/test_solution_shared_lib/sample_module_2/Program.cs +91 -0
  335. s/tests/assets/test_solution_shared_lib/sample_module_2/module.json +18 -0
  336. s/tests/assets/test_solution_shared_lib/sample_module_2/sample_module_2.csproj +26 -0
  337. s/tests/test_azurecli.py +33 -0
  338. s/tests/test_buildoptionsparser.py +155 -0
  339. s/tests/test_cli.py +55 -0
  340. s/tests/test_config.py +28 -0
  341. s/tests/test_connectionstring.py +87 -0
  342. s/tests/test_decorators.py +44 -0
  343. s/tests/test_deploymentmanifest.py +106 -0
  344. s/tests/test_envvars.py +169 -0
  345. s/tests/test_iotedgedev_iothub_deploy.py +199 -0
  346. s/tests/test_iotedgedev_simulator.py +133 -0
  347. s/tests/test_iotedgedev_solution.py +457 -0
  348. s/tests/test_iotedgedev_solution_build.py +246 -0
  349. s/tests/test_iotedgedev_solution_tag.py +99 -0
  350. s/tests/test_utility.py +132 -0
  351. s/tests/utility.py +132 -0
  352. s/tox.ini +29 -0
  353. s/vsts_ci/.vsts-ci.yml +93 -0
  354. s/vsts_ci/darwin/continuous-build-darwin.yml +54 -0
  355. s/vsts_ci/linux/continuous-build-linux.yml +28 -0
  356. s/vsts_ci/win32/continuous-build-win32.yml +26 -0
@@ -0,0 +1 @@
1
+ 7ef7125fcd10b835b540f6f66666b464662a7f7d
@@ -0,0 +1 @@
1
+ cfebd97a86e3d9c10a199c58feea5f00a4201127
@@ -0,0 +1 @@
1
+ db420607db777f90eb178635bd8c33ad2c21f242
@@ -0,0 +1 @@
1
+ 50459b5a8ec73e5629bf5b88136fce95b9083e90
@@ -0,0 +1 @@
1
+ f28b9ff2015dc3362461ede5d3633d6ba6ea5750
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a issue to help us improve
4
+ ---
5
+
6
+ <!-- Fill in the information needed -->
7
+ - iotedgedev Version:
8
+ - Python Version:
9
+ - Pip Version:
10
+ - Development machine OS Version:
11
+ - IoT Edge device OS Version:
12
+
13
+ Steps to Reproduce:
14
+
15
+ 1.
16
+ 2.
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for IoT Edge and IoT Edge development tools
4
+
5
+ ---
6
+
7
+ <!-- Describe the feature you'd like. -->
@@ -0,0 +1,54 @@
1
+ name: Update wiki
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ # Allows you to run this workflow manually from the Actions tab
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+
16
+ - name: Push documentation changes to wiki
17
+ env:
18
+ EMAIL: actions@github.com
19
+ USER_NAME: Github Actions
20
+ REPO_DEST: iotedgedev.wiki
21
+ REPO_DEST_URL: github.com/Azure/iotedgedev.wiki.git
22
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23
+ run: |
24
+ set -e
25
+
26
+ # Save iotedgedev repo folder path
27
+ REPO_SOURCE=$(pwd)
28
+
29
+ # Exit iotedgedev repo folder
30
+ cd ..
31
+
32
+ # Clone repositories
33
+ git clone https://${REPO_DEST_URL}
34
+
35
+ # Update wiki repository with documentation folder contents
36
+ cd ${REPO_DEST}
37
+ git rm -rf .
38
+ git clean -fxd
39
+ yes 2>/dev/null | cp -rf ${REPO_SOURCE}/docs/* .
40
+ git reset
41
+
42
+ # If changes found, commit and push them
43
+ if git diff-index HEAD && [ ! -n "$(git status -s)" ]; then
44
+ git status
45
+ echo "No changes found in /docs. Exiting..."
46
+ else
47
+ git status
48
+ echo "Changes found in /docs. Committing and pushing..."
49
+ git config user.email ${EMAIL}
50
+ git config user.name ${USER_NAME}
51
+ git add .
52
+ git commit -m "Update documentation | From github actions number: ${GITHUB_RUN_ID}"
53
+ git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${REPO_DEST_URL}"
54
+ fi
s/.gitignore ADDED
@@ -0,0 +1,103 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ *.whl
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *,cover
47
+ .hypothesis/
48
+
49
+ # Translations
50
+ *.mo
51
+ *.pot
52
+
53
+ # Django stuff:
54
+ *.log
55
+
56
+ # Sphinx documentation
57
+ docs/_build/
58
+
59
+ # PyBuilder
60
+ target/
61
+
62
+ # pyenv python configuration file
63
+ .python-version
64
+
65
+ **/.vs
66
+ **/bin
67
+ **/obj
68
+ **/out
69
+ .env
70
+ .backup
71
+ venv
72
+ /logs
73
+ /config
74
+ .config
75
+ config
76
+ /build
77
+
78
+
79
+ py36
80
+ .pypirc
81
+ tests/test_solution
82
+ tests/test_solution_shared_lib
83
+ empty_dir/
84
+ README
85
+
86
+ node_modules
87
+
88
+ /docker/linux/Dockerfile.expanded
89
+
90
+ .pytest_cache
91
+
92
+ # VSCode
93
+ .vscode/*
94
+ !.vscode/settings.json
95
+ !.vscode/tasks.json
96
+ !.vscode/launch.json
97
+ !.vscode/extensions.json
98
+
99
+ # rope
100
+ .vscode/.ropeproject/
101
+
102
+ # ctags
103
+ .vscode/tags
s/.vscode/launch.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Python: debug test",
6
+ "type": "python",
7
+ "request": "launch",
8
+ "module": "pytest",
9
+ "args": [
10
+ "-v",
11
+ "${workspaceFolder}/tests/test_iotedgedev_iothub_deploy.py::test_iothub_deploy"
12
+ ],
13
+ "cwd": "${workspaceFolder}"
14
+ },
15
+ {
16
+ "name": "Python Module",
17
+ "type": "python",
18
+ "request": "launch",
19
+ "module": "iotedgedev.cli",
20
+ "args": [
21
+ "init"
22
+ ],
23
+ "cwd": "${workspaceFolder}/tests/test_iotedgedev_solution"
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "python.pythonPath": "${workspaceFolder}\\venv\\Scripts\\python.exe",
3
+ "cSpell.words": [
4
+ "dotenv",
5
+ "envvar",
6
+ "edgesolution",
7
+ "gitignore",
8
+ "iotedge",
9
+ "iotedgedev",
10
+ "iothub",
11
+ "mkdir",
12
+ "posix",
13
+ "quickstart",
14
+ "venv",
15
+ "virtualenv"
16
+ ],
17
+ "python.linting.enabled": true,
18
+ "python.linting.pylintEnabled": false,
19
+ "python.linting.flake8Enabled": true,
20
+ "python.linting.flake8Args": [
21
+ "--max-line-length=200"
22
+ ],
23
+ "python.formatting.provider": "autopep8",
24
+ "python.formatting.autopep8Args": [
25
+ "--max-line-length",
26
+ "200"
27
+ ],
28
+ "python.testing.unittestEnabled": true,
29
+ "python.testing.pytestEnabled": true
30
+ }
s/CHANGELOG.md ADDED
@@ -0,0 +1,156 @@
1
+ # Changelog
2
+ All notable changes to this project since 0.82.0 will be documented in this file.
3
+
4
+ ## [3.3.4] - 2022-03-24
5
+ - Lock simulator version at 0.14.14
6
+ - Update Wiki and dev container to reflect changes about the simulator
7
+
8
+ ## [3.3.3] - 2022-03-15
9
+ - Add support for python 3.8, 3.9
10
+ - Lock simulator version at 0.14.12
11
+ - Upgrade docker SDK to version 5.0.3
12
+
13
+ ## [3.3.2] - 2022-03-02
14
+ - Lock simulator version at 0.14.11
15
+
16
+ ## [3.3.1] - 2021-10-20
17
+ - Updated Python Docker package versions to newest version and enable simulator dependencies
18
+
19
+ ## [3.3.0] - 2021-8-24
20
+ - Add support for layered deployment manifests when building, pushing and generating
21
+ - Add support for creating deployments in IoTHub via the new command: `iotedgedev iothub deploy`
22
+ - Add support for adding device tags via the new command: `iotedgedev tag`
23
+
24
+ ## [3.2.0] - 2021-7-30
25
+ - Added support for IoT Edge Runtime version 1.2
26
+ - Enable change of edgehub and edgeagent schema versions
27
+ - Added support for config generation, build and push off of a layered deployment manifest
28
+
29
+ ## [3.1.0] - 2021-6-8
30
+ - Added support for IoT Edge Runtime version 1.1
31
+ - Enabled dynamic Edge runtime selection in CLI with -er flag
32
+
33
+ ## [3.0.0] - 2021-01-27
34
+ - Remove support for Python2. Only Python 3.6 and 3.7 are currently supported.
35
+
36
+ ## [2.2.0] - 2021-01-06
37
+ ### Changed
38
+ - Remove explicit cryptography package install to resolve dependency conflicts so tests can run
39
+ - Add local registry support for Windows
40
+
41
+ ## [2.1.6] - 2020-09-23
42
+ ### Changed
43
+ - Fix warning about ConfigParser readfp deprecation
44
+
45
+ ## [2.1.5] - 2020-08-18
46
+ ### Changed
47
+ - Fix error caused by latest bcrypt on Azure Pipelines agent
48
+
49
+ ## [2.1.4] - 2020-04-01
50
+ ### Changed
51
+ - Fix configparser error from Azure Cli Core [[#426](https://github.com/Azure/iotedgedev/issues/426)]
52
+
53
+ ## [2.1.3] - 2020-03-27
54
+ ### Changed
55
+ - Fix genconfig does not fail when schema validation failed. [[#424](https://github.com/Azure/iotedgedev/issues/424)]
56
+
57
+ ## [2.1.2] - 2020-01-14
58
+ ### Changed
59
+ - Fix error when install on Azure Pipelines agent
60
+
61
+ ## [2.1.1] - 2019-12-16
62
+ ### Changed
63
+ - Fix getconfig fails if template contains a placeholder that is not enclosed in quotes.[[#414](https://github.com/Azure/iotedgedev/issues/414)]
64
+ - Fix wrong instruction to `iotedgedev iothub setup` with extra flags.[[#417](https://github.com/Azure/iotedgedev/issues/417)]
65
+ - Python 3.8 is not supported due to Azure CLI IoT extension issue [[#128](https://github.com/Azure/azure-iot-cli-extension/issues/128)]
66
+
67
+ ## [2.1.0] - 2019-10-28
68
+ ### Added
69
+ - Validate schema of deployment template and generated deployment manifest in `genconfig` command
70
+
71
+ ### Changed
72
+ - Show progress info for docker commands
73
+
74
+ ## [2.0.2] - 2019-07-31
75
+ ### Changed
76
+ - Fix errors caused by latest lark-parser release.
77
+
78
+ ## [2.0.1] - 2019-07-11
79
+ ### Changed
80
+ - Fix build errors when some projects under modules folder have no module.json [[#396](https://github.com/Azure/iotedgedev/issues/396)]
81
+
82
+ ## [2.0.0] - 2019-06-10
83
+ ### Added
84
+ - Support relative path for module placeholder in deployment.template.json
85
+
86
+ ### Changed
87
+ - Fix issue with 'cs' keyerror [[#387](https://github.com/Azure/iotedgedev/issues/387)]. Thanks for jporcenaluk's contribution.
88
+ - Drop support for ACTIVE_DOCKER_PLATFORMS environment variable
89
+
90
+ ## [1.3.0] - 2019-04-25
91
+ ### Added
92
+ - Add module twin support for simulator
93
+
94
+ ### Changed
95
+ - Update azure-cli-core to fix module import error
96
+ - Fix applicationinsights incompatible version issue [[#383](https://github.com/Azure/iotedgedev/issues/383)]
97
+
98
+ ## [1.2.0] - 2019-02-26
99
+ ### Changed
100
+ - Fix issue creating C modules when temp folder and target project folder are on different disks [[#362](https://github.com/Azure/iotedgedev/pull/362)]
101
+ - Fix issue connecting to Docker daemon with `tlsverify` enabled [[#364](https://github.com/Azure/iotedgedev/pull/364)]
102
+ - Preserve tag cases when generating deployment manifests [[#372](https://github.com/Azure/iotedgedev/pull/372)]
103
+
104
+ ## [1.1.0] - 2018-11-26
105
+ ### Added
106
+ - Support parsing `createOptions` in JSON dictionary format
107
+ - Support multi-platform deployment manifest template, where modules' image placeholders are platform neutral (`${MODULE.filtermodule}` vs. `${MODULES.filtermodule.amd64}`). You can specify the platforms to build using the `--platform` parameter. By default, we provide "arm32v7", "amd64" and "windows-amd64" as the platform set since these are Azure IoT Edge supporting platforms today
108
+ - Add **deployment.debug.template.json** when creating new solutions. This template refers to the debug flavour image of the modules and has debug `createOptions` populated automatically. You can specify the deployment manifest template to build using the `--file` parameter
109
+
110
+ ### Changed
111
+ - Default to JSON dictionary format for newly created modules' `createOptions`
112
+ - Show more clear message when failing to connect to Docker daemon
113
+
114
+ ## [1.0.0] - 2018-11-01
115
+ ### Added
116
+ - Support adding Java modules
117
+ - Support adding C modules
118
+ - Add OpenJDK and Maven to IoT Edge Dev Tool Container
119
+ - Add launch.json file for Python modules
120
+ - Add `registryCredentials` to deployment manifest template
121
+
122
+ ### Changed
123
+ - Update .NET Core SDK in IoT Edge Dev Tool Container to version 2.1
124
+ - Improve Docker build and push command output to show more information
125
+ - Retry subscription prompt when multiple results are found
126
+ - Update launch.json file for C# modules to support .NET Core 2.1
127
+ - Fix misleading output when error deploying
128
+ - Fix error starting local registry with custom ports
129
+
130
+ ## [0.82.0] - 2018-08-28
131
+ ### Added
132
+ - New command to add modules to solution
133
+ - Support for adding and building Node.js and Python modules
134
+ - Integration with IoT Edge Simulator provided by the [iotedgehubdev CLI](https://pypi.org/project/iotedgehubdev/)
135
+ - Allow specifying name and template of the default module when creating new solutions
136
+ - Support for build options in `module.json` file
137
+ - Support for customized context path in `module.json` file
138
+ - Support for multiple registries in `.env` file
139
+ - Support for GA release of IoT Edge runtime in IoT Edge Dev Container
140
+ - Update `.vscode/launch.json` file when adding modules
141
+
142
+ ### Changed
143
+ - Switch to Azure CLI IoT extension (>= 0.5.1) to monitor messages for Python >= 3.5 users
144
+ - Improve experience of creating Azure resources interactively
145
+ - Breaking changes (learn how to migrate [here](https://github.com/Azure/iotedgedev/wiki/migration-guides))
146
+ - Updated command list and options
147
+ - Updated logic to determine which module images to build
148
+ - New module folder structure
149
+ - Building code in Dockerfiles instead on building code natively
150
+
151
+ ### Removed
152
+ - Support for `iotedgectl` and public preview runtime images
153
+
154
+ ## [0.1.0] - 2017-12-29
155
+ ### Added
156
+ - First release on PyPI.
s/CODE_OF_CONDUCT.md ADDED
@@ -0,0 +1 @@
1
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
s/CONTRIBUTING.md ADDED
@@ -0,0 +1,122 @@
1
+ # Contributing
2
+
3
+ This section describes how to get your developer workspace running for the first time so that you're ready to start making contributions.
4
+
5
+ Please fork, branch and pull-request any changes you'd like to make.
6
+
7
+ ## Workspace Setup
8
+
9
+ 1. Clone this repository
10
+
11
+ `git clone https://github.com/azure/iotedgedev.git`
12
+
13
+ 1. Rename `.env.tmp` in the root of the repo to `.env` and set the `IOTHUB_CONNECTION_STRING` and `DEVICE_CONNECTION_STRING` values to settings from your IoT Hub and Edge Device. To set these values you could run `iotedgedev iothub setup` in the root of the repo.
14
+
15
+ 1. Install **[Docker](https://docs.docker.com/engine/installation/)**
16
+ - Windows
17
+ - Be sure to check whether you are running in Linux container mode or Windows container mode.
18
+ - Linux
19
+ - We've seen some issues with docker.io. If IoT Edge doesn't run for you, then try installing Docker CE directly instead of via docker.io. Use the [CE install steps](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-docker-ce), or use the [convenience script](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-convenience-script).
20
+ - By default, you need `sudo` to run `docker` commands. If you want to avoid this, please follow the [post-installation steps for Linux](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user).
21
+
22
+
23
+ ### A) Contributor Dev Machine Setup
24
+
25
+ 1. Install **Python 3.6+**, and **pip**
26
+ - Windows: [Install from Python's website](https://www.python.org/downloads/)
27
+ - Linux: `sudo apt-get install python-pip python3-pip`
28
+ - macOS: The OpenSSL used by the system built-in Python is old and vulnerable. Please use Python installed with [Homebrew](https://docs.brew.sh/Homebrew-and-Python).
29
+
30
+ 1. Install **[Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest)**
31
+
32
+ 1. Install **[Azure CLI IoT extension](https://github.com/Azure/azure-iot-cli-extension/)**
33
+
34
+ - New Install: `az extension add --name azure-iot`
35
+ - Update Install: `az extension update --name azure-iot`
36
+
37
+ 1. Install **[Node.js](https://nodejs.org/en/download/)** and the **`iothub-explorer`** package
38
+
39
+ - `npm i -g iothub-explorer`
40
+
41
+ 1. (Linux only) Install [Docker Compose](https://docs.docker.com/compose/)
42
+
43
+ ```
44
+ pip install -U docker-compose
45
+ ```
46
+
47
+ 1. (Linux only) Install extra system dependencies
48
+
49
+ ```
50
+ sudo apt-get install -y libffi-dev libssl-dev
51
+ ```
52
+
53
+ 1. Install module dependencies
54
+ ##### C# module and C# Azure Functions module
55
+ Install **[.NET Core SDK 2.1 or later](https://www.microsoft.com/net/download)**
56
+
57
+ ##### Python module
58
+ 1. Install **[Git](https://git-scm.com/)**
59
+ 2. Install **[Cookiecutter](https://github.com/audreyr/cookiecutter)**
60
+ ```
61
+ pip install -U cookiecutter
62
+ ```
63
+
64
+ ##### Node.js module
65
+ 1. Install **[Node.js](https://nodejs.org/en/download/)**
66
+ 2. Install **[Yeoman](http://yeoman.io/)** and **[Azure IoT Edge Node.js module generator](https://github.com/Azure/generator-azure-iot-edge-module)** packages
67
+ ```
68
+ npm i -g yo generator-azure-iot-edge-module
69
+ ```
70
+
71
+ ##### Java module
72
+ 1. Install **[JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html)**
73
+ 1. Install **[Maven](https://maven.apache.org/)**
74
+
75
+ 1. Install Python development dependencies
76
+
77
+ ```
78
+ pip install -r requirements_dev.txt
79
+ ```
80
+
81
+ ### B) Contributor Docker Devcontainer Setup
82
+
83
+ #### With VSCode
84
+
85
+ Developing with docker using VSCode's [remote containers](https://code.visualstudio.com/docs/remote/containers):
86
+
87
+ - Install [Remote Development Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) in VSCode
88
+ - Open the project in VSCode
89
+ - When prompted by VSCode, select "Reopen in Container"
90
+
91
+ > To further customize your devcontainer checkout [Personalizing with `dotfile` repositories](https://code.visualstudio.com/docs/remote/containers#_personalizing-with-dotfile-repositories). In the same settings you're also able to add personal extensions for your container.
92
+
93
+ #### Without VSCode
94
+
95
+ - Build the development environment: `docker build -f .devcontainer/Dockerfile -t dev .`
96
+ - Mount the root directory into the docker container, and drop into a bash shell in the container:
97
+
98
+ ```bash
99
+ docker run -it -v ${PWD}:/workspaces/iotedgedev iotedgedev
100
+ ```
101
+
102
+ ## Developing
103
+
104
+ 1. Run IoT Edge Dev Tool in editable mode
105
+
106
+ Run the following command from the root of the repo to see changes to iotedgedev commands as you change code.
107
+
108
+ ```
109
+ pip install -e .
110
+ ```
111
+
112
+
113
+ ## VS Code Debugging
114
+ VS Code Debugging works only with Python 3.6 VS Code Python Environments for now. Make sure that your VS Code Python Environment is [pointing to Python 3.6](https://code.visualstudio.com/docs/python/environments#_how-to-choose-an-environment)
115
+
116
+ Set your CLI arguments in .vscode/launch.json and hit **F5**
117
+
118
+ ## Run Tests
119
+
120
+ Run the following command to run tests.
121
+
122
+ `tox`
s/LICENSE ADDED
@@ -0,0 +1,14 @@
1
+ ------------------------------------------- START OF LICENSE -----------------------------------------
2
+ Azure IoT Edge Dev Tool
3
+ Copyright (c) Microsoft Corporation
4
+ All rights reserved.
5
+
6
+ MIT License
7
+
8
+ 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:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11
+
12
+ 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.
13
+
14
+ ----------------------------------------------- END OF LICENSE ------------------------------------------
s/MANIFEST.in ADDED
@@ -0,0 +1,7 @@
1
+ include CHANGELOG.md
2
+ include LICENSE
3
+ include README.md
4
+ include iotedgedev/template/*.*
5
+ recursive-include tests *
6
+ recursive-exclude * __pycache__
7
+ recursive-exclude * *.py[co]
s/Makefile ADDED
@@ -0,0 +1,87 @@
1
+ .PHONY: clean clean-test clean-pyc clean-build docs help
2
+ .DEFAULT_GOAL := help
3
+ define BROWSER_PYSCRIPT
4
+ import os, webbrowser, sys
5
+ try:
6
+ from urllib import pathname2url
7
+ except:
8
+ from urllib.request import pathname2url
9
+
10
+ webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
11
+ endef
12
+ export BROWSER_PYSCRIPT
13
+
14
+ define PRINT_HELP_PYSCRIPT
15
+ import re, sys
16
+
17
+ for line in sys.stdin:
18
+ match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
19
+ if match:
20
+ target, help = match.groups()
21
+ print("%-20s %s" % (target, help))
22
+ endef
23
+ export PRINT_HELP_PYSCRIPT
24
+ BROWSER := python -c "$$BROWSER_PYSCRIPT"
25
+
26
+ help:
27
+ @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
28
+
29
+ clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
30
+
31
+
32
+ clean-build: ## remove build artifacts
33
+ rm -fr build/
34
+ rm -fr dist/
35
+ rm -fr .eggs/
36
+ find . -name '*.egg-info' -exec rm -fr {} +
37
+ find . -name '*.egg' -exec rm -f {} +
38
+
39
+ clean-pyc: ## remove Python file artifacts
40
+ find . -name '*.pyc' -exec rm -f {} +
41
+ find . -name '*.pyo' -exec rm -f {} +
42
+ find . -name '*~' -exec rm -f {} +
43
+ find . -name '__pycache__' -exec rm -fr {} +
44
+
45
+ clean-test: ## remove test and coverage artifacts
46
+ rm -fr .tox/
47
+ rm -f .coverage
48
+ rm -fr htmlcov/
49
+
50
+ lint: ## check style with flake8
51
+ flake8 iotedgedev tests
52
+
53
+ test: ## run tests quickly with the default Python
54
+
55
+ python setup.py test
56
+
57
+ test-all: ## run tests on every Python version with tox
58
+ tox
59
+
60
+ coverage: ## check code coverage quickly with the default Python
61
+ coverage run --source iotedgedev setup.py test
62
+ coverage report -m
63
+ coverage html
64
+ $(BROWSER) htmlcov/index.html
65
+
66
+ docs: ## generate Sphinx HTML documentation, including API docs
67
+ rm -f docs/iotedgedev.rst
68
+ rm -f docs/modules.rst
69
+ sphinx-apidoc -o docs/ iotedgedev
70
+ $(MAKE) -C docs clean
71
+ $(MAKE) -C docs html
72
+ $(BROWSER) docs/_build/html/index.html
73
+
74
+ servedocs: docs ## compile the docs watching for changes
75
+ watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
76
+
77
+ release: clean ## package and upload a release
78
+ python setup.py sdist upload
79
+ python setup.py bdist_wheel upload
80
+
81
+ dist: clean ## builds source and wheel package
82
+ python setup.py sdist
83
+ python setup.py bdist_wheel
84
+ ls -l dist
85
+
86
+ install: clean ## install the package to the active Python's site-packages
87
+ python setup.py install