ekfsm 1.9.0a31__tar.gz

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 (206) hide show
  1. ekfsm-1.9.0a31/.bandit +52 -0
  2. ekfsm-1.9.0a31/.env +1 -0
  3. ekfsm-1.9.0a31/.envrc +3 -0
  4. ekfsm-1.9.0a31/.flake8 +5 -0
  5. ekfsm-1.9.0a31/.gitattributes +1 -0
  6. ekfsm-1.9.0a31/.gitignore +33 -0
  7. ekfsm-1.9.0a31/.gitlab-ci.yml +332 -0
  8. ekfsm-1.9.0a31/.readthedocs.yaml +32 -0
  9. ekfsm-1.9.0a31/.vscode/launch.json +68 -0
  10. ekfsm-1.9.0a31/.vscode/settings.json +13 -0
  11. ekfsm-1.9.0a31/CHANGELOG.md +336 -0
  12. ekfsm-1.9.0a31/GitVersion.yml +4 -0
  13. ekfsm-1.9.0a31/LICENSE.md +28 -0
  14. ekfsm-1.9.0a31/PKG-INFO +180 -0
  15. ekfsm-1.9.0a31/README.md +156 -0
  16. ekfsm-1.9.0a31/RELEASE_NOTES.md +324 -0
  17. ekfsm-1.9.0a31/changelog-extract.md +4 -0
  18. ekfsm-1.9.0a31/devenv.lock +103 -0
  19. ekfsm-1.9.0a31/devenv.nix +179 -0
  20. ekfsm-1.9.0a31/devenv.yaml +15 -0
  21. ekfsm-1.9.0a31/docs/.gitignore +2 -0
  22. ekfsm-1.9.0a31/docs/Makefile +20 -0
  23. ekfsm-1.9.0a31/docs/requirements.txt +645 -0
  24. ekfsm-1.9.0a31/docs/source/_static/devices.drawio.png +0 -0
  25. ekfsm-1.9.0a31/docs/source/_static/devices.drawio.svg +4 -0
  26. ekfsm-1.9.0a31/docs/source/_static/ekfsm_system.drawio.png +0 -0
  27. ekfsm-1.9.0a31/docs/source/_static/ekfsm_system.drawio.svg +4 -0
  28. ekfsm-1.9.0a31/docs/source/boards/ekf/ccu.rst +151 -0
  29. ekfsm-1.9.0a31/docs/source/boards/ekf/sc5-festival.rst +42 -0
  30. ekfsm-1.9.0a31/docs/source/boards/ekf/sc9-toccata.rst +42 -0
  31. ekfsm-1.9.0a31/docs/source/boards/ekf/se5-club.rst +10 -0
  32. ekfsm-1.9.0a31/docs/source/boards/ekf/sn4-djembe.rst +10 -0
  33. ekfsm-1.9.0a31/docs/source/boards/ekf/snippets/cpci_inventory.rst +20 -0
  34. ekfsm-1.9.0a31/docs/source/boards/ekf/spv-mystic.rst +30 -0
  35. ekfsm-1.9.0a31/docs/source/boards/ekf/sq1-track.rst +8 -0
  36. ekfsm-1.9.0a31/docs/source/boards/ekf/sq3-quartet.rst +8 -0
  37. ekfsm-1.9.0a31/docs/source/boards/ekf/sur-uart.rst +36 -0
  38. ekfsm-1.9.0a31/docs/source/boards/ekf/z1010.rst +317 -0
  39. ekfsm-1.9.0a31/docs/source/boards/hitron/hdrc-300s.rst +63 -0
  40. ekfsm-1.9.0a31/docs/source/boards.rst +112 -0
  41. ekfsm-1.9.0a31/docs/source/conf.py +73 -0
  42. ekfsm-1.9.0a31/docs/source/index.rst +16 -0
  43. ekfsm-1.9.0a31/docs/source/intro.rst +204 -0
  44. ekfsm-1.9.0a31/docs/source/reference/ekfsm.rst +132 -0
  45. ekfsm-1.9.0a31/docs/source/reference/index.rst +13 -0
  46. ekfsm-1.9.0a31/docs/source/reference/systemconfig.rst +88 -0
  47. ekfsm-1.9.0a31/ekfsm/__init__.py +5 -0
  48. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/ccu.yaml +70 -0
  49. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/sc5-festival.yaml +30 -0
  50. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/sc9-toccata.yaml +31 -0
  51. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/se5-club.yaml +41 -0
  52. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/shu-shuttle.yaml +43 -0
  53. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/sn4-djembe.yaml +41 -0
  54. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/spv-mystic.yaml +68 -0
  55. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/sq1-track.yaml +41 -0
  56. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/sq3-quartet.yaml +55 -0
  57. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/srf-fan.yaml +48 -0
  58. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/sur-uart.yaml +72 -0
  59. ekfsm-1.9.0a31/ekfsm/boards/oem/ekf/z1010.yaml +103 -0
  60. ekfsm-1.9.0a31/ekfsm/boards/oem/hitron/hdrc-300s.yaml +24 -0
  61. ekfsm-1.9.0a31/ekfsm/cli.py +139 -0
  62. ekfsm-1.9.0a31/ekfsm/config.py +46 -0
  63. ekfsm-1.9.0a31/ekfsm/core/__init__.py +14 -0
  64. ekfsm-1.9.0a31/ekfsm/core/components.py +131 -0
  65. ekfsm-1.9.0a31/ekfsm/core/connections.py +19 -0
  66. ekfsm-1.9.0a31/ekfsm/core/probe.py +10 -0
  67. ekfsm-1.9.0a31/ekfsm/core/slots.py +199 -0
  68. ekfsm-1.9.0a31/ekfsm/core/sysfs.py +285 -0
  69. ekfsm-1.9.0a31/ekfsm/core/utils.py +156 -0
  70. ekfsm-1.9.0a31/ekfsm/devices/__init__.py +48 -0
  71. ekfsm-1.9.0a31/ekfsm/devices/buttons.py +251 -0
  72. ekfsm-1.9.0a31/ekfsm/devices/coretemp.py +95 -0
  73. ekfsm-1.9.0a31/ekfsm/devices/eeprom.py +1119 -0
  74. ekfsm-1.9.0a31/ekfsm/devices/ekf_ccu_uc.py +498 -0
  75. ekfsm-1.9.0a31/ekfsm/devices/ekf_sur_led.py +71 -0
  76. ekfsm-1.9.0a31/ekfsm/devices/generic.py +400 -0
  77. ekfsm-1.9.0a31/ekfsm/devices/gpio.py +351 -0
  78. ekfsm-1.9.0a31/ekfsm/devices/iio.py +42 -0
  79. ekfsm-1.9.0a31/ekfsm/devices/iio_thermal_humidity.py +48 -0
  80. ekfsm-1.9.0a31/ekfsm/devices/imu.py +18 -0
  81. ekfsm-1.9.0a31/ekfsm/devices/io4edge.py +185 -0
  82. ekfsm-1.9.0a31/ekfsm/devices/leds.py +158 -0
  83. ekfsm-1.9.0a31/ekfsm/devices/mux.py +77 -0
  84. ekfsm-1.9.0a31/ekfsm/devices/pixelDisplay.py +141 -0
  85. ekfsm-1.9.0a31/ekfsm/devices/pmbus.py +222 -0
  86. ekfsm-1.9.0a31/ekfsm/devices/smbios.py +60 -0
  87. ekfsm-1.9.0a31/ekfsm/devices/smbus.py +24 -0
  88. ekfsm-1.9.0a31/ekfsm/devices/ssm.py +318 -0
  89. ekfsm-1.9.0a31/ekfsm/devices/thermal_humidity.py +109 -0
  90. ekfsm-1.9.0a31/ekfsm/devices/toggles.py +84 -0
  91. ekfsm-1.9.0a31/ekfsm/devices/utils.py +60 -0
  92. ekfsm-1.9.0a31/ekfsm/exceptions.py +79 -0
  93. ekfsm-1.9.0a31/ekfsm/lock.py +121 -0
  94. ekfsm-1.9.0a31/ekfsm/log.py +28 -0
  95. ekfsm-1.9.0a31/ekfsm/py.typed +2 -0
  96. ekfsm-1.9.0a31/ekfsm/simctrl.py +176 -0
  97. ekfsm-1.9.0a31/ekfsm/system.py +369 -0
  98. ekfsm-1.9.0a31/ekfsm/utils.py +46 -0
  99. ekfsm-1.9.0a31/ekfsm.code-workspace +15 -0
  100. ekfsm-1.9.0a31/hack/bringup_zip_i2c_devs.sh +6 -0
  101. ekfsm-1.9.0a31/pypi-link.md +11 -0
  102. ekfsm-1.9.0a31/pyproject.toml +111 -0
  103. ekfsm-1.9.0a31/release-notes.md +25 -0
  104. ekfsm-1.9.0a31/scripts/modify-acpi-table.sh +81 -0
  105. ekfsm-1.9.0a31/tests/__init__.py +0 -0
  106. ekfsm-1.9.0a31/tests/analyze_cctv_profile.py +73 -0
  107. ekfsm-1.9.0a31/tests/analyze_profile.py +59 -0
  108. ekfsm-1.9.0a31/tests/basic_sim.py +43 -0
  109. ekfsm-1.9.0a31/tests/cctv-comp1.yaml +47 -0
  110. ekfsm-1.9.0a31/tests/cctv-connecs.py +104 -0
  111. ekfsm-1.9.0a31/tests/cctv-profile.py +148 -0
  112. ekfsm-1.9.0a31/tests/cctv.py +96 -0
  113. ekfsm-1.9.0a31/tests/cctv.yaml +17 -0
  114. ekfsm-1.9.0a31/tests/ccu-test.py +52 -0
  115. ekfsm-1.9.0a31/tests/ccu_wokwi_sim.py +55 -0
  116. ekfsm-1.9.0a31/tests/data/cfg_simple.yaml +13 -0
  117. ekfsm-1.9.0a31/tests/locking/lock_tester.py +35 -0
  118. ekfsm-1.9.0a31/tests/locking/test_lock.py +31 -0
  119. ekfsm-1.9.0a31/tests/profiling_template.py +188 -0
  120. ekfsm-1.9.0a31/tests/props.py +74 -0
  121. ekfsm-1.9.0a31/tests/run.py +36 -0
  122. ekfsm-1.9.0a31/tests/sc5-hitron-only.yaml +15 -0
  123. ekfsm-1.9.0a31/tests/sim/SQ3.png +0 -0
  124. ekfsm-1.9.0a31/tests/sim/__init__.py +4 -0
  125. ekfsm-1.9.0a31/tests/sim/sys/bus/i2c/drivers/at24/.keep +0 -0
  126. ekfsm-1.9.0a31/tests/sim/sys/bus/i2c/drivers/pca953x/.keep +0 -0
  127. ekfsm-1.9.0a31/tests/sim/sys/bus/i2c/drivers/pca954x/.keep +0 -0
  128. ekfsm-1.9.0a31/tests/sim/sys/class/hwmon/hwmon2/name +1 -0
  129. ekfsm-1.9.0a31/tests/sim/sys/class/hwmon/hwmon2/temp1_input +1 -0
  130. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/firmware_node/adr +1 -0
  131. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/name +1 -0
  132. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/new_device +0 -0
  133. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/firmware_node/adr +1 -0
  134. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/name +1 -0
  135. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/new_device +0 -0
  136. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/firmware_node/adr +1 -0
  137. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/name +1 -0
  138. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/new_device +0 -0
  139. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/firmware_node/adr +1 -0
  140. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/firmware_node/description +1 -0
  141. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/gpiochip1/dev +1 -0
  142. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/name +1 -0
  143. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/eeprom +0 -0
  144. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/firmware_node/description +1 -0
  145. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/name +1 -0
  146. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/name +1 -0
  147. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/new_device +0 -0
  148. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/firmware_node/adr +1 -0
  149. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/name +1 -0
  150. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/new_device +0 -0
  151. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/firmware_node/adr +1 -0
  152. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/name +1 -0
  153. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/new_device +0 -0
  154. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/firmware_node/adr +1 -0
  155. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/name +1 -0
  156. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/new_device +0 -0
  157. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/firmware_node/adr +1 -0
  158. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/firmware_node/description +1 -0
  159. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/gpiochip1/dev +1 -0
  160. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/name +1 -0
  161. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/eeprom +0 -0
  162. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/firmware_node/description +1 -0
  163. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/name +1 -0
  164. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/name +1 -0
  165. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/new_device +0 -0
  166. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:00/firmware_node/description +1 -0
  167. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:00/name +1 -0
  168. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/firmware_node/description +1 -0
  169. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/curr1_input +1 -0
  170. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/curr2_input +1 -0
  171. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/in1_input +1 -0
  172. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/in2_input +1 -0
  173. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/model +1 -0
  174. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/revision +1 -0
  175. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/serial +1 -0
  176. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/temp1_input +1 -0
  177. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/vendor +1 -0
  178. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/name +1 -0
  179. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0002:00/firmware_node/description +1 -0
  180. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0002:00/name +1 -0
  181. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/new_device +0 -0
  182. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:1f.4/i2c-7/7-0057/eeprom +0 -0
  183. ekfsm-1.9.0a31/tests/sim/sys/devices/pci0000:00/0000:00:1f.4/i2c-7/7-0057/name +1 -0
  184. ekfsm-1.9.0a31/tests/sim/sys/devices/virtual/dmi/id/board_version +1 -0
  185. ekfsm-1.9.0a31/tests/sim/sys/kernel/debug/pmbus/hwmon99/status0_input +1 -0
  186. ekfsm-1.9.0a31/tests/sim/sys/kernel/debug/pmbus/hwmon99/status1_input +1 -0
  187. ekfsm-1.9.0a31/tests/sim/test_system.yaml +29 -0
  188. ekfsm-1.9.0a31/tests/sim/test_system_inconsistent.yaml +30 -0
  189. ekfsm-1.9.0a31/tests/sq3-only.py +112 -0
  190. ekfsm-1.9.0a31/tests/sq3-only.yaml +15 -0
  191. ekfsm-1.9.0a31/tests/srf-fan-test.py +31 -0
  192. ekfsm-1.9.0a31/tests/srf-fan-test.yaml +15 -0
  193. ekfsm-1.9.0a31/tests/test_config.py +23 -0
  194. ekfsm-1.9.0a31/tests/test_module_schema.py +28 -0
  195. ekfsm-1.9.0a31/tests/test_sim-ccu-eeprom.py +48 -0
  196. ekfsm-1.9.0a31/tests/test_sim1.py +67 -0
  197. ekfsm-1.9.0a31/tests/test_sim2.py +74 -0
  198. ekfsm-1.9.0a31/tests/zip2-ccu-only.yaml +15 -0
  199. ekfsm-1.9.0a31/tests/zip2-comp1.yaml +59 -0
  200. ekfsm-1.9.0a31/tests/zip2-comp1_smoke.py +75 -0
  201. ekfsm-1.9.0a31/tests/zip2-comp2.yaml +59 -0
  202. ekfsm-1.9.0a31/tests/zip2-comp2_smoke.py +66 -0
  203. ekfsm-1.9.0a31/tests/zip2_ccu_exp.py +50 -0
  204. ekfsm-1.9.0a31/tests/zip2_ccu_imu.py +23 -0
  205. ekfsm-1.9.0a31/tests/zip2_psu.py +31 -0
  206. ekfsm-1.9.0a31/uv.lock +1321 -0
ekfsm-1.9.0a31/.bandit ADDED
@@ -0,0 +1,52 @@
1
+ # Bandit configuration file for ekfsm
2
+ # Security linter for Python code
3
+
4
+ # Directories and files to scan
5
+ targets:
6
+ - ekfsm
7
+
8
+ # Directories and files to exclude from scanning
9
+ exclude_dirs:
10
+ - tests
11
+ - docs
12
+ - .devenv
13
+ - .direnv
14
+ - __pycache__
15
+ - .mypy_cache
16
+ - .pytest_cache
17
+ - hack
18
+ - scripts
19
+
20
+ # Test IDs to skip (uncomment and modify as needed)
21
+ # skips:
22
+ # - B101
23
+ # - B601
24
+
25
+ # Test IDs to include (leave empty to include all)
26
+ # tests:
27
+
28
+ # Confidence levels: LOW, MEDIUM, HIGH
29
+ confidence: MEDIUM
30
+
31
+ # Severity levels: LOW, MEDIUM, HIGH
32
+ severity: MEDIUM
33
+
34
+ # Output format: csv, custom, html, json, screen, txt, xml, yaml
35
+ format: screen
36
+
37
+ # Recursive scan
38
+ recursive: true
39
+
40
+ # Common security checks:
41
+ # - B101: assert_used - Skip if asserts are acceptable in your production code
42
+ # - B201: flask_debug_true - Skip if using Flask debug mode is intentional
43
+ # - B301: pickle - Skip if pickle usage is intentional and secure
44
+ # - B403: import_subprocess - Skip if subprocess usage is intentional and secure
45
+ # - B404: import_subprocess - Skip if subprocess usage is intentional and secure
46
+ # - B603: subprocess_without_shell_equals_true - Skip if subprocess usage is secure
47
+ # - B607: start_process_with_partial_path - Skip if partial paths are acceptable
48
+
49
+ # Additional notes:
50
+ # - Review any HIGH severity issues immediately
51
+ # - MEDIUM severity issues should be evaluated for security impact
52
+ # - LOW severity issues are suggestions for best practices
ekfsm-1.9.0a31/.env ADDED
@@ -0,0 +1 @@
1
+ export PYTHONPATH=.:$PYTHONPATH:../io4edge-client-python
ekfsm-1.9.0a31/.envrc ADDED
@@ -0,0 +1,3 @@
1
+ source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="
2
+
3
+ use devenv
ekfsm-1.9.0a31/.flake8 ADDED
@@ -0,0 +1,5 @@
1
+ [flake8]
2
+ max-line-length = 130
3
+ max-complexity = 18
4
+ exclude = myenv/ .venv/ docs/
5
+ extend-ignore = E203
@@ -0,0 +1 @@
1
+ *.png filter=lfs diff=lfs merge=lfs -text
@@ -0,0 +1,33 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.pyo
4
+ .venv/
5
+ .DS_Store
6
+ myenv/
7
+ .mypy_cache/
8
+ .python-version
9
+ dist/
10
+ **/*.egg-info/
11
+ coverage.xml
12
+ report.xml
13
+ .coverage
14
+ result/
15
+ result
16
+ result-dist
17
+ pytest.log
18
+ .direnv/
19
+ *.log
20
+
21
+
22
+ # Devenv
23
+ .devenv*
24
+ devenv.local.nix
25
+
26
+ # direnv
27
+ .direnv
28
+
29
+ # pre-commit
30
+ .pre-commit-config.yaml
31
+
32
+ # Bandit report
33
+ bandit-report.*
@@ -0,0 +1,332 @@
1
+ include:
2
+ - project: templates/cicd
3
+ file: versioning.yml
4
+ - template: Jobs/Code-Quality.gitlab-ci.yml
5
+ #- template: Jobs/Dependency-Scanning.v2.gitlab-ci.yml
6
+
7
+ workflow:
8
+ name: $CI_COMMIT_MESSAGE
9
+ rules:
10
+ - if: $CI_COMMIT_TAG
11
+ when: never
12
+ - if: $CI_PIPELINE_SOURCE =~ /^(push|web)$/
13
+ when: always
14
+
15
+ .default_rule_hotfix: &default_rule_hotfix
16
+ - if: $CI_COMMIT_BRANCH =~ /^hotfix(\/|-).*/
17
+ when: on_success
18
+
19
+ default:
20
+ image:
21
+ name: $CI_REGISTRY/docker-container/nix-build:0.1.6 # Necessary due to if-not-present policy
22
+ tags:
23
+ - shell
24
+ - nix
25
+ interruptible: false
26
+
27
+ variables:
28
+ CI_DEBUG_TRACE: $DEBUG # use value from gitlab project var
29
+ CI_SCRIPT_TRACE: $DEBUG
30
+ CI_GITVERSION_TRACE: $DEBUG
31
+ PACKAGE_REGISTRY_URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi
32
+
33
+ stages:
34
+ - test
35
+ - security
36
+ - 💻 release
37
+ - 🧱 build
38
+ - ⬆️ deploy
39
+
40
+ coverage:
41
+ stage: test
42
+ before_script:
43
+ - direnv allow .
44
+ script:
45
+ - echo "Coverage stage"
46
+ - direnv exec . generate-coverage
47
+ coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+)%/' # Extract the total test coverage percentage
48
+ artifacts:
49
+ reports:
50
+ coverage_report:
51
+ coverage_format: cobertura
52
+ path: coverage.xml # Cobertura-compatible XML report
53
+ junit: report.xml # JUnit-compatible XML report
54
+ paths:
55
+ - coverage.xml # Ensure the XML report is uploaded as an artifact
56
+ - report.xml # Ensure the JUnit report is uploaded as an artifact
57
+
58
+ code_quality:
59
+ services: [] # Shut off Docker-in-Docker
60
+ tags:
61
+ - cq-wo-dind
62
+
63
+ code_quality_html:
64
+ extends: code_quality
65
+ variables:
66
+ REPORT_FORMAT: html
67
+ artifacts:
68
+ paths: [gl-code-quality-report.html]
69
+
70
+ lint:
71
+ stage: test
72
+ before_script:
73
+ - direnv allow .
74
+ script:
75
+ - echo "Lint stage"
76
+ - direnv exec . lint
77
+
78
+ bandit-scan:
79
+ stage: security
80
+ script:
81
+ - direnv exec . sast-scan
82
+ artifacts:
83
+ reports:
84
+ sast: bandit-report.json
85
+ paths:
86
+ - bandit-report.json
87
+ needs:
88
+ - version
89
+
90
+ audit-scan:
91
+ stage: security
92
+ script:
93
+ - direnv exec . audit-scan
94
+ artifacts:
95
+ reports:
96
+ dependency_scanning: gl-dependency-scanning-report.json
97
+ paths:
98
+ - gl-sbom.json
99
+ - gl-dependency-scanning-report.json
100
+ - uv.lock
101
+
102
+ typing:
103
+ stage: test
104
+ before_script:
105
+ - direnv allow .
106
+ script:
107
+ - echo "Typing stage"
108
+ - direnv exec . typing
109
+
110
+ release:
111
+ stage: 💻 release
112
+ image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0
113
+ tags:
114
+ - shared
115
+ variables:
116
+ GIT_STRATEGY: clone
117
+ GIT_DEPTH: 0
118
+ rules:
119
+ - *default_rule_hotfix
120
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "develop"
121
+ when: on_success
122
+ script:
123
+ - echo "Creating release ${GitVersion_SemVer} with release notes..."
124
+ - |
125
+ # Extract the latest (first) release note from RELEASE_NOTES.md
126
+ if [ -f "RELEASE_NOTES.md" ]; then
127
+ # Extract everything from the first ## heading (after Overview) until the next ## heading
128
+ awk '
129
+ /^---$/ && !started { next }
130
+ /^## / && !overview_passed && /Overview/ { overview_passed=1; next }
131
+ /^## / && overview_passed && !started { started=1; print; next }
132
+ started && /^## / && !/^## / { started=0; exit }
133
+ started && /^---$/ { started=0; exit }
134
+ started { print }
135
+ ' RELEASE_NOTES.md > release-notes.md
136
+
137
+ # If extraction failed, create a basic release note
138
+ if [ ! -s release-notes.md ]; then
139
+ echo "# Release ${GitVersion_SemVer}" > release-notes.md
140
+ echo "" >> release-notes.md
141
+ echo "**Commit Message:** $CI_COMMIT_MESSAGE" >> release-notes.md
142
+ echo "" >> release-notes.md
143
+ echo "For detailed release information, see the [full release notes](RELEASE_NOTES.md)." >> release-notes.md
144
+ fi
145
+ else
146
+ # Fallback to commit message if RELEASE_NOTES.md doesn't exist
147
+ echo "# Release ${GitVersion_SemVer}" > release-notes.md
148
+ echo "" >> release-notes.md
149
+ echo "$CI_COMMIT_MESSAGE" >> release-notes.md
150
+ fi
151
+ - echo "Release notes content:"
152
+ - cat release-notes.md
153
+ - |
154
+ # Create PyPI package link file
155
+ echo "# PyPI Package" > pypi-link.md
156
+ echo "" >> pypi-link.md
157
+ echo "This release is available on PyPI:" >> pypi-link.md
158
+ echo "" >> pypi-link.md
159
+ echo "- **Package:** [ekfsm v${GitVersion_SemVer}](https://pypi.org/project/ekfsm/${GitVersion_SemVer}/)" >> pypi-link.md
160
+ echo "- **Installation:** \`pip install ekfsm==${GitVersion_SemVer}\`" >> pypi-link.md
161
+ echo "" >> pypi-link.md
162
+ echo "## Alternative Installations" >> pypi-link.md
163
+ echo "" >> pypi-link.md
164
+ echo "- **Latest stable:** \`pip install ekfsm\`" >> pypi-link.md
165
+ echo "- **From source:** \`pip install git+https://gitlab.com/path/to/ekfsm@v${GitVersion_SemVer}\`" >> pypi-link.md
166
+ - |
167
+ # Extract changelog section for current version
168
+ if [ -f "CHANGELOG.md" ]; then
169
+ awk "
170
+ /^\[${GitVersion_SemVer}\]/ { found=1; print; next }
171
+ found && /^\[/ && !/^\[${GitVersion_SemVer}\]/ { found=0 }
172
+ found { print }
173
+ " CHANGELOG.md > changelog-extract.md
174
+
175
+ # If no specific version found in changelog, create a basic one
176
+ if [ ! -s changelog-extract.md ]; then
177
+ echo "## [${GitVersion_SemVer}] - $(date +%Y-%m-%d)" > changelog-extract.md
178
+ echo "" >> changelog-extract.md
179
+ echo "### Changed" >> changelog-extract.md
180
+ echo "- Release ${GitVersion_SemVer}" >> changelog-extract.md
181
+ fi
182
+ else
183
+ echo "## [${GitVersion_SemVer}] - $(date +%Y-%m-%d)" > changelog-extract.md
184
+ echo "" >> changelog-extract.md
185
+ echo "### Changed" >> changelog-extract.md
186
+ echo "- Release ${GitVersion_SemVer}" >> changelog-extract.md
187
+ fi
188
+ release:
189
+ tag_name: "v${GitVersion_SemVer}"
190
+ description: release-notes.md
191
+ ref: "$CI_COMMIT_SHA"
192
+ assets:
193
+ links:
194
+ - name: "📋 Full Release Notes"
195
+ url: "${CI_PROJECT_URL}/-/blob/v${GitVersion_SemVer}/RELEASE_NOTES.md"
196
+ filepath: "/RELEASE_NOTES.md"
197
+ link_type: other
198
+ - name: "📝 Full Changelog"
199
+ url: "${CI_PROJECT_URL}/-/blob/v${GitVersion_SemVer}/CHANGELOG.md"
200
+ filepath: "/CHANGELOG.md"
201
+ link_type: other
202
+ - name: "📦 PyPI Package"
203
+ url: "https://pypi.org/project/ekfsm/${GitVersion_SemVer}/"
204
+ filepath: "/pypi"
205
+ link_type: package
206
+ - name: "🐍 Package Installation"
207
+ url: "https://pypi.org/project/ekfsm/"
208
+ filepath: "/install"
209
+ link_type: package
210
+ artifacts:
211
+ paths:
212
+ - release-notes.md
213
+ - pypi-link.md
214
+ - changelog-extract.md
215
+ expire_in: 30 days
216
+ needs:
217
+ - version
218
+ - coverage
219
+ - lint
220
+ - typing
221
+
222
+ pkg:
223
+ stage: 🧱 build
224
+ variables:
225
+ GIT_STRATEGY: clone
226
+ GIT_DEPTH: 0
227
+ GIT_SUBMODULE_STRATEGY: recursive
228
+ before_script:
229
+ - echo "Starting build"
230
+ - direnv allow .
231
+ script:
232
+ - echo "Building package..."
233
+ - direnv exec . generate-package
234
+ needs:
235
+ - job: release
236
+ optional: true
237
+ - job: coverage
238
+ - job: lint
239
+ - job: typing
240
+ artifacts:
241
+ untracked: false
242
+ when: on_success
243
+ expire_in: "30 days"
244
+ paths:
245
+ - dist/
246
+
247
+ build-html-docs:
248
+ stage: 🧱 build
249
+ before_script:
250
+ - direnv allow .
251
+ script:
252
+ - echo "Building HTML documentation..."
253
+ - direnv exec . doc-html
254
+ artifacts:
255
+ when: on_success
256
+ paths:
257
+ - docs/build/html
258
+
259
+ build-man-pages:
260
+ stage: 🧱 build
261
+ before_script:
262
+ - direnv allow .
263
+ script:
264
+ - echo "Building man page documentation..."
265
+ - direnv exec . doc-man-pages
266
+ artifacts:
267
+ when: on_success
268
+ paths:
269
+ - docs/build/man/ekfsm.1
270
+
271
+ build-pdf-doc:
272
+ stage: 🧱 build
273
+ before_script:
274
+ - direnv allow .
275
+ script:
276
+ - echo "Building PDF documentation..."
277
+ - direnv exec . doc-pdf
278
+ artifacts:
279
+ when: on_success
280
+ paths:
281
+ - docs/build/latex/ekfsm.pdf
282
+
283
+ build-doc-coverage:
284
+ stage: 🧱 build
285
+ before_script:
286
+ - direnv allow .
287
+ script:
288
+ - echo "Compute documentation coverage..."
289
+ - direnv exec . doc-coverage
290
+ coverage: '/TOTAL\s+\|\s+(\d+\.\d+%)/' # Extract the total doc coverage percentage
291
+ artifacts:
292
+ when: on_success
293
+ paths:
294
+ - docs/build/coverage
295
+
296
+ deploy-gitlab-pypi:
297
+ stage: ⬆️ deploy
298
+ image: python:3.12
299
+ tags:
300
+ - shared
301
+ variables:
302
+ GIT_STRATEGY: none
303
+ GIT_SUBMODULE_STRATEGY: recursive
304
+ rules:
305
+ - *default_rule_hotfix
306
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "develop"
307
+ when: on_success
308
+ before_script:
309
+ - echo "Install twine..."
310
+ - python -m pip install twine
311
+ script:
312
+ - echo "Deploying version ${GitVersion_SemVer} to gitlab pypi repository..."
313
+ - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${PACKAGE_REGISTRY_URL} dist/*
314
+ needs:
315
+ - pkg
316
+
317
+ deploy-pypi:
318
+ stage: ⬆️ deploy
319
+ variables:
320
+ GIT_STRATEGY: clone
321
+ GIT_SUBMODULE_STRATEGY: recursive
322
+ rules:
323
+ - *default_rule_hotfix
324
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "develop"
325
+ when: on_success
326
+ before_script:
327
+ - direnv allow .
328
+ script:
329
+ - echo "Deploying version ${GitVersion_SemVer} to pypi repository..."
330
+ - direnv exec . publish-package
331
+ needs:
332
+ - pkg
@@ -0,0 +1,32 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the OS, Python version and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "3.12"
13
+ # You can also specify other tool versions:
14
+ # nodejs: "19"
15
+ # rust: "1.64"
16
+ # golang: "1.19"
17
+
18
+ # Build documentation in the "docs/" directory with Sphinx
19
+ sphinx:
20
+ configuration: docs/source/conf.py
21
+
22
+ # Optionally build your docs in additional formats such as PDF and ePub
23
+ # formats:
24
+ # - pdf
25
+ # - epub
26
+
27
+ # Optional but recommended, declare the Python requirements required
28
+ # to build your documentation
29
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
30
+ python:
31
+ install:
32
+ - requirements: docs/requirements.txt
@@ -0,0 +1,68 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+
8
+ {
9
+ "name": "Debug CLI DB-ZIP",
10
+ "type": "python",
11
+ "request": "launch",
12
+ "program": "${workspaceFolder}/ekfsm/cli.py",
13
+ "console": "integratedTerminal",
14
+ "env": {
15
+ "PYTHONPATH": "${workspaceFolder}:$PYTHONPATH"
16
+ },
17
+ "args": ["-v","tests/zip2-ccu-only.yaml", "write","serial","12312312"],
18
+ "justMyCode": true,
19
+ "sudo": true
20
+ },
21
+ {
22
+ "name": "Debug CLI SIM",
23
+ "type": "python",
24
+ "request": "launch",
25
+ "program": "${workspaceFolder}/ekfsm/cli.py",
26
+ "console": "integratedTerminal",
27
+ "env": {
28
+ "PYTHONPATH": "${workspaceFolder}:$PYTHONPATH"
29
+ },
30
+ "args": ["-v","-s","tests/sim/sys","tests/sim/test_system.yaml", "show"],
31
+ "justMyCode": true,
32
+ "sudo": true
33
+ },
34
+ {
35
+ "name": "Python: Current File (sudo)",
36
+ "type": "python",
37
+ "request": "launch",
38
+ "program": "${file}",
39
+ "console": "integratedTerminal",
40
+ "env": {
41
+ "PYTHONPATH": "${workspaceFolder}:$PYTHONPATH"
42
+ },
43
+ "sudo": true
44
+ },
45
+ {
46
+ "name": "Python Debugger: Current File (sudo)",
47
+ "type": "debugpy",
48
+ "request": "launch",
49
+ "program": "${file}",
50
+ "console": "integratedTerminal",
51
+ "env": {
52
+ "PYTHONPATH": "${workspaceFolder}:$PYTHONPATH"
53
+ },
54
+ "sudo": true
55
+ },
56
+ {
57
+ "name": "Python Debugger: Current File",
58
+ "type": "debugpy",
59
+ "request": "launch",
60
+ "program": "${file}",
61
+ "console": "integratedTerminal",
62
+ "env": {
63
+ "PYTHONPATH": "${workspaceFolder}:$PYTHONPATH"
64
+ },
65
+ "sudo": false
66
+ }
67
+ ]
68
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "mypy-type-checker.reportingScope": "workspace",
3
+ "editor.defaultFormatter": "ms-python.black-formatter",
4
+ "editor.formatOnSave": true,
5
+ "mypy-type-checker.preferDaemon": true,
6
+ "mypy-type-checker.importStrategy": "fromEnvironment",
7
+ "autoDocstring.docstringFormat": "numpy-notypes",
8
+ "autoDocstring.startOnNewLine": true,
9
+ "makefile.configureOnOpen": false,
10
+ "[python]": {
11
+ "editor.defaultFormatter": "ms-python.black-formatter"
12
+ }
13
+ }