cgse 2024.1.3__tar.gz → 2024.1.4__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 (283) hide show
  1. cgse-2024.1.4/.gitignore +35 -0
  2. {cgse-2024.1.3 → cgse-2024.1.4}/PKG-INFO +2 -5
  3. {cgse-2024.1.3 → cgse-2024.1.4}/bump.py +18 -10
  4. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/pyproject.toml +33 -16
  5. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/bits.py +266 -41
  6. cgse-2024.1.4/libs/cgse-common/src/egse/calibration.py +250 -0
  7. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/command.py +10 -29
  8. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/config.py +128 -2
  9. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/control.py +0 -80
  10. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/device.py +3 -1
  11. cgse-2024.1.4/libs/cgse-common/src/egse/env.py +592 -0
  12. cgse-2024.1.4/libs/cgse-common/src/egse/hk.py +794 -0
  13. cgse-2024.1.4/libs/cgse-common/src/egse/metrics.py +106 -0
  14. cgse-2024.1.4/libs/cgse-common/src/egse/response.py +101 -0
  15. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/settings.py +33 -31
  16. cgse-2024.1.4/libs/cgse-common/src/egse/settings.yaml +7 -0
  17. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/setup.py +116 -81
  18. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/system.py +32 -13
  19. cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00028_201028_155259.yaml +110 -0
  20. cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00029_201028_155331.yaml +111 -0
  21. cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00030_210311_134043.yaml +196 -0
  22. cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00080_210917_105245.yaml +372 -0
  23. cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00081_210922_142259.yaml +375 -0
  24. cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00082_210923_094458.yaml +377 -0
  25. cgse-2024.1.4/libs/cgse-common/tests/data/CSL1/README.md +4 -0
  26. cgse-2024.1.4/libs/cgse-common/tests/data/CSL2/README.md +4 -0
  27. cgse-2024.1.4/libs/cgse-common/tests/data/IAS/README.md +4 -0
  28. cgse-2024.1.4/libs/cgse-common/tests/data/INTA/README.md +4 -0
  29. cgse-2024.1.4/libs/cgse-common/tests/data/SRON/conf/SETUP_SRON_00027_211119_140441.yaml +430 -0
  30. cgse-2024.1.4/libs/cgse-common/tests/data/SRON/conf/SETUP_SRON_00028_211119_160406.yaml +430 -0
  31. cgse-2024.1.4/libs/cgse-common/tests/data/SRON/conf/SETUP_SRON_00029_211119_172918.yaml +431 -0
  32. cgse-2024.1.4/libs/cgse-common/tests/data/SRON/conf/SETUP_SRON_00030_211122_103604.yaml +432 -0
  33. cgse-2024.1.4/libs/cgse-common/tests/data/SRON/conf/SETUP_SRON_00031_211123_124900.yaml +433 -0
  34. cgse-2024.1.4/libs/cgse-common/tests/data/conf/SETUP_20250114_1519.yaml +24 -0
  35. cgse-2024.1.4/libs/cgse-common/tests/data/data/cal_coeff_1234.csv +4 -0
  36. cgse-2024.1.4/libs/cgse-common/tests/data/data/calibration.csv +4 -0
  37. cgse-2024.1.4/libs/cgse-common/tests/data/data/calibration.yaml +10 -0
  38. cgse-2024.1.4/libs/cgse-common/tests/data/data/corrupt.yaml +11 -0
  39. cgse-2024.1.4/libs/cgse-common/tests/data/data/test_setup.yaml +7 -0
  40. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_config.py +15 -11
  41. cgse-2024.1.4/libs/cgse-common/tests/test_device.py +21 -0
  42. cgse-2024.1.4/libs/cgse-common/tests/test_env.py +196 -0
  43. cgse-2024.1.4/libs/cgse-common/tests/test_hk.py +54 -0
  44. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_resource.py +4 -4
  45. cgse-2024.1.4/libs/cgse-common/tests/test_response.py +109 -0
  46. cgse-2024.1.4/libs/cgse-common/tests/test_setup.py +840 -0
  47. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/pyproject.toml +13 -6
  48. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/pyproject.toml +13 -7
  49. cgse-2024.1.4/libs/cgse-core/src/egse/confman/__main__.py +0 -0
  50. cgse-2024.1.4/libs/cgse-core/tests/test_confman_setups.py +25 -0
  51. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/pyproject.toml +2 -2
  52. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/cgse-tools/pyproject.toml +10 -4
  53. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/pyproject.toml +4 -2
  54. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/__init__.py +23 -7
  55. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/alpha.py +35 -50
  56. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/dynalpha.py +2 -3
  57. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/hexapod_ui.py +17 -15
  58. cgse-2024.1.4/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/joran.py +266 -0
  59. cgse-2024.1.4/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/joran.yaml +62 -0
  60. cgse-2024.1.4/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/joran_cs.py +184 -0
  61. cgse-2024.1.4/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/joran_protocol.py +128 -0
  62. cgse-2024.1.4/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/joran_ui.py +449 -0
  63. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/puna.yaml +5 -5
  64. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/puna_ui.py +5 -5
  65. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/punaplus.py +1 -1
  66. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda.py +3 -3
  67. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda.yaml +21 -21
  68. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda_cs.py +1 -0
  69. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda_ui.py +5 -5
  70. {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-fits/pyproject.toml +3 -3
  71. cgse-2024.1.4/projects/plato/plato-hdf5/README.md +0 -0
  72. {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-hdf5/pyproject.toml +3 -3
  73. cgse-2024.1.4/projects/plato/plato-spw/README.md +0 -0
  74. {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-spw/pyproject.toml +2 -2
  75. {cgse-2024.1.3 → cgse-2024.1.4}/pyproject.toml +12 -6
  76. cgse-2024.1.4/ruff.toml +25 -0
  77. cgse-2024.1.3/.gitignore +0 -20
  78. cgse-2024.1.3/libs/cgse-common/pytest.ini +0 -11
  79. cgse-2024.1.3/libs/cgse-common/src/egse/env.py +0 -279
  80. cgse-2024.1.3/libs/cgse-common/src/egse/settings.yaml +0 -981
  81. {cgse-2024.1.3 → cgse-2024.1.4}/NOTES.md +0 -0
  82. {cgse-2024.1.3 → cgse-2024.1.4}/README.md +0 -0
  83. {cgse-2024.1.3 → cgse-2024.1.4}/TODO.md +0 -0
  84. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/README.md +0 -0
  85. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/decorators.py +0 -0
  86. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/exceptions.py +0 -0
  87. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/mixin.py +0 -0
  88. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/monitoring.py +0 -0
  89. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/observer.py +0 -0
  90. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/obsid.py +0 -0
  91. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/persistence.py +0 -0
  92. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/plugin.py +0 -0
  93. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/process.py +0 -0
  94. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/protocol.py +0 -0
  95. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/proxy.py +0 -0
  96. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/reload.py +0 -0
  97. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/resource.py +0 -0
  98. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/services.py +0 -0
  99. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/services.yaml +0 -0
  100. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/state.py +0 -0
  101. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/version.py +0 -0
  102. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/zmq_ser.py +0 -0
  103. /cgse-2024.1.3/libs/cgse-common/tests/data/data/empty_data_file.txt → /cgse-2024.1.4/libs/cgse-common/tests/data/conf/config-file.toml +0 -0
  104. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/data/data/data-file.txt +0 -0
  105. /cgse-2024.1.3/libs/cgse-common/tests/test_control.py → /cgse-2024.1.4/libs/cgse-common/tests/data/data/empty_data_file.txt +0 -0
  106. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/data/icons/keyboard.png +0 -0
  107. /cgse-2024.1.3/libs/cgse-core/src/egse/confman/__main__.py → /cgse-2024.1.4/libs/cgse-common/tests/data/lib/dev1/shared-lib.so +0 -0
  108. /cgse-2024.1.3/projects/plato/plato-hdf5/README.md → /cgse-2024.1.4/libs/cgse-common/tests/data/lib/dev2/shared-lib.so +0 -0
  109. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/dummy.py +0 -0
  110. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/helpers.py +0 -0
  111. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_bits.py +0 -0
  112. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_command.py +0 -0
  113. /cgse-2024.1.3/projects/plato/plato-spw/README.md → /cgse-2024.1.4/libs/cgse-common/tests/test_control.py +0 -0
  114. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_decorators.py +0 -0
  115. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_system.py +0 -0
  116. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/README.md +0 -0
  117. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/__init__.py +0 -0
  118. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/avoidance.py +0 -0
  119. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/cslmodel.py +0 -0
  120. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/laser_tracker_to_dict.py +0 -0
  121. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/point.py +0 -0
  122. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/pyplot.py +0 -0
  123. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/referenceFrame.py +0 -0
  124. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/refmodel.py +0 -0
  125. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/rotationMatrix.py +0 -0
  126. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/transform3d_addon.py +0 -0
  127. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/README.md +0 -0
  128. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/confman/__init__.py +0 -0
  129. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/confman/confman.yaml +0 -0
  130. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/confman/confman_cs.py +0 -0
  131. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/logger/__init__.py +0 -0
  132. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/logger/__main__.py +0 -0
  133. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/logger/log_cs.py +0 -0
  134. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/procman/__init__.py +0 -0
  135. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/procman/procman.yaml +0 -0
  136. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/procman/procman_cs.py +0 -0
  137. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/storage/__init__.py +0 -0
  138. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/storage/__main__.py +0 -0
  139. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/storage/persistence.py +0 -0
  140. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/storage/storage.yaml +0 -0
  141. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/storage/storage_cs.py +0 -0
  142. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/scripts/cgse.py +0 -0
  143. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/tests/conftest.py +0 -0
  144. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/tests/test_logger.py +0 -0
  145. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/README.md +0 -0
  146. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/__init__.py +0 -0
  147. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/buttons.py +0 -0
  148. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu-cs-start.svg +0 -0
  149. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu-cs-stop.svg +0 -0
  150. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu-cs.svg +0 -0
  151. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu_cs-started.svg +0 -0
  152. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu_cs-stopped.svg +0 -0
  153. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu_cs.svg +0 -0
  154. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/alert.svg +0 -0
  155. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/arrow-double-left.png +0 -0
  156. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/arrow-double-right.png +0 -0
  157. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/arrow-up.svg +0 -0
  158. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/backward.svg +0 -0
  159. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/busy.svg +0 -0
  160. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/cleaning.svg +0 -0
  161. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/color-scheme.svg +0 -0
  162. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/cs-connected-alert.svg +0 -0
  163. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/cs-connected-disabled.svg +0 -0
  164. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/cs-connected.svg +0 -0
  165. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/cs-not-connected.svg +0 -0
  166. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/double-left-arrow.svg +0 -0
  167. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/double-right-arrow.svg +0 -0
  168. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/erase-disabled.svg +0 -0
  169. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/erase.svg +0 -0
  170. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fitsgen-start.svg +0 -0
  171. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fitsgen-stop.svg +0 -0
  172. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fitsgen.svg +0 -0
  173. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/forward.svg +0 -0
  174. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fov-hk-start.svg +0 -0
  175. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fov-hk-stop.svg +0 -0
  176. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fov-hk.svg +0 -0
  177. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/front-desk.svg +0 -0
  178. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/home-actioned.svg +0 -0
  179. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/home-disabled.svg +0 -0
  180. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/home.svg +0 -0
  181. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/info.svg +0 -0
  182. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/invalid.png +0 -0
  183. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-green.svg +0 -0
  184. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-grey.svg +0 -0
  185. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-orange.svg +0 -0
  186. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-red.svg +0 -0
  187. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-square-green.svg +0 -0
  188. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-square-grey.svg +0 -0
  189. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-square-orange.svg +0 -0
  190. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-square-red.svg +0 -0
  191. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/limit-switch-all-green.svg +0 -0
  192. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/limit-switch-all-red.svg +0 -0
  193. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/limit-switch-el+.svg +0 -0
  194. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/limit-switch-el-.svg +0 -0
  195. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/location-marker.svg +0 -0
  196. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-dpu.svg +0 -0
  197. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-gimbal.svg +0 -0
  198. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-huber.svg +0 -0
  199. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-ogse.svg +0 -0
  200. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-puna.svg +0 -0
  201. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-tcs.svg +0 -0
  202. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-zonda.svg +0 -0
  203. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/maximize.svg +0 -0
  204. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/meter.svg +0 -0
  205. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/more.svg +0 -0
  206. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/n-fee-hk-start.svg +0 -0
  207. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/n-fee-hk-stop.svg +0 -0
  208. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/n-fee-hk.svg +0 -0
  209. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/observing-off.svg +0 -0
  210. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/observing-on.svg +0 -0
  211. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/open-document-hdf5.png +0 -0
  212. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/open-document-hdf5.svg +0 -0
  213. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/ops-mode.svg +0 -0
  214. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/play-green.svg +0 -0
  215. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/plugged-disabled.svg +0 -0
  216. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/plugged.svg +0 -0
  217. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/pm_ui.svg +0 -0
  218. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/power-button-green.svg +0 -0
  219. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/power-button-red.svg +0 -0
  220. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/power-button.svg +0 -0
  221. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/radar.svg +0 -0
  222. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/radioactive.svg +0 -0
  223. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/reload.svg +0 -0
  224. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/remote-control-off.svg +0 -0
  225. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/remote-control-on.svg +0 -0
  226. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/repeat-blue.svg +0 -0
  227. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/repeat.svg +0 -0
  228. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/settings.svg +0 -0
  229. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/shrink.svg +0 -0
  230. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/shutter.svg +0 -0
  231. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/sign-off.svg +0 -0
  232. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/sign-on.svg +0 -0
  233. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/sim-mode.svg +0 -0
  234. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/small-buttons-go.svg +0 -0
  235. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/small-buttons-minus.svg +0 -0
  236. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/small-buttons-plus.svg +0 -0
  237. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/sponge.svg +0 -0
  238. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/start-button-disabled.svg +0 -0
  239. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/start-button.svg +0 -0
  240. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/stop-button-disabled.svg +0 -0
  241. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/stop-button.svg +0 -0
  242. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/stop-red.svg +0 -0
  243. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/stop.svg +0 -0
  244. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-disabled-square.svg +0 -0
  245. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-disabled.svg +0 -0
  246. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-off-square.svg +0 -0
  247. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-off.svg +0 -0
  248. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-on-square.svg +0 -0
  249. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-on.svg +0 -0
  250. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/temperature-control.svg +0 -0
  251. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/th_ui_logo.svg +0 -0
  252. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/unplugged.svg +0 -0
  253. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/unvalid.png +0 -0
  254. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/user-interface.svg +0 -0
  255. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/vacuum.svg +0 -0
  256. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/valid.png +0 -0
  257. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/zoom-to-pixel-dark.svg +0 -0
  258. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/zoom-to-pixel-white.svg +0 -0
  259. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/led.py +0 -0
  260. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/limitswitch.py +0 -0
  261. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/states.py +0 -0
  262. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/styles/dark.qss +0 -0
  263. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/styles/default.qss +0 -0
  264. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/styles.qss +0 -0
  265. {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/switch.py +0 -0
  266. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/cgse-tools/README.md +0 -0
  267. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/cgse-tools/src/egse/tools/status.py +0 -0
  268. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/cgse-tools/src/scripts/cgse_plugins.py +0 -0
  269. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/cgse-tools/src/scripts/cgse_service_plugins.py +0 -0
  270. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/README.md +0 -0
  271. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/__init__.py +0 -0
  272. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/pmac.py +0 -0
  273. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/pmac_regex.py +0 -0
  274. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/puna.py +0 -0
  275. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/puna_cs.py +0 -0
  276. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/puna_protocol.py +0 -0
  277. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda_devif.py +0 -0
  278. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda_protocol.py +0 -0
  279. {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/scripts/cgse_service_plugins.py +0 -0
  280. {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-fits/README.md +0 -0
  281. {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-fits/src/egse/plugins/storage/fits.py +0 -0
  282. {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-hdf5/src/egse/plugins/storage/hdf5.py +0 -0
  283. {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-spw/src/egse/spw.py +0 -0
@@ -0,0 +1,35 @@
1
+ # Python versions and environment
2
+
3
+ __pycache__
4
+ .python-version
5
+ .envrc
6
+
7
+ # Build systems
8
+
9
+ build
10
+ dist
11
+ **/*.egg-info
12
+
13
+ # Apple specific
14
+
15
+ .DS_Store
16
+
17
+ # Unit testing
18
+
19
+ .pytest_cache
20
+ .coverage
21
+ htmlcov
22
+
23
+ # Virtual environments
24
+
25
+ .env
26
+ .venv
27
+ venv
28
+
29
+ # PyCharm IDE
30
+
31
+ .idea
32
+
33
+ # Packaging
34
+
35
+ uv.lock
@@ -1,15 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cgse
3
- Version: 2024.1.3
3
+ Version: 2024.1.4
4
4
  Summary: Generic Common-EGSE: Commanding and monitoring lab equipment
5
5
  Author-email: Rik Huygen <rik.huygen@kuleuven.be>, Sara Regibo <sara.regibo@kuleuven.be>
6
6
  License: MIT
7
7
  Requires-Python: >=3.9
8
8
  Requires-Dist: rich>=13.9.4
9
- Requires-Dist: tomlkit
10
- Provides-Extra: dev
11
- Requires-Dist: pipdeptree; extra == 'dev'
12
- Requires-Dist: ruff; extra == 'dev'
9
+ Requires-Dist: tomlkit>=0.13.2
13
10
  Description-Content-Type: text/markdown
14
11
 
15
12
  # Common-EGSE
@@ -12,9 +12,15 @@ Note:
12
12
 
13
13
  """
14
14
 
15
+ # /// script
16
+ # requires-python = ">=3.9"
17
+ # dependencies = [
18
+ # "tomlkit",
19
+ # "rich",
20
+ # ]
21
+ # ///
15
22
  import os
16
23
  import pathlib
17
- import subprocess
18
24
 
19
25
  import rich
20
26
  import tomlkit
@@ -24,10 +30,10 @@ import tomlkit.exceptions
24
30
  def get_master_version(master_pyproject_path):
25
31
  """Returns the version number of the master project, i.e. cgse."""
26
32
 
27
- with open(master_pyproject_path, 'r') as file:
33
+ with open(master_pyproject_path, "r") as file:
28
34
  data = tomlkit.parse(file.read())
29
35
 
30
- return data['project']['version']
36
+ return data["project"]["version"]
31
37
 
32
38
 
33
39
  def update_project_version(project_dir, new_version):
@@ -37,13 +43,13 @@ def update_project_version(project_dir, new_version):
37
43
 
38
44
  # Check if the Poetry version is defined, otherwise print a message.
39
45
 
40
- with open("pyproject.toml", 'r') as file:
46
+ with open("pyproject.toml", "r") as file:
41
47
  data = tomlkit.parse(file.read())
42
48
 
43
49
  try:
44
- data['project']['version'] = new_version
50
+ data["project"]["version"] = new_version
45
51
 
46
- with open('pyproject.toml', 'w') as file:
52
+ with open("pyproject.toml", "w") as file:
47
53
  tomlkit.dump(data, file)
48
54
 
49
55
  except tomlkit.exceptions.NonExistentKey:
@@ -53,20 +59,22 @@ def update_project_version(project_dir, new_version):
53
59
  def update_all_projects_in_monorepo(root_dir):
54
60
  """Updates all pyproject.toml files with the master version number."""
55
61
 
56
- master_version = get_master_version(os.path.join(root_dir, 'pyproject.toml'))
62
+ excluded_subdirs = ["__pycache__", ".venv", ".git", ".idea", "cgse/build", "cgse/dist"]
63
+
64
+ master_version = get_master_version(os.path.join(root_dir, "pyproject.toml"))
57
65
 
58
66
  rich.print(f"Projects will be bumped to version {master_version}")
59
67
 
60
68
  for subdir, dirs, files in os.walk(root_dir):
61
- if subdir == '.' or subdir == '..' or subdir == '__pycache__' or ".venv" in subdir or ".git" in subdir:
69
+ if subdir == "." or subdir == ".." or any(excluded in subdir for excluded in excluded_subdirs):
70
+ # rich.print(f"rejected {subdir = }")
62
71
  continue
63
- if 'pyproject.toml' in files and subdir != str(root_dir): # Skip the master pyproject.toml
72
+ if "pyproject.toml" in files and subdir != str(root_dir): # Skip the master pyproject.toml
64
73
  print(f"Updating version for project in {subdir}")
65
74
  update_project_version(subdir, master_version)
66
75
 
67
76
 
68
77
  if __name__ == "__main__":
69
-
70
78
  monorepo_root = pathlib.Path(__file__).parent.resolve()
71
79
 
72
80
  cwd = os.getcwd()
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cgse-common"
3
- version = "2024.1.3"
3
+ version = "2024.1.4"
4
4
  description = "Software framework to support hardware testing"
5
5
  authors = [
6
6
  {name = "IVS KU Leuven"}
@@ -19,27 +19,36 @@ keywords = [
19
19
  "software framework"
20
20
  ]
21
21
  dependencies = [
22
- "click",
23
- "deepdiff",
24
- "distro",
25
- "gitpython",
26
- "numpy == 1.22.4", # only used in setup
27
- "pandas",
22
+ "click>=8.1.8",
23
+ "deepdiff>=8.1.1",
24
+ "distro>=1.9.0",
25
+ "gitpython>=3.1.44",
26
+ "numpy==1.22.4",
27
+ "pandas>=1.5.1",
28
28
  "pip>=24.3.1", # only used in setup
29
- "prometheus-client",
30
- "psutil",
31
- "pyyaml",
29
+ "prometheus-client>=0.21.1",
30
+ "psutil>=6.1.1",
31
+ "pyyaml>=6.0.2",
32
32
  "pyzmq == 23.2.1",
33
- "rich",
33
+ "rich>=13.9.4",
34
34
  ]
35
35
 
36
- [project.optional-dependencies]
37
- test = ["pytest", "pytest-mock", "pytest-cov"]
38
- dev = ["pipdeptree", "tomlkit", "ruff"]
39
-
40
36
  [project.entry-points."cgse.version"]
41
37
  cgse-common = 'egse'
42
38
 
39
+ [tool.pytest.ini_options]
40
+ pythonpath = "src"
41
+ testpaths = ["tests"]
42
+ addopts = "-ra --cov --cov-report html"
43
+ filterwarnings = [
44
+ "ignore::DeprecationWarning"
45
+ ]
46
+
47
+ [tool.coverage.run]
48
+ omit = [
49
+ "tests/*",
50
+ ]
51
+
43
52
  [tool.hatch.build.targets.sdist]
44
53
  exclude = [
45
54
  "/tests",
@@ -56,8 +65,16 @@ packages = ["src/egse"]
56
65
  line-length = 120
57
66
 
58
67
  [tool.ruff.lint]
59
- extend-select = ["E501"]
68
+ extend-select = ["E", "W"]
60
69
 
61
70
  [build-system]
62
71
  requires = ["hatchling"]
63
72
  build-backend = "hatchling.build"
73
+
74
+ [dependency-groups]
75
+ dev = [
76
+ "pytest>=8.3.4",
77
+ "pytest-cov>=6.0.0",
78
+ "pytest-mock>=3.14.0",
79
+ "ruff>=0.9.0",
80
+ ]
@@ -1,6 +1,7 @@
1
1
  """
2
2
  This module contains a number of convenience functions to work with bits, bytes and integers.
3
3
  """
4
+
4
5
  import ctypes
5
6
  from typing import Union
6
7
 
@@ -111,7 +112,7 @@ def bits_set(value: int, *args) -> bool:
111
112
  return all([bit_set(value, bit) for bit in args])
112
113
 
113
114
 
114
- def beautify_binary(value: int, sep: str = ' ', group: int = 8, prefix: str = '', size: int = 0):
115
+ def beautify_binary(value: int, sep: str = " ", group: int = 8, prefix: str = "", size: int = 0):
115
116
  """
116
117
  Returns a binary representation of the given value. The bits are presented
117
118
  in groups of 8 bits for clarity by default (can be changed with the `group` keyword).
@@ -136,9 +137,9 @@ def beautify_binary(value: int, sep: str = ' ', group: int = 8, prefix: str = ''
136
137
  while value > 2**size - 1:
137
138
  size += 8
138
139
 
139
- b_str = f'{value:0{size}b}'
140
+ b_str = f"{value:0{size}b}"
140
141
 
141
- return prefix + sep.join([b_str[i:i + group] for i in range(0, len(b_str), group)])
142
+ return prefix + sep.join([b_str[i : i + group] for i in range(0, len(b_str), group)])
142
143
 
143
144
 
144
145
  def humanize_bytes(n: int, base: Union[int, str] = 2, precision: int = 3) -> str:
@@ -174,11 +175,11 @@ def humanize_bytes(n: int, base: Union[int, str] = 2, precision: int = 3) -> str
174
175
  # By default we assume base == 2 or base == "binary"
175
176
 
176
177
  one_kilo = 1024
177
- units = ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
178
+ units = ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
178
179
 
179
- if base == 10 or base == 'decimal':
180
+ if base == 10 or base == "decimal":
180
181
  one_kilo = 1000
181
- units = ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
182
+ units = ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
182
183
 
183
184
  _n = n
184
185
  if _n < one_kilo:
@@ -193,38 +194,262 @@ def humanize_bytes(n: int, base: Union[int, str] = 2, precision: int = 3) -> str
193
194
 
194
195
 
195
196
  CRC_TABLE = [
196
- 0x00, 0x91, 0xe3, 0x72, 0x07, 0x96, 0xe4, 0x75,
197
- 0x0e, 0x9f, 0xed, 0x7c, 0x09, 0x98, 0xea, 0x7b,
198
- 0x1c, 0x8d, 0xff, 0x6e, 0x1b, 0x8a, 0xf8, 0x69,
199
- 0x12, 0x83, 0xf1, 0x60, 0x15, 0x84, 0xf6, 0x67,
200
- 0x38, 0xa9, 0xdb, 0x4a, 0x3f, 0xae, 0xdc, 0x4d,
201
- 0x36, 0xa7, 0xd5, 0x44, 0x31, 0xa0, 0xd2, 0x43,
202
- 0x24, 0xb5, 0xc7, 0x56, 0x23, 0xb2, 0xc0, 0x51,
203
- 0x2a, 0xbb, 0xc9, 0x58, 0x2d, 0xbc, 0xce, 0x5f,
204
- 0x70, 0xe1, 0x93, 0x02, 0x77, 0xe6, 0x94, 0x05,
205
- 0x7e, 0xef, 0x9d, 0x0c, 0x79, 0xe8, 0x9a, 0x0b,
206
- 0x6c, 0xfd, 0x8f, 0x1e, 0x6b, 0xfa, 0x88, 0x19,
207
- 0x62, 0xf3, 0x81, 0x10, 0x65, 0xf4, 0x86, 0x17,
208
- 0x48, 0xd9, 0xab, 0x3a, 0x4f, 0xde, 0xac, 0x3d,
209
- 0x46, 0xd7, 0xa5, 0x34, 0x41, 0xd0, 0xa2, 0x33,
210
- 0x54, 0xc5, 0xb7, 0x26, 0x53, 0xc2, 0xb0, 0x21,
211
- 0x5a, 0xcb, 0xb9, 0x28, 0x5d, 0xcc, 0xbe, 0x2f,
212
- 0xe0, 0x71, 0x03, 0x92, 0xe7, 0x76, 0x04, 0x95,
213
- 0xee, 0x7f, 0x0d, 0x9c, 0xe9, 0x78, 0x0a, 0x9b,
214
- 0xfc, 0x6d, 0x1f, 0x8e, 0xfb, 0x6a, 0x18, 0x89,
215
- 0xf2, 0x63, 0x11, 0x80, 0xf5, 0x64, 0x16, 0x87,
216
- 0xd8, 0x49, 0x3b, 0xaa, 0xdf, 0x4e, 0x3c, 0xad,
217
- 0xd6, 0x47, 0x35, 0xa4, 0xd1, 0x40, 0x32, 0xa3,
218
- 0xc4, 0x55, 0x27, 0xb6, 0xc3, 0x52, 0x20, 0xb1,
219
- 0xca, 0x5b, 0x29, 0xb8, 0xcd, 0x5c, 0x2e, 0xbf,
220
- 0x90, 0x01, 0x73, 0xe2, 0x97, 0x06, 0x74, 0xe5,
221
- 0x9e, 0x0f, 0x7d, 0xec, 0x99, 0x08, 0x7a, 0xeb,
222
- 0x8c, 0x1d, 0x6f, 0xfe, 0x8b, 0x1a, 0x68, 0xf9,
223
- 0x82, 0x13, 0x61, 0xf0, 0x85, 0x14, 0x66, 0xf7,
224
- 0xa8, 0x39, 0x4b, 0xda, 0xaf, 0x3e, 0x4c, 0xdd,
225
- 0xa6, 0x37, 0x45, 0xd4, 0xa1, 0x30, 0x42, 0xd3,
226
- 0xb4, 0x25, 0x57, 0xc6, 0xb3, 0x22, 0x50, 0xc1,
227
- 0xba, 0x2b, 0x59, 0xc8, 0xbd, 0x2c, 0x5e, 0xcf,
197
+ 0x00,
198
+ 0x91,
199
+ 0xE3,
200
+ 0x72,
201
+ 0x07,
202
+ 0x96,
203
+ 0xE4,
204
+ 0x75,
205
+ 0x0E,
206
+ 0x9F,
207
+ 0xED,
208
+ 0x7C,
209
+ 0x09,
210
+ 0x98,
211
+ 0xEA,
212
+ 0x7B,
213
+ 0x1C,
214
+ 0x8D,
215
+ 0xFF,
216
+ 0x6E,
217
+ 0x1B,
218
+ 0x8A,
219
+ 0xF8,
220
+ 0x69,
221
+ 0x12,
222
+ 0x83,
223
+ 0xF1,
224
+ 0x60,
225
+ 0x15,
226
+ 0x84,
227
+ 0xF6,
228
+ 0x67,
229
+ 0x38,
230
+ 0xA9,
231
+ 0xDB,
232
+ 0x4A,
233
+ 0x3F,
234
+ 0xAE,
235
+ 0xDC,
236
+ 0x4D,
237
+ 0x36,
238
+ 0xA7,
239
+ 0xD5,
240
+ 0x44,
241
+ 0x31,
242
+ 0xA0,
243
+ 0xD2,
244
+ 0x43,
245
+ 0x24,
246
+ 0xB5,
247
+ 0xC7,
248
+ 0x56,
249
+ 0x23,
250
+ 0xB2,
251
+ 0xC0,
252
+ 0x51,
253
+ 0x2A,
254
+ 0xBB,
255
+ 0xC9,
256
+ 0x58,
257
+ 0x2D,
258
+ 0xBC,
259
+ 0xCE,
260
+ 0x5F,
261
+ 0x70,
262
+ 0xE1,
263
+ 0x93,
264
+ 0x02,
265
+ 0x77,
266
+ 0xE6,
267
+ 0x94,
268
+ 0x05,
269
+ 0x7E,
270
+ 0xEF,
271
+ 0x9D,
272
+ 0x0C,
273
+ 0x79,
274
+ 0xE8,
275
+ 0x9A,
276
+ 0x0B,
277
+ 0x6C,
278
+ 0xFD,
279
+ 0x8F,
280
+ 0x1E,
281
+ 0x6B,
282
+ 0xFA,
283
+ 0x88,
284
+ 0x19,
285
+ 0x62,
286
+ 0xF3,
287
+ 0x81,
288
+ 0x10,
289
+ 0x65,
290
+ 0xF4,
291
+ 0x86,
292
+ 0x17,
293
+ 0x48,
294
+ 0xD9,
295
+ 0xAB,
296
+ 0x3A,
297
+ 0x4F,
298
+ 0xDE,
299
+ 0xAC,
300
+ 0x3D,
301
+ 0x46,
302
+ 0xD7,
303
+ 0xA5,
304
+ 0x34,
305
+ 0x41,
306
+ 0xD0,
307
+ 0xA2,
308
+ 0x33,
309
+ 0x54,
310
+ 0xC5,
311
+ 0xB7,
312
+ 0x26,
313
+ 0x53,
314
+ 0xC2,
315
+ 0xB0,
316
+ 0x21,
317
+ 0x5A,
318
+ 0xCB,
319
+ 0xB9,
320
+ 0x28,
321
+ 0x5D,
322
+ 0xCC,
323
+ 0xBE,
324
+ 0x2F,
325
+ 0xE0,
326
+ 0x71,
327
+ 0x03,
328
+ 0x92,
329
+ 0xE7,
330
+ 0x76,
331
+ 0x04,
332
+ 0x95,
333
+ 0xEE,
334
+ 0x7F,
335
+ 0x0D,
336
+ 0x9C,
337
+ 0xE9,
338
+ 0x78,
339
+ 0x0A,
340
+ 0x9B,
341
+ 0xFC,
342
+ 0x6D,
343
+ 0x1F,
344
+ 0x8E,
345
+ 0xFB,
346
+ 0x6A,
347
+ 0x18,
348
+ 0x89,
349
+ 0xF2,
350
+ 0x63,
351
+ 0x11,
352
+ 0x80,
353
+ 0xF5,
354
+ 0x64,
355
+ 0x16,
356
+ 0x87,
357
+ 0xD8,
358
+ 0x49,
359
+ 0x3B,
360
+ 0xAA,
361
+ 0xDF,
362
+ 0x4E,
363
+ 0x3C,
364
+ 0xAD,
365
+ 0xD6,
366
+ 0x47,
367
+ 0x35,
368
+ 0xA4,
369
+ 0xD1,
370
+ 0x40,
371
+ 0x32,
372
+ 0xA3,
373
+ 0xC4,
374
+ 0x55,
375
+ 0x27,
376
+ 0xB6,
377
+ 0xC3,
378
+ 0x52,
379
+ 0x20,
380
+ 0xB1,
381
+ 0xCA,
382
+ 0x5B,
383
+ 0x29,
384
+ 0xB8,
385
+ 0xCD,
386
+ 0x5C,
387
+ 0x2E,
388
+ 0xBF,
389
+ 0x90,
390
+ 0x01,
391
+ 0x73,
392
+ 0xE2,
393
+ 0x97,
394
+ 0x06,
395
+ 0x74,
396
+ 0xE5,
397
+ 0x9E,
398
+ 0x0F,
399
+ 0x7D,
400
+ 0xEC,
401
+ 0x99,
402
+ 0x08,
403
+ 0x7A,
404
+ 0xEB,
405
+ 0x8C,
406
+ 0x1D,
407
+ 0x6F,
408
+ 0xFE,
409
+ 0x8B,
410
+ 0x1A,
411
+ 0x68,
412
+ 0xF9,
413
+ 0x82,
414
+ 0x13,
415
+ 0x61,
416
+ 0xF0,
417
+ 0x85,
418
+ 0x14,
419
+ 0x66,
420
+ 0xF7,
421
+ 0xA8,
422
+ 0x39,
423
+ 0x4B,
424
+ 0xDA,
425
+ 0xAF,
426
+ 0x3E,
427
+ 0x4C,
428
+ 0xDD,
429
+ 0xA6,
430
+ 0x37,
431
+ 0x45,
432
+ 0xD4,
433
+ 0xA1,
434
+ 0x30,
435
+ 0x42,
436
+ 0xD3,
437
+ 0xB4,
438
+ 0x25,
439
+ 0x57,
440
+ 0xC6,
441
+ 0xB3,
442
+ 0x22,
443
+ 0x50,
444
+ 0xC1,
445
+ 0xBA,
446
+ 0x2B,
447
+ 0x59,
448
+ 0xC8,
449
+ 0xBD,
450
+ 0x2C,
451
+ 0x5E,
452
+ 0xCF,
228
453
  ]
229
454
 
230
455
 
@@ -251,10 +476,10 @@ def crc_calc(data, start: int, len: int) -> int:
251
476
  # and the individual elements have then type 'bytes'.
252
477
 
253
478
  if isinstance(data[0], bytes):
254
- for idx in range(start, start+len):
255
- crc = CRC_TABLE[crc ^ (int.from_bytes(data[idx], byteorder='big') & 0xFF)]
479
+ for idx in range(start, start + len):
480
+ crc = CRC_TABLE[crc ^ (int.from_bytes(data[idx], byteorder="big") & 0xFF)]
256
481
  elif isinstance(data[0], int):
257
- for idx in range(start, start+len):
482
+ for idx in range(start, start + len):
258
483
  crc = CRC_TABLE[crc ^ (data[idx] & 0xFF)]
259
484
 
260
485
  return crc