Package: able
ABleAble stands for Allthenticate's BLE Peripheral Library.
It serves the purpose of enabling the abstraction of using a BLE Peripheral on Ubuntu, MacOs and Windows based systems
without having to adapt your software to have platform specific support.In ProgressNote that this project is still undergoing work by the development team, the main things we are working on are:Cleaning up some bugs in the bluezdbus and macos backendMaking the gitlab/github repo public for contributionsSetup a slack for developers to reach out to us about issues or ideasMake logging/use clearer and update our documentation (for example we require a fork of bluez) and moving things from this readme to our docsGet our docs on read the docsSome more surprises :)How To'sQuick StartTo get started just runget_started.sh. This will install poetry and all of the project's dependencies, and drop you into the projects virtual environment.bash get_started.shWhenever you pull new updates we recommend running a quickpoetry installto get any updates. From there, please check out our examples to get started with the project!Upgrading Poetry InstallerIt may be the case that the current version of your Poetry package is outdated. Runscripts/check_poetry.shto check if there is a newer version of the poetry installer.bash scripts/check_poetry.shDocumentationWriting DocsWe follow the Sphinx docstring format for our docstrings, see the followingsiteon the complete specification, but the
general docstring will look like:"""
[Summary]

:param [ParamName]: [ParamDescription], defaults to [DefaultParamVal]
:type [ParamName]: [ParamType](, optional)
...
:raises [ErrorType]: [ErrorDescription]
...
:return: [ReturnDescription]
:rtype: [ReturnType]
"""Generating DocsTo generate the docs for local use you should just have to run the following inside of the poetry shell:make htmlThen open the html produced by Sphinx.Auto-Generating DocsIf you want to have docs magically update as you are writing them, run the following command:sphinx-autobuild source/ build/html/Testing AbleHow To Test?Running tests are easy, you need to only do a few things as a developer. First track down the IP of the companion you
plan to be using, we recommend a raspberry pi. Once you have that IP, export it as an environment variable as so:export ABLE_CENTRAL_IP="<IP>"Now, we can run the tests with the following command:poetry install && poetry run pytest testsRigorous TestingIf you want to do more rigorous testing over a long period of time and check for flaky tests, you will
have to modify thepyproject.toml. We already have the dependencies you need to run tests multiple times
to detect flakiness, all you need to do is modify the following line:addopts = "--flake-finder --flake-runs=1 --reruns 5 --reruns-delay 5"Into:addopts = "--flake-finder --flake-runs=10 --reruns 5 --reruns-delay 5"This will run each test 10 times, you can even modify it to be greater should you choose. You can also
modify thererunsandreruns-delayparameters to change how much time you should wait between failed tests,
maybe to let things simmer and how many reruns you will accept.Speedy TestsOur dependencies includepytest-fast-firstwhich will locally track which tests are quicker and will use AI and
deep learning (a json dictionary of times) to track and run tests that go faster first! Neat!Coming Soon To TestingWe are hoping to have unit tests coming soon for Able but right now are relying solely on hardware in the loop tests
to get things off the ground. Eventually we will detect if you have a companion set and if not, we will only run
the unit tests.SupportIf you have any questions on the use of this library feel free to reach out the head
maintainerbernie@allthenticate.comor submit an issue on the repository.ContributingContributing is not currently enabled but once the repository is licensed we will be opening the project up for public contributions.AcknowledgementsThis project was inspired by the great work done by the developer team forBleakwhich is a fantastic platform agnostic bluetooth framework for a BLE client/central we would highly reccomend!We also took notes from the work done by Kevin Car with his companion libraryBless,
who made a great server supplement to Bleak whose work saved us from countless hours from fighting dbus and pyobjc!