ekfsm 0.11.0b1.post3__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.

Potentially problematic release.


This version of ekfsm might be problematic. Click here for more details.

Files changed (145) hide show
  1. ekfsm-0.11.0b1.post3/.env +1 -0
  2. ekfsm-0.11.0b1.post3/.envrc +3 -0
  3. ekfsm-0.11.0b1.post3/.flake8 +5 -0
  4. ekfsm-0.11.0b1.post3/.gitignore +27 -0
  5. ekfsm-0.11.0b1.post3/.gitlab-ci.yml +201 -0
  6. ekfsm-0.11.0b1.post3/.readthedocs.yaml +32 -0
  7. ekfsm-0.11.0b1.post3/.vscode/launch.json +67 -0
  8. ekfsm-0.11.0b1.post3/.vscode/settings.json +13 -0
  9. ekfsm-0.11.0b1.post3/LICENSE.md +28 -0
  10. ekfsm-0.11.0b1.post3/PKG-INFO +86 -0
  11. ekfsm-0.11.0b1.post3/README.md +68 -0
  12. ekfsm-0.11.0b1.post3/devenv.lock +103 -0
  13. ekfsm-0.11.0b1.post3/devenv.nix +114 -0
  14. ekfsm-0.11.0b1.post3/devenv.yaml +15 -0
  15. ekfsm-0.11.0b1.post3/docs/.gitignore +2 -0
  16. ekfsm-0.11.0b1.post3/docs/Makefile +20 -0
  17. ekfsm-0.11.0b1.post3/docs/requirements.txt +282 -0
  18. ekfsm-0.11.0b1.post3/docs/source/_static/devices.drawio.png +0 -0
  19. ekfsm-0.11.0b1.post3/docs/source/_static/devices.drawio.svg +4 -0
  20. ekfsm-0.11.0b1.post3/docs/source/_static/ekfsm_system.drawio.png +0 -0
  21. ekfsm-0.11.0b1.post3/docs/source/_static/ekfsm_system.drawio.svg +4 -0
  22. ekfsm-0.11.0b1.post3/docs/source/boards/ekf/ccu.rst +115 -0
  23. ekfsm-0.11.0b1.post3/docs/source/boards/ekf/sc9-toccata.rst +40 -0
  24. ekfsm-0.11.0b1.post3/docs/source/boards/ekf/snippets/cpci_inventory.rst +16 -0
  25. ekfsm-0.11.0b1.post3/docs/source/boards/ekf/spv-mystic.rst +28 -0
  26. ekfsm-0.11.0b1.post3/docs/source/boards/ekf/sq1-track.rst +8 -0
  27. ekfsm-0.11.0b1.post3/docs/source/boards/ekf/sur-uart.rst +36 -0
  28. ekfsm-0.11.0b1.post3/docs/source/boards.rst +11 -0
  29. ekfsm-0.11.0b1.post3/docs/source/conf.py +71 -0
  30. ekfsm-0.11.0b1.post3/docs/source/index.rst +16 -0
  31. ekfsm-0.11.0b1.post3/docs/source/intro.rst +194 -0
  32. ekfsm-0.11.0b1.post3/docs/source/reference/ekfsm.rst +78 -0
  33. ekfsm-0.11.0b1.post3/docs/source/reference/index.rst +13 -0
  34. ekfsm-0.11.0b1.post3/docs/source/reference/systemconfig.rst +64 -0
  35. ekfsm-0.11.0b1.post3/ekfsm/__init__.py +13 -0
  36. ekfsm-0.11.0b1.post3/ekfsm/boards/oem/ekf/ccu.yaml +68 -0
  37. ekfsm-0.11.0b1.post3/ekfsm/boards/oem/ekf/sc5-festival.yaml +30 -0
  38. ekfsm-0.11.0b1.post3/ekfsm/boards/oem/ekf/sc9-toccata.yaml +31 -0
  39. ekfsm-0.11.0b1.post3/ekfsm/boards/oem/ekf/spv-mystic.yaml +68 -0
  40. ekfsm-0.11.0b1.post3/ekfsm/boards/oem/ekf/sq1-track.yaml +41 -0
  41. ekfsm-0.11.0b1.post3/ekfsm/boards/oem/ekf/srf-fan.yaml +48 -0
  42. ekfsm-0.11.0b1.post3/ekfsm/boards/oem/ekf/sur-uart.yaml +72 -0
  43. ekfsm-0.11.0b1.post3/ekfsm/boards/oem/hitron/hdrc-300.yaml +20 -0
  44. ekfsm-0.11.0b1.post3/ekfsm/cli.py +111 -0
  45. ekfsm-0.11.0b1.post3/ekfsm/config.py +37 -0
  46. ekfsm-0.11.0b1.post3/ekfsm/core/__init__.py +4 -0
  47. ekfsm-0.11.0b1.post3/ekfsm/core/components.py +120 -0
  48. ekfsm-0.11.0b1.post3/ekfsm/core/probe.py +10 -0
  49. ekfsm-0.11.0b1.post3/ekfsm/core/slots.py +201 -0
  50. ekfsm-0.11.0b1.post3/ekfsm/core/sysfs.py +91 -0
  51. ekfsm-0.11.0b1.post3/ekfsm/core/utils.py +77 -0
  52. ekfsm-0.11.0b1.post3/ekfsm/devices/__init__.py +28 -0
  53. ekfsm-0.11.0b1.post3/ekfsm/devices/eeprom.py +1054 -0
  54. ekfsm-0.11.0b1.post3/ekfsm/devices/ekf_ccu_uc.py +390 -0
  55. ekfsm-0.11.0b1.post3/ekfsm/devices/ekf_sur_led.py +67 -0
  56. ekfsm-0.11.0b1.post3/ekfsm/devices/generic.py +245 -0
  57. ekfsm-0.11.0b1.post3/ekfsm/devices/gpio.py +340 -0
  58. ekfsm-0.11.0b1.post3/ekfsm/devices/hwmon.py +71 -0
  59. ekfsm-0.11.0b1.post3/ekfsm/devices/iio.py +58 -0
  60. ekfsm-0.11.0b1.post3/ekfsm/devices/iio_thermal_humidity.py +41 -0
  61. ekfsm-0.11.0b1.post3/ekfsm/devices/mux.py +39 -0
  62. ekfsm-0.11.0b1.post3/ekfsm/devices/pmbus.py +65 -0
  63. ekfsm-0.11.0b1.post3/ekfsm/devices/smbios.py +38 -0
  64. ekfsm-0.11.0b1.post3/ekfsm/devices/utils.py +16 -0
  65. ekfsm-0.11.0b1.post3/ekfsm/exceptions.py +58 -0
  66. ekfsm-0.11.0b1.post3/ekfsm/log.py +28 -0
  67. ekfsm-0.11.0b1.post3/ekfsm/py.typed +2 -0
  68. ekfsm-0.11.0b1.post3/ekfsm/simctrl.py +241 -0
  69. ekfsm-0.11.0b1.post3/ekfsm/system.py +326 -0
  70. ekfsm-0.11.0b1.post3/hack/bringup_zip_i2c_devs.sh +6 -0
  71. ekfsm-0.11.0b1.post3/pyproject.toml +88 -0
  72. ekfsm-0.11.0b1.post3/scripts/modify-acpi-table.sh +87 -0
  73. ekfsm-0.11.0b1.post3/tests/__init__.py +0 -0
  74. ekfsm-0.11.0b1.post3/tests/basic_sim.py +47 -0
  75. ekfsm-0.11.0b1.post3/tests/ccu-test.py +53 -0
  76. ekfsm-0.11.0b1.post3/tests/ccu_wokwi_sim.py +59 -0
  77. ekfsm-0.11.0b1.post3/tests/run.py +36 -0
  78. ekfsm-0.11.0b1.post3/tests/sim/__init__.py +4 -0
  79. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/firmware_node/adr +1 -0
  80. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/name +1 -0
  81. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/new_device +0 -0
  82. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/firmware_node/adr +1 -0
  83. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/name +1 -0
  84. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/new_device +0 -0
  85. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/firmware_node/adr +1 -0
  86. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/name +1 -0
  87. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/new_device +0 -0
  88. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/firmware_node/adr +1 -0
  89. ekfsm-0.11.0b1.post3/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
  90. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/gpiochip1/dev +1 -0
  91. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/name +1 -0
  92. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/eeprom +0 -0
  93. ekfsm-0.11.0b1.post3/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
  94. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/name +1 -0
  95. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/name +1 -0
  96. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/new_device +0 -0
  97. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/firmware_node/adr +1 -0
  98. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/name +1 -0
  99. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/new_device +0 -0
  100. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/firmware_node/adr +1 -0
  101. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/name +1 -0
  102. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/new_device +0 -0
  103. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/firmware_node/adr +1 -0
  104. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/name +1 -0
  105. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/new_device +0 -0
  106. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/firmware_node/adr +1 -0
  107. ekfsm-0.11.0b1.post3/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
  108. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/gpiochip1/dev +1 -0
  109. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/name +1 -0
  110. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/eeprom +0 -0
  111. ekfsm-0.11.0b1.post3/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
  112. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/name +1 -0
  113. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/name +1 -0
  114. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/new_device +0 -0
  115. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:00/firmware_node/description +1 -0
  116. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:00/name +1 -0
  117. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/firmware_node/description +1 -0
  118. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/curr1_input +1 -0
  119. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/curr2_input +1 -0
  120. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/in1_input +1 -0
  121. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/in2_input +1 -0
  122. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/model +1 -0
  123. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/revision +1 -0
  124. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/serial +1 -0
  125. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/vendor +1 -0
  126. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/name +1 -0
  127. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0002:00/firmware_node/description +1 -0
  128. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0002:00/name +1 -0
  129. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/new_device +0 -0
  130. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:1f.4/i2c-7/7-0057/eeprom +0 -0
  131. ekfsm-0.11.0b1.post3/tests/sim/sys/devices/pci0000:00/0000:00:1f.4/i2c-7/7-0057/name +1 -0
  132. ekfsm-0.11.0b1.post3/tests/sim/test_system.yaml +27 -0
  133. ekfsm-0.11.0b1.post3/tests/sim/test_system_inconsistent.yaml +30 -0
  134. ekfsm-0.11.0b1.post3/tests/srf-fan-test.py +31 -0
  135. ekfsm-0.11.0b1.post3/tests/srf-fan-test.yaml +15 -0
  136. ekfsm-0.11.0b1.post3/tests/test_config.py +22 -0
  137. ekfsm-0.11.0b1.post3/tests/test_sim-ccu-eeprom.py +50 -0
  138. ekfsm-0.11.0b1.post3/tests/test_sim1.py +61 -0
  139. ekfsm-0.11.0b1.post3/tests/test_sim2.py +76 -0
  140. ekfsm-0.11.0b1.post3/tests/testdata/cfg_simple.yaml +13 -0
  141. ekfsm-0.11.0b1.post3/tests/zip2-ccu-only.yaml +15 -0
  142. ekfsm-0.11.0b1.post3/tests/zip2-smoke.yaml +33 -0
  143. ekfsm-0.11.0b1.post3/tests/zip2_ccu_exp.py +46 -0
  144. ekfsm-0.11.0b1.post3/tests/zip2_smoke.py +48 -0
  145. ekfsm-0.11.0b1.post3/uv.lock +803 -0
@@ -0,0 +1 @@
1
+ export PYTHONPATH=.:$PYTHONPATH
@@ -0,0 +1,3 @@
1
+ source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="
2
+
3
+ use devenv
@@ -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,27 @@
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
+ # Devenv
20
+ .devenv*
21
+ devenv.local.nix
22
+
23
+ # direnv
24
+ .direnv
25
+
26
+ # pre-commit
27
+ .pre-commit-config.yaml
@@ -0,0 +1,201 @@
1
+ include:
2
+ - project: templates/cicd
3
+ file: versioning.yml
4
+ - template: Jobs/Code-Quality.gitlab-ci.yml
5
+
6
+ workflow:
7
+ name: $CI_COMMIT_MESSAGE
8
+ rules:
9
+ - if: $CI_COMMIT_TAG
10
+ when: never
11
+ - if: $CI_PIPELINE_SOURCE =~ /^(push|web)$/
12
+ when: always
13
+
14
+ .default_rule_hotfix: &default_rule_hotfix
15
+ - if: $CI_COMMIT_BRANCH =~ /^hotfix(\/|-).*/
16
+ when: on_success
17
+
18
+ default:
19
+ image:
20
+ name: $CI_REGISTRY/docker-container/nix-build:0.1.6 # Necessary due to if-not-present policy
21
+ tags:
22
+ - shell
23
+ - nix
24
+ interruptible: false
25
+
26
+ variables:
27
+ CI_DEBUG_TRACE: $DEBUG # use value from gitlab project var
28
+ CI_SCRIPT_TRACE: $DEBUG
29
+ CI_GITVERSION_TRACE: $DEBUG
30
+ PACKAGE_REGISTRY_URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi
31
+
32
+ stages:
33
+ - test
34
+ - 💻 release
35
+ - 🧱 build
36
+ - ⬆️ deploy
37
+
38
+ coverage:
39
+ stage: test
40
+ before_script:
41
+ - direnv allow .
42
+ script:
43
+ - echo "Coverage stage"
44
+ - direnv exec . generate-coverage
45
+ coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+)%/' # Extract the total test coverage percentage
46
+ artifacts:
47
+ reports:
48
+ coverage_report:
49
+ coverage_format: cobertura
50
+ path: coverage.xml # Cobertura-compatible XML report
51
+ junit: report.xml # JUnit-compatible XML report
52
+ paths:
53
+ - coverage.xml # Ensure the XML report is uploaded as an artifact
54
+ - report.xml # Ensure the JUnit report is uploaded as an artifact
55
+
56
+ code_quality:
57
+ services: [] # Shut off Docker-in-Docker
58
+ tags:
59
+ - cq-wo-dind
60
+
61
+ code_quality_html:
62
+ extends: code_quality
63
+ variables:
64
+ REPORT_FORMAT: html
65
+ artifacts:
66
+ paths: [gl-code-quality-report.html]
67
+
68
+ lint:
69
+ stage: test
70
+ before_script:
71
+ - direnv allow .
72
+ script:
73
+ - echo "Lint stage"
74
+ - direnv exec . lint
75
+
76
+ typing:
77
+ stage: test
78
+ before_script:
79
+ - direnv allow .
80
+ script:
81
+ - echo "Typing stage"
82
+ - direnv exec . typing
83
+
84
+ release:
85
+ stage: 💻 release
86
+ image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0
87
+ tags:
88
+ - shared
89
+ variables:
90
+ GIT_STRATEGY: none
91
+ GIT_SUBMODULE_STRATEGY: none
92
+ rules:
93
+ - *default_rule_hotfix
94
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "develop"
95
+ when: on_success
96
+ script:
97
+ - echo "Creating release ${GitVersion_SemVer} /w Asset debian packages..."
98
+ release:
99
+ tag_name: "v${GitVersion_SemVer}"
100
+ description: "$CI_COMMIT_MESSAGE"
101
+ ref: "$CI_COMMIT_SHA"
102
+ needs:
103
+ - version
104
+ - coverage
105
+ - lint
106
+ - typing
107
+
108
+ pkg:
109
+ stage: 🧱 build
110
+ variables:
111
+ GIT_STRATEGY: clone
112
+ GIT_DEPTH: 0
113
+ GIT_SUBMODULE_STRATEGY: recursive
114
+ before_script:
115
+ - echo "Starting build"
116
+ - direnv allow .
117
+ script:
118
+ - echo "Building package..."
119
+ - direnv exec . generate-package
120
+ needs:
121
+ - job: release
122
+ optional: true
123
+ - job: coverage
124
+ - job: lint
125
+ - job: typing
126
+ artifacts:
127
+ untracked: false
128
+ when: on_success
129
+ expire_in: "30 days"
130
+ paths:
131
+ - dist/
132
+
133
+ build-html-docs:
134
+ stage: 🧱 build
135
+ before_script:
136
+ - direnv allow .
137
+ script:
138
+ - echo "Building HTML documentation..."
139
+ - direnv exec . doc-html
140
+ artifacts:
141
+ when: on_success
142
+ paths:
143
+ - docs/build/html
144
+
145
+ build-man-pages:
146
+ stage: 🧱 build
147
+ before_script:
148
+ - direnv allow .
149
+ script:
150
+ - echo "Building man page documentation..."
151
+ - direnv exec . doc-man-pages
152
+ artifacts:
153
+ when: on_success
154
+ paths:
155
+ - docs/build/man/ekfsm.1
156
+
157
+ build-pdf-doc:
158
+ stage: 🧱 build
159
+ before_script:
160
+ - direnv allow .
161
+ script:
162
+ - echo "Building PDF documentation..."
163
+ - direnv exec . doc-pdf
164
+ artifacts:
165
+ when: on_success
166
+ paths:
167
+ - docs/build/latex/ekfsm.pdf
168
+
169
+ build-doc-coverage:
170
+ stage: 🧱 build
171
+ before_script:
172
+ - direnv allow .
173
+ script:
174
+ - echo "Compute documentation coverage..."
175
+ - direnv exec . doc-coverage
176
+ coverage: '/TOTAL\s+\|\s+(\d+\.\d+%)/' # Extract the total doc coverage percentage
177
+ artifacts:
178
+ when: on_success
179
+ paths:
180
+ - docs/build/coverage
181
+
182
+ deploy:
183
+ stage: ⬆️ deploy
184
+ image: python:3.12
185
+ tags:
186
+ - shared
187
+ variables:
188
+ GIT_STRATEGY: clone
189
+ GIT_SUBMODULE_STRATEGY: recursive
190
+ rules:
191
+ - *default_rule_hotfix
192
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "develop"
193
+ when: on_success
194
+ before_script:
195
+ - echo "Install twine..."
196
+ - python -m pip install twine
197
+ script:
198
+ - echo "Deploying version ${GitVersion_SemVer} to pypi repository..."
199
+ - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${PACKAGE_REGISTRY_URL} dist/*
200
+ needs:
201
+ - 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,67 @@
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
+ "name": "Debug CLI DB-ZIP",
9
+ "type": "python",
10
+ "request": "launch",
11
+ "program": "${workspaceFolder}/ekfsm/cli.py",
12
+ "console": "integratedTerminal",
13
+ "env": {
14
+ "PYTHONPATH": "${workspaceFolder}:$PYTHONPATH"
15
+ },
16
+ "args": ["-v","tests/zip2-ccu-only.yaml", "write","serial","12312312"],
17
+ "justMyCode": true,
18
+ "sudo": true
19
+ },
20
+ {
21
+ "name": "Debug CLI SIM",
22
+ "type": "python",
23
+ "request": "launch",
24
+ "program": "${workspaceFolder}/ekfsm/cli.py",
25
+ "console": "integratedTerminal",
26
+ "env": {
27
+ "PYTHONPATH": "${workspaceFolder}:$PYTHONPATH"
28
+ },
29
+ "args": ["-v","-s","tests/sim/sys","tests/sim/test_system.yaml", "show"],
30
+ "justMyCode": true,
31
+ "sudo": true
32
+ },
33
+ {
34
+ "name": "Python: Current File (sudo)",
35
+ "type": "python",
36
+ "request": "launch",
37
+ "program": "${file}",
38
+ "console": "integratedTerminal",
39
+ "env": {
40
+ "PYTHONPATH": "${workspaceFolder}:$PYTHONPATH"
41
+ },
42
+ "sudo": true
43
+ },
44
+ {
45
+ "name": "Python Debugger: Current File (sudo)",
46
+ "type": "debugpy",
47
+ "request": "launch",
48
+ "program": "${file}",
49
+ "console": "integratedTerminal",
50
+ "env": {
51
+ "PYTHONPATH": "${workspaceFolder}:$PYTHONPATH"
52
+ },
53
+ "sudo": true
54
+ },
55
+ {
56
+ "name": "Python Debugger: Current File",
57
+ "type": "debugpy",
58
+ "request": "launch",
59
+ "program": "${file}",
60
+ "console": "integratedTerminal",
61
+ "env": {
62
+ "PYTHONPATH": "${workspaceFolder}:$PYTHONPATH"
63
+ },
64
+ "sudo": false
65
+ }
66
+ ]
67
+ }
@@ -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": false,
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
+ }
@@ -0,0 +1,28 @@
1
+ # EKFSM License (Version 1.0)
2
+
3
+ **Copyright © [2024] EKF Elektronik GmbH.**
4
+ *All rights reserved.*
5
+
6
+ ## EKF Non-Commercial License (ENCL)
7
+
8
+ ### Usage Rights
9
+
10
+ **1.1.** The source code may be freely used for non-commercial purposes, including modification and further development.
11
+
12
+ **1.2.** Commercial use—including but not limited to distribution, offering as a service, or integration into a commercial product—is strictly prohibited without prior written consent from the manufacturer.
13
+
14
+ ### Further Development
15
+
16
+ **2.1.** Anyone may modify the source code and share modifications for non-commercial purposes, as long as the original copyright notice and this license text remain intact.
17
+
18
+ **2.2.** Redistribution of the source code or any derived work for commercial purposes is strictly prohibited without explicit permission from the manufacturer.
19
+
20
+ **2.3.** Contributions to this project are subject to a Contributor License Agreement (CLA) to ensure that all submitted changes can be shared under this license.
21
+
22
+ ### Disclaimer of Liability
23
+
24
+ **3.1.** THE SOFTWARE IS PROVIDED “AS IS,” WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE MANUFACTURER SHALL NOT BE LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE.
25
+
26
+ ### Commercial Licensing
27
+
28
+ **4.1.** For a commercial license or special agreements, please contact sales@ekf.de
@@ -0,0 +1,86 @@
1
+ Metadata-Version: 2.4
2
+ Name: ekfsm
3
+ Version: 0.11.0b1.post3
4
+ Summary: The EKF System Management Library (ekfsm) is a sensor monitoring suite for Compact PCI Serial devices.
5
+ Author-email: Klaus Popp <klaus.popp@ci4rail.com>, Jan Jansen <jan@ekf.de>, Felix Päßler <fp@ekf.de>
6
+ Requires-Python: >=3.10
7
+ Requires-Dist: anytree
8
+ Requires-Dist: click>=8.0.1
9
+ Requires-Dist: crcmod
10
+ Requires-Dist: gpiod>=2.1.0
11
+ Requires-Dist: hexdump
12
+ Requires-Dist: more-itertools
13
+ Requires-Dist: munch
14
+ Requires-Dist: smbus2
15
+ Requires-Dist: types-pyyaml>=6.0.12.20241230
16
+ Requires-Dist: yamale
17
+ Description-Content-Type: text/markdown
18
+
19
+ # ekfsm - EKF system management library
20
+
21
+ Provides access to system management functions on Linux based modular hardware systems,
22
+ such as CompactPCI-Serial systems.
23
+
24
+ Initial implementation for [DP-ZIP2 CompactPCI-Serial system](https://ekf.atlassian.net/l/cp/KzN2q7KR)
25
+
26
+ ## Features
27
+
28
+ - System configuration via YAML configuration file
29
+ - Obtain inventory information of the system and its components
30
+ - Obtain sensor information, such as temperature, humidity, voltage, current, accelerometer, gyroscope, etc.
31
+ - Access to system level functions, such as system LEDs, system fan, system power supply, etc.
32
+ - Supports simulation mode for development and testing
33
+
34
+ ## Packaging
35
+
36
+ The project can be packaged and deployed as a pypi package to the gitlab pypi registry.
37
+
38
+ The project metadata is partially generated dynamically from the project readme and the auto generated version tag from SCM.
39
+
40
+ ### Build the package
41
+
42
+ To build the package run `make build`
43
+
44
+ ### Upload package manually to the GITLAB package registry
45
+
46
+ 1. Set up your authentication method and the project URL in your `~/.pypirc` according to [Authenticate with the package registry](https://gitlab.ekf.com/api/v4/projects/407/packages/pypi)
47
+ 2. Run `make upload`
48
+
49
+ Note that the version string which is generated complies to the `setuptools-scm` default versioning scheme and thus the version string will be slightly different from the string generated during the pipeline build if running from a shell in a workspace.
50
+
51
+ *See also [SetupTools-SCM Documentation](https://setuptools-scm.readthedocs.io/en/latest/) and [SetupTool UserGuide](https://setuptools.pypa.io/en/latest/userguide).*
52
+
53
+ ## Install a package
54
+
55
+ See instructions given in the packages deployed under [this projects pypi registry](https://gitlab.ekf.com/libs/apis/ekfsm/-/packages/).
56
+
57
+ ## Generating documentation
58
+
59
+ From the nix shell, run `make docs` to generate the documentation. This will start a local web server to view the generated documentation. It is automatically updated when the source code changes.
60
+
61
+ The documentation is generated using the `sphinx` tool. The configuration and docs are stored in the `docs` folder.
62
+
63
+
64
+ ## Remote development on the target
65
+
66
+ On the remote machine, install recent version of direnv:
67
+
68
+ ```bash
69
+ curl -sfL https://direnv.net/install.sh | bash
70
+ ```
71
+
72
+ Add the following line to your ~/.bashrc or ~/.bash_profile:
73
+
74
+ ```bash
75
+ eval "$(direnv hook bash)"
76
+ ```
77
+
78
+ Install the following extensions in VSCode:
79
+ * cab404.vscode-direnv
80
+ * ms-python.mypy-type-checker
81
+ * mikoz.black-py
82
+ * ms-python.python
83
+ * ms-python.vscode-pylance
84
+ * ms-python.debugpy
85
+
86
+ From vscode on the host machine, open the project folder on the remote machine via ssh. The direnv extension will automatically load the environment variables from the `.envrc` file.
@@ -0,0 +1,68 @@
1
+ # ekfsm - EKF system management library
2
+
3
+ Provides access to system management functions on Linux based modular hardware systems,
4
+ such as CompactPCI-Serial systems.
5
+
6
+ Initial implementation for [DP-ZIP2 CompactPCI-Serial system](https://ekf.atlassian.net/l/cp/KzN2q7KR)
7
+
8
+ ## Features
9
+
10
+ - System configuration via YAML configuration file
11
+ - Obtain inventory information of the system and its components
12
+ - Obtain sensor information, such as temperature, humidity, voltage, current, accelerometer, gyroscope, etc.
13
+ - Access to system level functions, such as system LEDs, system fan, system power supply, etc.
14
+ - Supports simulation mode for development and testing
15
+
16
+ ## Packaging
17
+
18
+ The project can be packaged and deployed as a pypi package to the gitlab pypi registry.
19
+
20
+ The project metadata is partially generated dynamically from the project readme and the auto generated version tag from SCM.
21
+
22
+ ### Build the package
23
+
24
+ To build the package run `make build`
25
+
26
+ ### Upload package manually to the GITLAB package registry
27
+
28
+ 1. Set up your authentication method and the project URL in your `~/.pypirc` according to [Authenticate with the package registry](https://gitlab.ekf.com/api/v4/projects/407/packages/pypi)
29
+ 2. Run `make upload`
30
+
31
+ Note that the version string which is generated complies to the `setuptools-scm` default versioning scheme and thus the version string will be slightly different from the string generated during the pipeline build if running from a shell in a workspace.
32
+
33
+ *See also [SetupTools-SCM Documentation](https://setuptools-scm.readthedocs.io/en/latest/) and [SetupTool UserGuide](https://setuptools.pypa.io/en/latest/userguide).*
34
+
35
+ ## Install a package
36
+
37
+ See instructions given in the packages deployed under [this projects pypi registry](https://gitlab.ekf.com/libs/apis/ekfsm/-/packages/).
38
+
39
+ ## Generating documentation
40
+
41
+ From the nix shell, run `make docs` to generate the documentation. This will start a local web server to view the generated documentation. It is automatically updated when the source code changes.
42
+
43
+ The documentation is generated using the `sphinx` tool. The configuration and docs are stored in the `docs` folder.
44
+
45
+
46
+ ## Remote development on the target
47
+
48
+ On the remote machine, install recent version of direnv:
49
+
50
+ ```bash
51
+ curl -sfL https://direnv.net/install.sh | bash
52
+ ```
53
+
54
+ Add the following line to your ~/.bashrc or ~/.bash_profile:
55
+
56
+ ```bash
57
+ eval "$(direnv hook bash)"
58
+ ```
59
+
60
+ Install the following extensions in VSCode:
61
+ * cab404.vscode-direnv
62
+ * ms-python.mypy-type-checker
63
+ * mikoz.black-py
64
+ * ms-python.python
65
+ * ms-python.vscode-pylance
66
+ * ms-python.debugpy
67
+
68
+ From vscode on the host machine, open the project folder on the remote machine via ssh. The direnv extension will automatically load the environment variables from the `.envrc` file.
@@ -0,0 +1,103 @@
1
+ {
2
+ "nodes": {
3
+ "devenv": {
4
+ "locked": {
5
+ "dir": "src/modules",
6
+ "lastModified": 1740575096,
7
+ "owner": "cachix",
8
+ "repo": "devenv",
9
+ "rev": "4000b0153c6f54a57368c0b066aaa0024450618c",
10
+ "type": "github"
11
+ },
12
+ "original": {
13
+ "dir": "src/modules",
14
+ "owner": "cachix",
15
+ "repo": "devenv",
16
+ "type": "github"
17
+ }
18
+ },
19
+ "flake-compat": {
20
+ "flake": false,
21
+ "locked": {
22
+ "lastModified": 1733328505,
23
+ "owner": "edolstra",
24
+ "repo": "flake-compat",
25
+ "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
26
+ "type": "github"
27
+ },
28
+ "original": {
29
+ "owner": "edolstra",
30
+ "repo": "flake-compat",
31
+ "type": "github"
32
+ }
33
+ },
34
+ "git-hooks": {
35
+ "inputs": {
36
+ "flake-compat": "flake-compat",
37
+ "gitignore": "gitignore",
38
+ "nixpkgs": [
39
+ "nixpkgs"
40
+ ]
41
+ },
42
+ "locked": {
43
+ "lastModified": 1737465171,
44
+ "owner": "cachix",
45
+ "repo": "git-hooks.nix",
46
+ "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
47
+ "type": "github"
48
+ },
49
+ "original": {
50
+ "owner": "cachix",
51
+ "repo": "git-hooks.nix",
52
+ "type": "github"
53
+ }
54
+ },
55
+ "gitignore": {
56
+ "inputs": {
57
+ "nixpkgs": [
58
+ "git-hooks",
59
+ "nixpkgs"
60
+ ]
61
+ },
62
+ "locked": {
63
+ "lastModified": 1709087332,
64
+ "owner": "hercules-ci",
65
+ "repo": "gitignore.nix",
66
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
67
+ "type": "github"
68
+ },
69
+ "original": {
70
+ "owner": "hercules-ci",
71
+ "repo": "gitignore.nix",
72
+ "type": "github"
73
+ }
74
+ },
75
+ "nixpkgs": {
76
+ "locked": {
77
+ "lastModified": 1733477122,
78
+ "owner": "cachix",
79
+ "repo": "devenv-nixpkgs",
80
+ "rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857",
81
+ "type": "github"
82
+ },
83
+ "original": {
84
+ "owner": "cachix",
85
+ "ref": "rolling",
86
+ "repo": "devenv-nixpkgs",
87
+ "type": "github"
88
+ }
89
+ },
90
+ "root": {
91
+ "inputs": {
92
+ "devenv": "devenv",
93
+ "git-hooks": "git-hooks",
94
+ "nixpkgs": "nixpkgs",
95
+ "pre-commit-hooks": [
96
+ "git-hooks"
97
+ ]
98
+ }
99
+ }
100
+ },
101
+ "root": "root",
102
+ "version": 7
103
+ }