shepherd-core 2025.5.2__tar.gz → 2025.6.1__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 (148) hide show
  1. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/PKG-INFO +12 -12
  2. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/README.md +9 -9
  3. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/experiment_generic_var1.py +1 -1
  4. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/pyproject.toml +2 -2
  5. shepherd_core-2025.6.1/shepherd_core/commons.py +6 -0
  6. shepherd_core-2025.6.1/shepherd_core/config.py +34 -0
  7. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/__init__.py +2 -2
  8. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/base/calibration.py +13 -8
  9. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/base/content.py +4 -13
  10. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/base/wrapper.py +4 -4
  11. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/content/_external_fixtures.yaml +11 -11
  12. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/content/energy_environment.py +1 -1
  13. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/content/firmware.py +10 -5
  14. shepherd_core-2025.6.1/shepherd_core/data_models/content/virtual_harvester.py +523 -0
  15. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/content/virtual_source.py +37 -28
  16. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/content/virtual_source_fixture.yaml +1 -1
  17. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/experiment/experiment.py +29 -19
  18. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/experiment/observer_features.py +64 -28
  19. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/experiment/target_config.py +19 -9
  20. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/task/emulation.py +45 -32
  21. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/task/firmware_mod.py +1 -1
  22. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/task/harvest.py +16 -14
  23. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/task/observer_tasks.py +8 -6
  24. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/task/programming.py +3 -2
  25. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/task/testbed_tasks.py +7 -9
  26. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/cape_fixture.yaml +9 -1
  27. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/gpio.py +7 -0
  28. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/observer.py +1 -1
  29. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/observer_fixture.yaml +19 -2
  30. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/target.py +1 -1
  31. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/target_fixture.old1 +1 -1
  32. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/target_fixture.yaml +14 -1
  33. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/testbed.py +8 -9
  34. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/testbed_fixture.yaml +11 -0
  35. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/fw_tools/patcher.py +7 -8
  36. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/inventory/system.py +1 -3
  37. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/reader.py +15 -7
  38. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/testbed_client/cache_path.py +1 -1
  39. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/testbed_client/client_web.py +2 -2
  40. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/testbed_client/fixtures.py +13 -11
  41. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/testbed_client/user_model.py +3 -6
  42. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/version.py +1 -1
  43. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/writer.py +2 -2
  44. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core.egg-info/PKG-INFO +12 -12
  45. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core.egg-info/SOURCES.txt +1 -0
  46. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_config_emulator.yaml +2 -2
  47. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_config_harvester.yaml +1 -1
  48. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/test_experiment_models.py +1 -0
  49. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/test_task_models.py +0 -1
  50. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/fw_tools/test_patcher.py +6 -6
  51. shepherd_core-2025.5.2/shepherd_core/commons.py +0 -8
  52. shepherd_core-2025.5.2/shepherd_core/data_models/content/virtual_harvester.py +0 -294
  53. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/eenv_generator.py +0 -0
  54. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/experiment_from_yaml.yaml +0 -0
  55. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/experiment_generic_var2.py +0 -0
  56. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/experiment_models.py +0 -0
  57. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/firmware_model.py +0 -0
  58. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/firmware_modification.py +0 -0
  59. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/inventory.py +0 -0
  60. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/simulate_vharvester.py +0 -0
  61. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/simulate_vsource.py +0 -0
  62. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/uart_decode_waveform.py +0 -0
  63. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/uart_raw2.csv +0 -0
  64. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/examples/vsource_debug_sim.py +0 -0
  65. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/setup.cfg +0 -0
  66. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/__init__.py +0 -0
  67. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/calibration_hw_def.py +0 -0
  68. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/base/__init__.py +0 -0
  69. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/base/cal_measurement.py +0 -0
  70. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/base/shepherd.py +0 -0
  71. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/base/timezone.py +0 -0
  72. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/content/__init__.py +0 -0
  73. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/content/energy_environment_fixture.yaml +0 -0
  74. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/content/firmware_datatype.py +0 -0
  75. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/content/virtual_harvester_fixture.yaml +0 -0
  76. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/experiment/__init__.py +0 -0
  77. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/readme.md +0 -0
  78. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/task/__init__.py +0 -0
  79. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/__init__.py +0 -0
  80. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/cape.py +0 -0
  81. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/gpio_fixture.yaml +0 -0
  82. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/mcu.py +0 -0
  83. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/testbed/mcu_fixture.yaml +0 -0
  84. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/data_models/virtual_source_doc.txt +0 -0
  85. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/decoder_waveform/__init__.py +0 -0
  86. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/decoder_waveform/uart.py +0 -0
  87. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/fw_tools/__init__.py +0 -0
  88. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/fw_tools/converter.py +0 -0
  89. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/fw_tools/converter_elf.py +0 -0
  90. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/fw_tools/validation.py +0 -0
  91. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/inventory/__init__.py +0 -0
  92. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/inventory/python.py +0 -0
  93. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/inventory/target.py +0 -0
  94. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/logger.py +0 -0
  95. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/testbed_client/__init__.py +0 -0
  96. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/testbed_client/client_abc_fix.py +0 -0
  97. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/vsource/__init__.py +0 -0
  98. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/vsource/target_model.py +0 -0
  99. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/vsource/virtual_converter_model.py +0 -0
  100. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/vsource/virtual_harvester_model.py +0 -0
  101. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/vsource/virtual_harvester_simulation.py +0 -0
  102. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/vsource/virtual_source_model.py +0 -0
  103. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core/vsource/virtual_source_simulation.py +0 -0
  104. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core.egg-info/dependency_links.txt +0 -0
  105. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core.egg-info/requires.txt +0 -0
  106. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core.egg-info/top_level.txt +0 -0
  107. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/shepherd_core.egg-info/zip-safe +0 -0
  108. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/__init__.py +0 -0
  109. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/conftest.py +0 -0
  110. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/__init__.py +0 -0
  111. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/conftest.py +0 -0
  112. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_cal_data.yaml +0 -0
  113. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_cal_data_faulty.yaml +0 -0
  114. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_cal_meas.yaml +0 -0
  115. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_cal_meas_faulty1.yaml +0 -0
  116. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_cal_meas_faulty2.yaml +0 -0
  117. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_config_experiment.yaml +0 -0
  118. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_config_experiment_alternative.yaml +0 -0
  119. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_config_testbed.yaml +0 -0
  120. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/example_config_virtsource.yaml +0 -0
  121. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/test_base_models.py +0 -0
  122. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/test_content_fixtures.py +0 -0
  123. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/test_content_models.py +0 -0
  124. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/test_examples.py +0 -0
  125. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/test_task_generation.py +0 -0
  126. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/test_testbed_fixtures.py +0 -0
  127. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/data_models/test_testbed_models.py +0 -0
  128. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/decoder_waveform/__init__.py +0 -0
  129. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/decoder_waveform/test_decoder.py +0 -0
  130. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/fw_tools/__init__.py +0 -0
  131. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/fw_tools/build_msp.elf +0 -0
  132. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/fw_tools/build_nrf.elf +0 -0
  133. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/fw_tools/conftest.py +0 -0
  134. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/fw_tools/test_converter.py +0 -0
  135. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/fw_tools/test_validation.py +0 -0
  136. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/inventory/__init__.py +0 -0
  137. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/inventory/test_inventory.py +0 -0
  138. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/test_cal_hw.py +0 -0
  139. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/test_examples.py +0 -0
  140. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/test_logger.py +0 -0
  141. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/test_reader.py +0 -0
  142. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/test_writer.py +0 -0
  143. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/testbed_client/__init__.py +0 -0
  144. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/vsource/__init__.py +0 -0
  145. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/vsource/conftest.py +0 -0
  146. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/vsource/test_converter.py +0 -0
  147. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/vsource/test_harvester.py +0 -0
  148. {shepherd_core-2025.5.2 → shepherd_core-2025.6.1}/tests/vsource/test_z.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shepherd_core
3
- Version: 2025.5.2
3
+ Version: 2025.6.1
4
4
  Summary: Programming- and CLI-Interface for the h5-dataformat of the Shepherd-Testbed
5
5
  Author-email: Ingmar Splitt <ingmar.splitt@tu-dresden.de>
6
6
  Maintainer-email: Ingmar Splitt <ingmar.splitt@tu-dresden.de>
7
- Project-URL: Documentation, https://github.com/orgua/shepherd-datalib/blob/main/README.md
8
- Project-URL: Issues, https://github.com/orgua/shepherd-datalib/issues
7
+ Project-URL: Documentation, https://github.com/nes-lab/shepherd-tools/blob/main/README.md
8
+ Project-URL: Issues, https://github.com/nes-lab/shepherd-tools/issues
9
9
  Project-URL: Source, https://pypi.org/project/shepherd-core/
10
10
  Keywords: testbed,beaglebone,pru,batteryless,energyharvesting,solar
11
11
  Platform: unix
@@ -56,16 +56,16 @@ Requires-Dist: coverage; extra == "test"
56
56
 
57
57
  # Core Library
58
58
 
59
- [![PyPiVersion](https://img.shields.io/pypi/v/shepherd_core.svg)](https://pypi.org/project/shepherd_core)
59
+ [![PyPIVersion](https://img.shields.io/pypi/v/shepherd_core.svg)](https://pypi.org/project/shepherd_core)
60
60
  [![image](https://img.shields.io/pypi/pyversions/shepherd_core.svg)](https://pypi.python.org/pypi/shepherd-core)
61
- [![Pytest](https://github.com/orgua/shepherd-datalib/actions/workflows/py_unittest.yml/badge.svg)](https://github.com/orgua/shepherd-datalib/actions/workflows/py_unittest.yml)
61
+ [![QA-Tests](https://github.com/nes-lab/shepherd-tools/actions/workflows/quality_assurance.yaml/badge.svg)](https://github.com/nes-lab/shepherd-tools/actions/workflows/quality_assurance.yaml)
62
62
  [![CodeStyle](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
63
63
 
64
- **Main Documentation**: <https://orgua.github.io/shepherd>
64
+ **Main Documentation**: <https://nes-lab.github.io/shepherd>
65
65
 
66
- **Source Code**: <https://github.com/orgua/shepherd-datalib>
66
+ **Source Code**: <https://github.com/nes-lab/shepherd-tools>
67
67
 
68
- **Main Project**: <https://github.com/orgua/shepherd>
68
+ **Main Project**: <https://github.com/nes-lab/shepherd>
69
69
 
70
70
  ---
71
71
 
@@ -87,7 +87,7 @@ For postprocessing shepherds .h5-files usage of [shepherd_data](https://pypi.org
87
87
  - decode waveforms (gpio-state & timestamp) to UART
88
88
  - create an inventory (for deployed versions of software, hardware)
89
89
 
90
- See [official documentation](https://orgua.github.io/shepherd) or [example scripts](https://github.com/orgua/shepherd-datalib/tree/main/shepherd_core/examples) for more details and usage. Most functionality is showcased in both. The [extra](https://github.com/orgua/shepherd-datalib/tree/main/shepherd_core/extra)-directory holds data-generators relevant for the testbed. Notably is a [trafficbench](https://github.com/orgua/TrafficBench)-experiment that's used to derive the link-matrix of the testbed-nodes.
90
+ See [official documentation](https://nes-lab.github.io/shepherd) or [example scripts](https://github.com/nes-lab/shepherd-tools/tree/main/shepherd_core/examples) for more details and usage. Most functionality is showcased in both. The [extra](https://github.com/nes-lab/shepherd-tools/tree/main/shepherd_core/extra)-directory holds data-generators relevant for the testbed. Notably is a [trafficbench](https://github.com/nes-lab/TrafficBench)-experiment that's used to derive the link-matrix of the testbed-nodes.
91
91
 
92
92
  ## Config-Models in Detail
93
93
 
@@ -145,9 +145,9 @@ pip install shepherd-data -U
145
145
  For bleeding-edge-features or dev-work it is possible to install directly from GitHub-Sources (here `dev`-branch):
146
146
 
147
147
  ```Shell
148
- pip install git+https://github.com/orgua/shepherd-datalib.git@dev#subdirectory=shepherd_core -U
148
+ pip install git+https://github.com/nes-lab/shepherd-tools.git@dev#subdirectory=shepherd_core -U
149
149
  # and on sheep with newer debian
150
- sudo pip install git+https://github.com/orgua/shepherd-datalib.git@dev#subdirectory=shepherd_core -U --break-system-packages
150
+ sudo pip install git+https://github.com/nes-lab/shepherd-tools.git@dev#subdirectory=shepherd_core -U --break-system-packages
151
151
  ```
152
152
 
153
153
  If you are working with ``.elf``-files (embedding into experiments) you make "objcopy" accessible to python. In Ubuntu, you can either install ``build-essential`` or ``binutils-$ARCH`` with arch being ``msp430`` or ``arm-none-eabi`` for the nRF52.
@@ -179,7 +179,7 @@ To run the testbench, follow these steps:
179
179
  3. run the testbench (~ 320 tests):
180
180
 
181
181
  ```Shell
182
- cd shepherd-datalib/shepherd_core
182
+ cd shepherd-tools/shepherd_core
183
183
  pip3 install ./[tests]
184
184
  pytest
185
185
  ```
@@ -1,15 +1,15 @@
1
1
  # Core Library
2
2
 
3
- [![PyPiVersion](https://img.shields.io/pypi/v/shepherd_core.svg)](https://pypi.org/project/shepherd_core)
3
+ [![PyPIVersion](https://img.shields.io/pypi/v/shepherd_core.svg)](https://pypi.org/project/shepherd_core)
4
4
  [![image](https://img.shields.io/pypi/pyversions/shepherd_core.svg)](https://pypi.python.org/pypi/shepherd-core)
5
- [![Pytest](https://github.com/orgua/shepherd-datalib/actions/workflows/py_unittest.yml/badge.svg)](https://github.com/orgua/shepherd-datalib/actions/workflows/py_unittest.yml)
5
+ [![QA-Tests](https://github.com/nes-lab/shepherd-tools/actions/workflows/quality_assurance.yaml/badge.svg)](https://github.com/nes-lab/shepherd-tools/actions/workflows/quality_assurance.yaml)
6
6
  [![CodeStyle](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
7
7
 
8
- **Main Documentation**: <https://orgua.github.io/shepherd>
8
+ **Main Documentation**: <https://nes-lab.github.io/shepherd>
9
9
 
10
- **Source Code**: <https://github.com/orgua/shepherd-datalib>
10
+ **Source Code**: <https://github.com/nes-lab/shepherd-tools>
11
11
 
12
- **Main Project**: <https://github.com/orgua/shepherd>
12
+ **Main Project**: <https://github.com/nes-lab/shepherd>
13
13
 
14
14
  ---
15
15
 
@@ -31,7 +31,7 @@ For postprocessing shepherds .h5-files usage of [shepherd_data](https://pypi.org
31
31
  - decode waveforms (gpio-state & timestamp) to UART
32
32
  - create an inventory (for deployed versions of software, hardware)
33
33
 
34
- See [official documentation](https://orgua.github.io/shepherd) or [example scripts](https://github.com/orgua/shepherd-datalib/tree/main/shepherd_core/examples) for more details and usage. Most functionality is showcased in both. The [extra](https://github.com/orgua/shepherd-datalib/tree/main/shepherd_core/extra)-directory holds data-generators relevant for the testbed. Notably is a [trafficbench](https://github.com/orgua/TrafficBench)-experiment that's used to derive the link-matrix of the testbed-nodes.
34
+ See [official documentation](https://nes-lab.github.io/shepherd) or [example scripts](https://github.com/nes-lab/shepherd-tools/tree/main/shepherd_core/examples) for more details and usage. Most functionality is showcased in both. The [extra](https://github.com/nes-lab/shepherd-tools/tree/main/shepherd_core/extra)-directory holds data-generators relevant for the testbed. Notably is a [trafficbench](https://github.com/nes-lab/TrafficBench)-experiment that's used to derive the link-matrix of the testbed-nodes.
35
35
 
36
36
  ## Config-Models in Detail
37
37
 
@@ -89,9 +89,9 @@ pip install shepherd-data -U
89
89
  For bleeding-edge-features or dev-work it is possible to install directly from GitHub-Sources (here `dev`-branch):
90
90
 
91
91
  ```Shell
92
- pip install git+https://github.com/orgua/shepherd-datalib.git@dev#subdirectory=shepherd_core -U
92
+ pip install git+https://github.com/nes-lab/shepherd-tools.git@dev#subdirectory=shepherd_core -U
93
93
  # and on sheep with newer debian
94
- sudo pip install git+https://github.com/orgua/shepherd-datalib.git@dev#subdirectory=shepherd_core -U --break-system-packages
94
+ sudo pip install git+https://github.com/nes-lab/shepherd-tools.git@dev#subdirectory=shepherd_core -U --break-system-packages
95
95
  ```
96
96
 
97
97
  If you are working with ``.elf``-files (embedding into experiments) you make "objcopy" accessible to python. In Ubuntu, you can either install ``build-essential`` or ``binutils-$ARCH`` with arch being ``msp430`` or ``arm-none-eabi`` for the nRF52.
@@ -123,7 +123,7 @@ To run the testbench, follow these steps:
123
123
  3. run the testbench (~ 320 tests):
124
124
 
125
125
  ```Shell
126
- cd shepherd-datalib/shepherd_core
126
+ cd shepherd-tools/shepherd_core
127
127
  pip3 install ./[tests]
128
128
  pytest
129
129
  ```
@@ -48,7 +48,7 @@ xp = sm.Experiment(
48
48
  ),
49
49
  power_tracing=None,
50
50
  gpio_tracing=sm.GpioTracing(),
51
- uart_tracing=sm.UartTracing(baudrate=115_200),
51
+ uart_logging=sm.UartLogging(baudrate=115_200),
52
52
  ),
53
53
  ],
54
54
  )
@@ -71,8 +71,8 @@ file = "README.md"
71
71
  content-type = "text/markdown"
72
72
 
73
73
  [project.urls]
74
- Documentation = "https://github.com/orgua/shepherd-datalib/blob/main/README.md"
75
- Issues = "https://github.com/orgua/shepherd-datalib/issues"
74
+ Documentation = "https://github.com/nes-lab/shepherd-tools/blob/main/README.md"
75
+ Issues = "https://github.com/nes-lab/shepherd-tools/issues"
76
76
  Source = "https://pypi.org/project/shepherd-core/"
77
77
 
78
78
  [build-system]
@@ -0,0 +1,6 @@
1
+ """Container for commonly shared constants."""
2
+
3
+ from .config import config
4
+
5
+ # TODO: deprecated - replace with config in subprojects and then remove here
6
+ SAMPLERATE_SPS_DEFAULT: int = config.SAMPLERATE_SPS
@@ -0,0 +1,34 @@
1
+ """Container for a common configuration.
2
+
3
+ This can be adapted by the user by importing 'config' and changing its variables.
4
+ """
5
+
6
+ from pydantic import BaseModel
7
+ from pydantic import HttpUrl
8
+
9
+
10
+ class ConfigDefault(BaseModel):
11
+ """Container for a common configuration."""
12
+
13
+ __slots__ = ()
14
+
15
+ TESTBED: str = "shepherd_tud_nes"
16
+ """name of the testbed to validate against - if enabled - see switch below"""
17
+ VALIDATE_INFRA: bool = True
18
+ """switch to turn on / off deep validation of data models also considering the current
19
+ layout & infrastructure of the testbed.
20
+ """
21
+
22
+ SAMPLERATE_SPS: int = 100_000
23
+ """Rate of IV-Recording of the testbed."""
24
+
25
+ UID_NAME: str = "SHEPHERD_NODE_ID"
26
+ """Variable name to patch in ELF-file"""
27
+ UID_SIZE: int = 2
28
+ """Variable size in Byte"""
29
+
30
+ TESTBED_SERVER: HttpUrl = "https://shepherd.cfaed.tu-dresden.de:8000/"
31
+ """Server that holds up to date testbed fixtures"""
32
+
33
+
34
+ config = ConfigDefault()
@@ -31,7 +31,7 @@ from .experiment.observer_features import GpioLevel
31
31
  from .experiment.observer_features import GpioTracing
32
32
  from .experiment.observer_features import PowerTracing
33
33
  from .experiment.observer_features import SystemLogging
34
- from .experiment.observer_features import UartTracing
34
+ from .experiment.observer_features import UartLogging
35
35
  from .experiment.target_config import TargetConfig
36
36
 
37
37
  __all__ = [
@@ -55,7 +55,7 @@ __all__ = [
55
55
  "ShpModel",
56
56
  "SystemLogging",
57
57
  "TargetConfig",
58
- "UartTracing",
58
+ "UartLogging",
59
59
  "VirtualHarvesterConfig",
60
60
  "VirtualSourceConfig",
61
61
  "Wrapper",
@@ -95,14 +95,19 @@ cal_hrv_legacy = { # legacy translator
95
95
  "adc_voltage": "adc_V_Sense", # datalog voltage
96
96
  }
97
97
 
98
+ # defaults (pre-init complex types)
99
+ cal_pair_dac_V = CalibrationPair.from_fn(dac_voltage_to_raw, unit="V")
100
+ cal_pair_adc_V = CalibrationPair.from_fn(adc_voltage_to_raw, unit="V")
101
+ cal_pair_adc_C = CalibrationPair.from_fn(adc_current_to_raw, unit="A")
102
+
98
103
 
99
104
  class CalibrationHarvester(ShpModel):
100
105
  """Container for all calibration-pairs for that device."""
101
106
 
102
- dac_V_Hrv: CalibrationPair = CalibrationPair.from_fn(dac_voltage_to_raw, unit="V")
103
- dac_V_Sim: CalibrationPair = CalibrationPair.from_fn(dac_voltage_to_raw, unit="V")
104
- adc_V_Sense: CalibrationPair = CalibrationPair.from_fn(adc_voltage_to_raw, unit="V")
105
- adc_C_Hrv: CalibrationPair = CalibrationPair.from_fn(adc_current_to_raw, unit="A")
107
+ dac_V_Hrv: CalibrationPair = cal_pair_dac_V
108
+ dac_V_Sim: CalibrationPair = cal_pair_dac_V
109
+ adc_V_Sense: CalibrationPair = cal_pair_adc_V
110
+ adc_C_Hrv: CalibrationPair = cal_pair_adc_C
106
111
 
107
112
  def export_for_sysfs(self) -> dict:
108
113
  """Convert and write the essential data.
@@ -143,10 +148,10 @@ class CalibrationEmulator(ShpModel):
143
148
  Differentiates between both target-ports A/B.
144
149
  """
145
150
 
146
- dac_V_A: CalibrationPair = CalibrationPair.from_fn(dac_voltage_to_raw, unit="V")
147
- dac_V_B: CalibrationPair = CalibrationPair.from_fn(dac_voltage_to_raw, unit="V")
148
- adc_C_A: CalibrationPair = CalibrationPair.from_fn(adc_current_to_raw, unit="A")
149
- adc_C_B: CalibrationPair = CalibrationPair.from_fn(adc_current_to_raw, unit="A")
151
+ dac_V_A: CalibrationPair = cal_pair_dac_V
152
+ dac_V_B: CalibrationPair = cal_pair_dac_V
153
+ adc_C_A: CalibrationPair = cal_pair_adc_C
154
+ adc_C_B: CalibrationPair = cal_pair_adc_C
150
155
 
151
156
  def export_for_sysfs(self) -> dict:
152
157
  """Convert and write the essential data.
@@ -1,21 +1,16 @@
1
1
  """Base-Model for all content."""
2
2
 
3
- import hashlib
4
3
  from datetime import datetime
5
4
  from typing import Annotated
6
5
  from typing import Optional
7
- from typing import Union
8
6
  from uuid import uuid4
9
7
 
10
- from pydantic import UUID4
11
8
  from pydantic import Field
12
9
  from pydantic import StringConstraints
13
10
  from pydantic import model_validator
14
11
  from typing_extensions import Self
15
- from typing_extensions import deprecated
16
12
 
17
13
  from .shepherd import ShpModel
18
- from .timezone import local_now
19
14
 
20
15
  # constr -> to_lower=True, max_length=16, regex=r"^[\w]+$"
21
16
  # ⤷ Regex = AlphaNum
@@ -26,24 +21,20 @@ SafeStr = Annotated[str, StringConstraints(pattern=r"^[ -~]+$")]
26
21
  # ⤷ Regex = All Printable ASCII-Characters with Space
27
22
 
28
23
 
29
- @deprecated("use UUID4 instead")
30
24
  def id_default() -> int:
31
25
  """Generate a unique ID - usable as default value.
32
26
 
33
- Note: IdInt has space for 128 bit, so 128/4 = 32 hex-chars
27
+ Note: IdInt in mongoDB can currently handle 8 bytes (16 hex-values)
34
28
  """
35
- time_stamp = str(local_now()).encode("utf-8")
36
- time_hash = hashlib.sha3_224(time_stamp).hexdigest()[-32:]
37
- return int(time_hash, 16)
29
+ return int(uuid4().hex[-15:], 16)
38
30
 
39
31
 
40
32
  class ContentModel(ShpModel):
41
33
  """Base-Model for content with generalized properties."""
42
34
 
43
- # id: UUID4 = Field( # TODO: db-migration - temp fix for documentation
44
- id: Union[UUID4, int] = Field(
35
+ id: int = Field(
45
36
  description="Unique ID",
46
- default_factory=uuid4,
37
+ default_factory=id_default,
47
38
  )
48
39
  name: NameStr
49
40
  description: Annotated[Optional[SafeStr], Field(description="Required when public")] = None
@@ -17,11 +17,11 @@ class Wrapper(BaseModel):
17
17
  """Generalized web- & file-interface for all models with dynamic typecasting."""
18
18
 
19
19
  datatype: str
20
- # ⤷ model-name
20
+ """ ⤷ model-name"""
21
21
  comment: Optional[SafeStrClone] = None
22
22
  created: Optional[datetime] = None
23
- # ⤷ Optional metadata
23
+ """ ⤷ Optional metadata"""
24
24
  lib_ver: Optional[str] = version
25
- # ⤷ for debug-purposes and later comp-checks
25
+ """ ⤷ for debug-purposes and later compatibility-checks"""
26
26
  parameters: dict
27
- # ⤷ ShpModel
27
+ """ ⤷ ShpModel"""
@@ -1,7 +1,7 @@
1
1
  - datatype: EnergyEnvironment
2
2
  created: 2025-05-12 17:28:39.756999+02:00
3
3
  parameters:
4
- id: 2639560972524229652
4
+ id: 263956097252422
5
5
  name: eenv_static_2000mV_10mA_3600s
6
6
  description: Artificial static Energy Environment, 2000mV, 10mA, 3600s
7
7
  comment: null
@@ -24,7 +24,7 @@
24
24
  - datatype: EnergyEnvironment
25
25
  created: 2025-05-12 17:28:39.764595+02:00
26
26
  parameters:
27
- id: 9823394105967169626
27
+ id: 98233941059
28
28
  name: eenv_static_2000mV_1mA_3600s
29
29
  description: Artificial static Energy Environment, 2000mV, 1mA, 3600s
30
30
  comment: null
@@ -47,7 +47,7 @@
47
47
  - datatype: EnergyEnvironment
48
48
  created: 2025-05-12 17:28:39.772144+02:00
49
49
  parameters:
50
- id: 3900615675169501222
50
+ id: 39006156751
51
51
  name: eenv_static_2000mV_50mA_3600s
52
52
  description: Artificial static Energy Environment, 2000mV, 50mA, 3600s
53
53
  comment: null
@@ -70,7 +70,7 @@
70
70
  - datatype: EnergyEnvironment
71
71
  created: 2025-05-12 17:28:39.779737+02:00
72
72
  parameters:
73
- id: 14796673729431137386
73
+ id: 1479667372943113
74
74
  name: eenv_static_2000mV_5mA_3600s
75
75
  description: Artificial static Energy Environment, 2000mV, 5mA, 3600s
76
76
  comment: null
@@ -93,7 +93,7 @@
93
93
  - datatype: EnergyEnvironment
94
94
  created: 2025-05-12 17:28:39.787329+02:00
95
95
  parameters:
96
- id: 6648482606607441403
96
+ id: 664848260660744
97
97
  name: eenv_static_3000mV_10mA_3600s
98
98
  description: Artificial static Energy Environment, 3000mV, 10mA, 3600s
99
99
  comment: null
@@ -116,7 +116,7 @@
116
116
  - datatype: EnergyEnvironment
117
117
  created: 2025-05-12 17:28:39.794922+02:00
118
118
  parameters:
119
- id: 13566000951043177991
119
+ id: 1356600095104317
120
120
  name: eenv_static_3000mV_1mA_3600s
121
121
  description: Artificial static Energy Environment, 3000mV, 1mA, 3600s
122
122
  comment: null
@@ -139,7 +139,7 @@
139
139
  - datatype: EnergyEnvironment
140
140
  created: 2025-05-12 17:28:39.802410+02:00
141
141
  parameters:
142
- id: 7977778327156610158
142
+ id: 797777832715661
143
143
  name: eenv_static_3000mV_50mA_3600s
144
144
  description: Artificial static Energy Environment, 3000mV, 50mA, 3600s
145
145
  comment: null
@@ -162,7 +162,7 @@
162
162
  - datatype: EnergyEnvironment
163
163
  created: 2025-05-12 17:28:39.810147+02:00
164
164
  parameters:
165
- id: 4900162978999238419
165
+ id: 490016297899923
166
166
  name: eenv_static_3000mV_5mA_3600s
167
167
  description: Artificial static Energy Environment, 3000mV, 5mA, 3600s
168
168
  comment: null
@@ -269,7 +269,7 @@
269
269
  - datatype: Firmware
270
270
  created: 2025-05-12 17:28:39.851412+02:00
271
271
  parameters:
272
- id: 7163917825449888392
272
+ id: 716391782544988
273
273
  name: nrf52_deep_sleep
274
274
  description: practically turned off MCU with the lowest possible consumption
275
275
  comment: null
@@ -325,7 +325,7 @@
325
325
  - datatype: Firmware
326
326
  created: 2025-05-12 17:28:39.868340+02:00
327
327
  parameters:
328
- id: 3174430733058172825
328
+ id: 317443073305817
329
329
  name: nrf52_rf_survey
330
330
  description: Link Matrix Generator - TX-Unit - sends packet with every possible
331
331
  P_TX, loops until stopped
@@ -354,7 +354,7 @@
354
354
  - datatype: Firmware
355
355
  created: 2025-05-12 17:28:39.876819+02:00
356
356
  parameters:
357
- id: 16381936580724580968
357
+ id: 1638193658072458
358
358
  name: nrf52_rf_test
359
359
  description: sends out 1 BLE-Packet per second (verify with an app like 'RaMBLE')
360
360
  comment: null
@@ -28,7 +28,7 @@ class EnergyEnvironment(ContentModel):
28
28
  data_path: Path
29
29
  data_type: EnergyDType
30
30
  data_local: bool = True
31
- # ⤷ signals that file has to be copied to testbed
31
+ """ ⤷ signals that file has to be copied to testbed"""
32
32
 
33
33
  duration: PositiveFloat
34
34
  energy_Ws: PositiveFloat
@@ -62,7 +62,7 @@ class Firmware(ContentModel, title="Firmware of Target"):
62
62
  data_type: FirmwareDType
63
63
  data_hash: Optional[str] = None
64
64
  data_local: bool = True
65
- # ⤷ signals that file has to be copied to testbed
65
+ """ ⤷ signals that file has to be copied to testbed"""
66
66
 
67
67
  @model_validator(mode="before")
68
68
  @classmethod
@@ -125,12 +125,17 @@ class Firmware(ContentModel, title="Firmware of Target"):
125
125
  if "mcu" not in kwargs:
126
126
  kwargs["mcu"] = arch_to_mcu[arch]
127
127
 
128
+ # verification of ELF - warn if something is off
129
+ # -> adds ARCH if it is able to derive
128
130
  if kwargs["data_type"] == FirmwareDType.base64_elf:
129
131
  arch = fw_tools.read_arch(file)
130
- if "msp430" in arch and not fw_tools.is_elf_msp430(file):
131
- raise ValueError("File is not a ELF for msp430")
132
- if ("nrf52" in arch or "arm" in arch) and not fw_tools.is_elf_nrf52(file):
133
- raise ValueError("File is not a ELF for nRF52")
132
+ try:
133
+ if "msp430" in arch and not fw_tools.is_elf_msp430(file):
134
+ raise ValueError("File is not a ELF for msp430")
135
+ if ("nrf52" in arch or "arm" in arch) and not fw_tools.is_elf_nrf52(file):
136
+ raise ValueError("File is not a ELF for nRF52")
137
+ except RuntimeError:
138
+ logger.warning("ObjCopy not found -> Arch of Firmware can't be verified")
134
139
  logger.debug("ELF-File '%s' has arch: %s", file.name, arch)
135
140
  if "mcu" not in kwargs:
136
141
  kwargs["mcu"] = arch_to_mcu[arch]