Package: shepherd-core
Core LibraryDocumentation:https://orgua.github.io/shepherd/external/shepherd_core.htmlSource Code:https://github.com/orgua/shepherd-datalibMain Project:https://github.com/orgua/shepherdThis Python Module is designed as a library and bundles data-models and file-access-routines for the shepherd-testbed, that are used by several codebases.For postprocessing shepherds .h5-files users want to useshepherd_data.Featuresread and write shepherds hdf5-filescreate, read, write and convert experiments for the testbed (all data-models included)simulate the virtual source, including virtual harvesters (and virtual converter as a whole)connect and query the testbed via a webclient (TestbedClient)offline usage defaults to static demo-fixtures loaded from yaml-files in the model-directorieswork with target-firmwaresembed, modify, verify, convertNote: working with ELF-files requires external dependencies, seeInstallation-Chapterdecode waveforms (gpio-state & timestamp) to UARTcreate an inventory (used versions of software, hardware)Seeexamplesfor more details and usage. Most functionality is showcased there. Theextra-directory holds data-generators relevant for the testbed. Notably is a trafficbench-experiment that's used to derive the link-matrix.CompatibilityOSPyVersionCommentUbuntu3.8 - 3.12Windows3.8 - 3.12no support for elf and hex-conversions yetMacOS3.8 - 3.12hex-conversion missingNotes:hex-conversion needs a working and accessible objcopyelf-supports needsshepherd-core[elf]installspwntools-elf-onlymost elf-features also still utilize hex-conversionData-Models in Detailnew orchestration/data-modelswith focus on remote shepherd-testbedclasses of sub-models/base: base-classes, configuration and -functionality for all models/testbed: meta-data representation of all testbed-components/content: reusable meta-data for fw, h5 and vsrc-definitions/experiment: configuration-models including sub-systems/task: digestible configs for shepherd-herd or -sheepbehavior controlled byShpModelandcontent-modela basic database is available as fixtures through atb_clientfixtures selectable by name & IDfixtures support inheritancemodels supportauto-completion with neutral / sensible valuescomplex and custom datatypes (i.e. PositiveInt, lists-checks on length)checking of inputs and type-castinggenerate their own schema (for web-forms)pre-validationstore to & load from yaml with typecheck through wrapperdocumentationexperiment-definition is designed securelytypes are limited in size (str)exposes no internal pathsexperiments can be transformed to task-sets (TestbedTasks.from_xp())InstallationThe Library is available via PyPI and can be installed withpipinstallshepherd-core-U# or for the full experience (includes core)pipinstallshepherd-data-UFor bleeding-edge-features or dev-work it is possible to install directly from GitHub-Sources (heredev-branch):pipinstallgit+https://github.com/orgua/shepherd-datalib.git@dev#subdirectory=shepherd_core-UIf you are working with.elf-files (embedding into experiments) you make "objcopy" accessible to python. In Ubuntu, you can either installbuild-essentialorbinutils-$ARCHwith arch beingmsp430orarm-none-eabifor the nRF52.sudoaptinstallbuild-essentialFor more advanced work with.elf-files (modify value of symbols / target-ID) you should installpipinstallshepherd-core[elf]and also make sure the prereqs for thepwntoolsare met.For creating an inventory of the host-system you should installpipinstallshepherd-core[inventory]