https://github.com/brianpugh/micropython-libs

https://github.com/brianpugh/micropython-libs

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary

Keywords from Contributors

serializer interactive archival projection generic sequences observability autograding hacking shellcodes
Last synced: 11 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: BrianPugh
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Size: 2.05 MB
Statistics
  • Stars: 7
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created almost 4 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.rst

|Python compat| |GHA tests| |Codecov report| |readthedocs|

.. inclusion-marker-do-not-remove

micropython-libs
================

This repository contains a collection of single-file libraries intended for
a micropython target.

All micropython libraries are located in the ``lib/`` folder of this repo.

`See docs here. `_

Generic Libraries
=================
These libraries generally don't depend on specific hardware and primarily contain just
software algorithms/abstractions.

* ``configstore`` - Persistent auto-write key-value store.

* ``controlhal`` - Abstractions for controlling a dynamic system. Easy PID control loops.

* ``debouncedpin`` - Debounced ``Pin`` drop-in that automatically handles switch debouncing.
  Can also simultaneously drive an LED using the same pin with ``DebouncedLedPin``.

* ``interp1d`` - One dimensional interpolation functions.

* ``oversample`` - Oversample a sensor to improve the SNR and measurement resolution
  at the cost of increased CPU utilization and reduced throughput.

* ``pid`` - PID controller. Not recommended for fast processes (not for quadcopters). Requires: ``controlhal``.

* ``pidautotune`` - Autotune for PID controllers. Requires ``controlhal``.

* ``ringbuffer`` - RingBuffer with builtin statistical methods.

* ``uprofiler`` - Code profiling tools.

Hardware Drivers
================
These libraries contain drivers for specific hardware.
Whenever possible, these drivers abide by the standards in `docs/hardware`_.

* ``max6675`` - MAX6675 Cold-Junction-Compensated K-Thermocouple-to-Digital Converter (0°C to +1024°C).

* ``in13`` - `IN13 Nixie Tube Indicator with I2C Driver board. `_

Installation
============
We recommend using the `Belay Package Manager`_ for installing desired libraries.
To install Belay on your computer, run:

.. code-block:: bash

   pip install belay

Then, define your project name and dependencies in your project's ``pyproject.toml`` file. Belay assumes you have a python package in your project with the same name as ``tool.belay.name``:

.. code-block:: toml

   [tool.belay]
   name = "my_project_name"

   [tool.belay.dependencies]
   ringbuffer = "https://github.com/BrianPugh/micropython-libs/blob/main/lib/ringbuffer.py"

   [tool.pytest.ini_options]
   pythonpath = ".belay/dependencies/main"

Then, to actually download the dependencies (and update them if already downloaded), run the following in your project's root directory:

.. code-block:: bash

   belay update

Finally, to actually get the code onto your device, run:

.. code-block:: bash

   belay install [DEVICE-PORT]

You can specify other argument to ``belay install``, including cross-compiling the python code.

Repo Folder Structure
=====================

* ``lib/`` - Micropython modules.

*  ``tests/`` - Tests for micropython modules

*  ``demos/`` - For code that primarily interacts with hardware, these serve as minimal scripts for demonstrating their use.

*  ``tools/`` - Auxiliary scripts that aid in project maintenance or experiments to drive design decisions.


.. _Belay Package Manager: https://belay.readthedocs.io/en/latest/Package%20Manager.html
.. |GHA tests| image:: https://github.com/BrianPugh/micropython-libs/workflows/tests/badge.svg
   :target: https://github.com/BrianPugh/micropython-libs/actions?query=workflow%3Atests
   :alt: GHA Status
.. |Codecov report| image:: https://codecov.io/github/BrianPugh/micropython-libs/coverage.svg?branch=main
   :target: https://codecov.io/github/BrianPugh/micropython-libs?branch=main
   :alt: Coverage
.. |Python compat| image:: https://img.shields.io/badge/>=python-3.8-blue.svg
.. _docs/hardware: docs/hardware_spec.rst
.. |readthedocs| image:: https://readthedocs.org/projects/micropython-libs-brianpugh/badge/?version=latest
        :target: https://micropython-libs-brianpugh.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status

Owner

  • Name: Brian Pugh
  • Login: BrianPugh
  • Kind: user
  • Location: Washington D.C.

Deep Learning Scientist and blockchain enthusiast

GitHub Events

Total
  • Issues event: 1
  • Watch event: 1
  • Delete event: 1
  • Issue comment event: 5
  • Push event: 3
  • Pull request event: 4
  • Fork event: 1
  • Create event: 1
Last Year
  • Issues event: 1
  • Watch event: 1
  • Delete event: 1
  • Issue comment event: 5
  • Push event: 3
  • Pull request event: 4
  • Fork event: 1
  • Create event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 129
  • Total Committers: 3
  • Avg Commits per committer: 43.0
  • Development Distribution Score (DDS): 0.016
Past Year
  • Commits: 3
  • Committers: 2
  • Avg Commits per committer: 1.5
  • Development Distribution Score (DDS): 0.333
Top Committers
Name Email Commits
Brian Pugh b****7@g****m 127
dependabot[bot] 4****] 1
Lucas Viñals l****s@g****m 1

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 13
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 hour
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.46
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 11 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • jet438 (1)
Pull Request Authors
  • BrianPugh (13)
  • dependabot[bot] (2)
  • lucasvinals (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (2)

Dependencies

pyproject.toml pypi
  • belay ^0.10.0
  • python ^3.10
.github/workflows/tests.yaml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • andstor/file-existence-action v1 composite
  • codecov/codecov-action v2 composite
  • pre-commit/action v2.0.3 composite
  • snok/install-poetry v1 composite
poetry.lock pypi
  • 104 dependencies