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.
- cgse-2024.1.4/.gitignore +35 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/PKG-INFO +2 -5
- {cgse-2024.1.3 → cgse-2024.1.4}/bump.py +18 -10
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/pyproject.toml +33 -16
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/bits.py +266 -41
- cgse-2024.1.4/libs/cgse-common/src/egse/calibration.py +250 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/command.py +10 -29
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/config.py +128 -2
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/control.py +0 -80
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/device.py +3 -1
- cgse-2024.1.4/libs/cgse-common/src/egse/env.py +592 -0
- cgse-2024.1.4/libs/cgse-common/src/egse/hk.py +794 -0
- cgse-2024.1.4/libs/cgse-common/src/egse/metrics.py +106 -0
- cgse-2024.1.4/libs/cgse-common/src/egse/response.py +101 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/settings.py +33 -31
- cgse-2024.1.4/libs/cgse-common/src/egse/settings.yaml +7 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/setup.py +116 -81
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/system.py +32 -13
- cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00028_201028_155259.yaml +110 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00029_201028_155331.yaml +111 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00030_210311_134043.yaml +196 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00080_210917_105245.yaml +372 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00081_210922_142259.yaml +375 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/CSL/conf/SETUP_CSL_00082_210923_094458.yaml +377 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/CSL1/README.md +4 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/CSL2/README.md +4 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/IAS/README.md +4 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/INTA/README.md +4 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/SRON/conf/SETUP_SRON_00027_211119_140441.yaml +430 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/SRON/conf/SETUP_SRON_00028_211119_160406.yaml +430 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/SRON/conf/SETUP_SRON_00029_211119_172918.yaml +431 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/SRON/conf/SETUP_SRON_00030_211122_103604.yaml +432 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/SRON/conf/SETUP_SRON_00031_211123_124900.yaml +433 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/conf/SETUP_20250114_1519.yaml +24 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/data/cal_coeff_1234.csv +4 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/data/calibration.csv +4 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/data/calibration.yaml +10 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/data/corrupt.yaml +11 -0
- cgse-2024.1.4/libs/cgse-common/tests/data/data/test_setup.yaml +7 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_config.py +15 -11
- cgse-2024.1.4/libs/cgse-common/tests/test_device.py +21 -0
- cgse-2024.1.4/libs/cgse-common/tests/test_env.py +196 -0
- cgse-2024.1.4/libs/cgse-common/tests/test_hk.py +54 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_resource.py +4 -4
- cgse-2024.1.4/libs/cgse-common/tests/test_response.py +109 -0
- cgse-2024.1.4/libs/cgse-common/tests/test_setup.py +840 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/pyproject.toml +13 -6
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/pyproject.toml +13 -7
- cgse-2024.1.4/libs/cgse-core/src/egse/confman/__main__.py +0 -0
- cgse-2024.1.4/libs/cgse-core/tests/test_confman_setups.py +25 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/pyproject.toml +2 -2
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/cgse-tools/pyproject.toml +10 -4
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/pyproject.toml +4 -2
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/__init__.py +23 -7
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/alpha.py +35 -50
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/dynalpha.py +2 -3
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/hexapod_ui.py +17 -15
- cgse-2024.1.4/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/joran.py +266 -0
- cgse-2024.1.4/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/joran.yaml +62 -0
- cgse-2024.1.4/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/joran_cs.py +184 -0
- cgse-2024.1.4/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/joran_protocol.py +128 -0
- cgse-2024.1.4/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/joran_ui.py +449 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/puna.yaml +5 -5
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/puna_ui.py +5 -5
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/punaplus.py +1 -1
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda.py +3 -3
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda.yaml +21 -21
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda_cs.py +1 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda_ui.py +5 -5
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-fits/pyproject.toml +3 -3
- cgse-2024.1.4/projects/plato/plato-hdf5/README.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-hdf5/pyproject.toml +3 -3
- cgse-2024.1.4/projects/plato/plato-spw/README.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-spw/pyproject.toml +2 -2
- {cgse-2024.1.3 → cgse-2024.1.4}/pyproject.toml +12 -6
- cgse-2024.1.4/ruff.toml +25 -0
- cgse-2024.1.3/.gitignore +0 -20
- cgse-2024.1.3/libs/cgse-common/pytest.ini +0 -11
- cgse-2024.1.3/libs/cgse-common/src/egse/env.py +0 -279
- cgse-2024.1.3/libs/cgse-common/src/egse/settings.yaml +0 -981
- {cgse-2024.1.3 → cgse-2024.1.4}/NOTES.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/README.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/TODO.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/README.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/decorators.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/exceptions.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/mixin.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/monitoring.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/observer.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/obsid.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/persistence.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/plugin.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/process.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/protocol.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/proxy.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/reload.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/resource.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/services.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/services.yaml +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/state.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/version.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/src/egse/zmq_ser.py +0 -0
- /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
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/data/data/data-file.txt +0 -0
- /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
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/data/icons/keyboard.png +0 -0
- /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
- /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
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/dummy.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/helpers.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_bits.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_command.py +0 -0
- /cgse-2024.1.3/projects/plato/plato-spw/README.md → /cgse-2024.1.4/libs/cgse-common/tests/test_control.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_decorators.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-common/tests/test_system.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/README.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/__init__.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/avoidance.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/cslmodel.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/laser_tracker_to_dict.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/point.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/pyplot.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/referenceFrame.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/refmodel.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/rotationMatrix.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-coordinates/src/egse/coordinates/transform3d_addon.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/README.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/confman/__init__.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/confman/confman.yaml +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/confman/confman_cs.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/logger/__init__.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/logger/__main__.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/logger/log_cs.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/procman/__init__.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/procman/procman.yaml +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/procman/procman_cs.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/storage/__init__.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/storage/__main__.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/storage/persistence.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/storage/storage.yaml +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/egse/storage/storage_cs.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/src/scripts/cgse.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/tests/conftest.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-core/tests/test_logger.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/README.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/__init__.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/buttons.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu-cs-start.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu-cs-stop.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu-cs.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu_cs-started.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu_cs-stopped.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/aeu_cs.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/alert.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/arrow-double-left.png +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/arrow-double-right.png +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/arrow-up.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/backward.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/busy.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/cleaning.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/color-scheme.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/cs-connected-alert.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/cs-connected-disabled.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/cs-connected.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/cs-not-connected.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/double-left-arrow.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/double-right-arrow.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/erase-disabled.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/erase.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fitsgen-start.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fitsgen-stop.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fitsgen.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/forward.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fov-hk-start.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fov-hk-stop.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/fov-hk.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/front-desk.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/home-actioned.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/home-disabled.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/home.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/info.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/invalid.png +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-green.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-grey.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-orange.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-red.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-square-green.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-square-grey.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-square-orange.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/led-square-red.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/limit-switch-all-green.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/limit-switch-all-red.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/limit-switch-el+.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/limit-switch-el-.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/location-marker.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-dpu.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-gimbal.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-huber.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-ogse.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-puna.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-tcs.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/logo-zonda.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/maximize.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/meter.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/more.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/n-fee-hk-start.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/n-fee-hk-stop.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/n-fee-hk.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/observing-off.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/observing-on.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/open-document-hdf5.png +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/open-document-hdf5.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/ops-mode.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/play-green.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/plugged-disabled.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/plugged.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/pm_ui.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/power-button-green.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/power-button-red.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/power-button.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/radar.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/radioactive.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/reload.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/remote-control-off.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/remote-control-on.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/repeat-blue.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/repeat.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/settings.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/shrink.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/shutter.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/sign-off.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/sign-on.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/sim-mode.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/small-buttons-go.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/small-buttons-minus.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/small-buttons-plus.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/sponge.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/start-button-disabled.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/start-button.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/stop-button-disabled.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/stop-button.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/stop-red.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/stop.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-disabled-square.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-disabled.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-off-square.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-off.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-on-square.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/switch-on.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/temperature-control.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/th_ui_logo.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/unplugged.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/unvalid.png +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/user-interface.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/vacuum.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/valid.png +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/zoom-to-pixel-dark.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/icons/zoom-to-pixel-white.svg +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/led.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/limitswitch.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/states.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/styles/dark.qss +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/styles/default.qss +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/styles.qss +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/libs/cgse-gui/src/egse/gui/switch.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/cgse-tools/README.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/cgse-tools/src/egse/tools/status.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/cgse-tools/src/scripts/cgse_plugins.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/cgse-tools/src/scripts/cgse_service_plugins.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/README.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/__init__.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/pmac.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/pmac_regex.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/puna.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/puna_cs.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/puna_protocol.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda_devif.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/egse/hexapod/symetrie/zonda_protocol.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/generic/symetrie-hexapod/src/scripts/cgse_service_plugins.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-fits/README.md +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-fits/src/egse/plugins/storage/fits.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-hdf5/src/egse/plugins/storage/hdf5.py +0 -0
- {cgse-2024.1.3 → cgse-2024.1.4}/projects/plato/plato-spw/src/egse/spw.py +0 -0
cgse-2024.1.4/.gitignore
ADDED
|
@@ -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
|
+
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,
|
|
33
|
+
with open(master_pyproject_path, "r") as file:
|
|
28
34
|
data = tomlkit.parse(file.read())
|
|
29
35
|
|
|
30
|
-
return data[
|
|
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",
|
|
46
|
+
with open("pyproject.toml", "r") as file:
|
|
41
47
|
data = tomlkit.parse(file.read())
|
|
42
48
|
|
|
43
49
|
try:
|
|
44
|
-
data[
|
|
50
|
+
data["project"]["version"] = new_version
|
|
45
51
|
|
|
46
|
-
with open(
|
|
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
|
-
|
|
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 ==
|
|
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
|
|
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
|
+
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
|
|
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 = ["
|
|
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 =
|
|
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
|
|
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 = [
|
|
178
|
+
units = ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
|
|
178
179
|
|
|
179
|
-
if base == 10 or base ==
|
|
180
|
+
if base == 10 or base == "decimal":
|
|
180
181
|
one_kilo = 1000
|
|
181
|
-
units = [
|
|
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,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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=
|
|
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
|