{"id":16073383,"url":"https://github.com/thirtytwobits/nanaimo","last_synced_at":"2025-03-16T08:32:18.479Z","repository":{"id":37545833,"uuid":"186950068","full_name":"thirtytwobits/nanaimo","owner":"thirtytwobits","description":"A delicious Python treat that makes on-target testing sweet and satisfying.","archived":false,"fork":false,"pushed_at":"2020-05-06T21:40:39.000Z","size":14329,"stargazers_count":39,"open_issues_count":41,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-27T05:51:29.765Z","etag":null,"topics":["asyncio","embedded","embedded-systems","pytest-plugin","python3","robotics","test","typed"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thirtytwobits.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.rst","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-16T04:18:18.000Z","updated_at":"2023-10-21T04:51:43.000Z","dependencies_parsed_at":"2022-08-18T02:55:28.983Z","dependency_job_id":null,"html_url":"https://github.com/thirtytwobits/nanaimo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirtytwobits%2Fnanaimo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirtytwobits%2Fnanaimo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirtytwobits%2Fnanaimo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirtytwobits%2Fnanaimo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thirtytwobits","download_url":"https://codeload.github.com/thirtytwobits/nanaimo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806070,"owners_count":20350775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","embedded","embedded-systems","pytest-plugin","python3","robotics","test","typed"],"created_at":"2024-10-09T08:07:07.279Z","updated_at":"2025-03-16T08:32:16.941Z","avatar_url":"https://github.com/thirtytwobits.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"############################################\nNanaimo: Hardware-In-the-Loop Unit Testing\n############################################\n\n|badge_docs|_ |badge_build|_ |badge_github_license|_ |badge_pypi_support|_ |badge_pypi_version|_ \\\n|badge_sonarcloud_quality|_ |badge_sonarcloud_coverage|_ |badge_sonarcloud_bugs|_\n\n.. note::\n    Nanaimo is alpha software and will remain so until we bump its version to 1.0.0 or greater.\n    We will not knowingly break compatibility within a minor revision but we will break compatibility\n    a few more times between minor revisions until beta is declared. Because of this you should depend\n    on a minor version explicitly. For example ::\n\n        nanaimo ~= 0.1\n\n\n.. figure:: https://thirtytwobits.github.io/nanaimo/static/images/nanaimo.png\n   :alt: A delicious Nanaimo bar\n\n   A delicious Python treat that makes on-target testing sweet and satisfying.\n\nNanaimo is a set of utilities and plugins designed to enable integration of hardware test apparatuses\nwith pytest. This can allow on-target tests to run as part of continuous integration pipelines like\n`Buildkite`_, `Bamboo`_, or `Jenkins`_.\n\n.. figure:: https://thirtytwobits.github.io/nanaimo/static/images/pifarm.jpeg\n   :alt: S32K evaluation boards attached to Raspberry PIs.\n\n   Example of S32K dev boards attached to Raspberry PI CI workers running the `Buildkite`_ agent and using Nanaimo.\n\nNanaimo is designed to enable testing of software-defined, physical components in isolation to\nprovide pre-integration verification of software interfaces and behavioral contracts. It adapts\nasynchronous control and monitoring of these components to fit familiar testing idioms\n(e.g. x-unit testing) using the popular python test framework, `pytest`_.\n\n.. figure:: https://thirtytwobits.github.io/nanaimo/static/images/block.png\n   :alt: Block diagram of Nanaimo's relationship to other components of a typical software build and test pipeline.\n\n   Block diagram of Nanaimo's relationship to other components of a typical software build and test pipeline.\n\nNanaimo is *not* a simulation framework and is not designed to support the complexity of a full hardware-in-the-loop platform.\nInstead it's focused on testing small integrations with a few hardware components and instruments using concepts, syntax,\nand frameworks familiar to software engineers. Examples of these small integrations might include verifying a SPI driver for a\nmicrocontroller or ensuring the upload time for a serial bootloader meets expected Key-Performance-Indicators (KPIs). To do this\nNanaimo abstractions provide async interfaces to hardware either directly using available communication protocols\n(e.g. serial or IP networks) or by invoking a CLI provided by the instrument vendor. Because of this latter use case some\ninstruments will require additional programs be available in a test environment.\n\n.. figure:: https://thirtytwobits.github.io/nanaimo/static/images/example.png\n   :alt: Example scenario using Nanaimo to test an I2C driver for a microcontroller.\n\n   Example scenario using Nanaimo to test an I2C driver for a microcontroller.\n\nThis design is an amalgam of the `TLYF`_ (Test Like You Fly) methodology and the `Swiss cheese`_ model of\nfailure analysis. Specifically; Nanaimo facilitates testing on actual or representative hardware\nfor the first integration of software into a part or subassembly. Traditionally software engineers were\nresponsible only for unit-testing and Software-In-the-Loop (SIL) simulation of their code. Nanaimo encourages\nsoftware engineers to also provide hardware integration tests by enabling Hardware-In-the-Loop\n`continuous-integration \u003chttps://en.wikipedia.org/wiki/Continuous_integration\u003e`_ (HIL-CI, perhaps?).\n\n.. figure:: https://thirtytwobits.github.io/nanaimo/static/images/test_triangle.png\n   :alt: Hierarchy of system testing.\n\n   Hierarchy of system testing. Nanaimo focuses on part and subassembly testing.\n\n.. Note::\n    Nanaimo is named after `Nanaimo bars`_ which are about the best things humans have ever invented.\n\n.. _`Nanaimo bars`: https://en.wikipedia.org/wiki/Nanaimo_bar\n.. _`Buildkite`: https://buildkite.com\n.. _`Bamboo`: https://www.atlassian.com/software/bamboo\n.. _`Jenkins`: https://jenkins.io/\n.. _`pytest`: https://docs.pytest.org/en/latest/\n.. _`TLYF`: https://www.youtube.com/watch?v=0BSaI117ITI\n.. _`Swiss cheese`: https://en.wikipedia.org/wiki/Swiss_cheese_model\n\n\n.. |badge_docs| image:: https://readthedocs.org/projects/nanaimo/badge/?version=latest\n    :alt: Documentation Status\n.. _badge_docs: https://nanaimo.readthedocs.io/en/latest/?badge=latest\n\n.. |badge_build| image:: https://badge.buildkite.com/80558e71a357a16151e4b537bfc19527c9b1ac543975b92ed7.svg\n    :alt: Build status\n.. _badge_build: https://buildkite.com/friends-of-scott/nanaimo-release\n\n.. |badge_github_license| image:: https://img.shields.io/badge/license-MIT-blue.svg\n    :alt: MIT license\n.. _badge_github_license: https://github.com/thirtytwobits/nanaimo/blob/master/LICENSE.rst\n\n.. |badge_pypi_support| image:: https://img.shields.io/pypi/pyversions/nanaimo.svg\n    :alt: Supported Python Versions\n.. _badge_pypi_support: https://pypi.org/project/nanaimo/\n\n.. |badge_pypi_version| image:: https://img.shields.io/pypi/v/nanaimo.svg\n    :alt: Pypi Release Version\n.. _badge_pypi_version: https://pypi.org/project/nanaimo/\n\n.. |badge_sonarcloud_quality| image:: https://sonarcloud.io/api/project_badges/measure?project=thirtytwobits_nanaimo\u0026metric=alert_status\n    :alt: Sonarcloud Quality Gate\n.. _badge_sonarcloud_quality: https://sonarcloud.io/dashboard?id=thirtytwobits_nanaimo\n\n.. |badge_sonarcloud_coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=thirtytwobits_nanaimo\u0026metric=coverage\n    :alt: Sonarcloud coverage\n.. _badge_sonarcloud_coverage: https://sonarcloud.io/dashboard?id=thirtytwobits_nanaimo\n\n.. |badge_sonarcloud_bugs| image:: https://sonarcloud.io/api/project_badges/measure?project=thirtytwobits_nanaimo\u0026metric=bugs\n    :alt: Sonarcloud bugs\n.. _badge_sonarcloud_bugs: https://sonarcloud.io/dashboard?id=thirtytwobits_nanaimo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthirtytwobits%2Fnanaimo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthirtytwobits%2Fnanaimo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthirtytwobits%2Fnanaimo/lists"}