Git Product home page Git Product logo

circuitpython_community_bundle's Introduction

CircuitPython Community Library Bundle

Doc Status Discord

Blinka Community

This repo bundles a bunch of useful CircuitPython libraries into an easy to download zip file. CircuitPython boards can ship with the contents of the zip to make it easy to provide a lot of libraries by default.

License

Each included library has its own license that must allow for redistribution. To save space, license text is not included in the bundle. However, a link to each individual repository is which should provide source code access and license information.

Use

To use the bundle download the zip (not source zip) from the latest release, unzip it and copy over the subfolders, such as lib, into the root of your CircuitPython device. Make sure to indicate that it should be merged with the existing folder when it exists.

Development

After you clone this repository you must run git submodule init on update also do git submodule update.

Updating libraries

To update the libraries run update-submodules.sh. The script will fetch the latest code and update to the newest tag (not master).

Adding a library

Determine the best location within libraries for the new library and then run:

git submodule add <git url> libraries/<target directory>

The target directory should omit any MicroPython or CircuitPython specific prefixes such as CircuitPython_ to simplify the listing.

You should make sure that the git url has the format https://github.com/{:user}/{:repo}.git, such as https://github.com/tannewt/CircuitPython_Example.git. Other forms may interfere with adabot scripts (see adafruit/adabot#145 for details).

The repository must have a tag, as the bundle release process pulls the latest tag, usually matching a release of your library. The tag must follow the Semver format (such as 1.2.3).

The circuitpython_community_library_list.md page is manually updated. Please add your library to the list with the relevant links to the repository, pypi page and documentation if available.

Removing a library

Only do this if you are replacing the module with an equivalent:

git submodule deinit libraries/<target directory>
git rm libraries/<target directory>

Building the bundle

To build this bundle locally you'll need to install the circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>_ package.

python3 -m venv .env
source .env/bin/activate
pip install circuitpython-build-tools

Once installed, make sure you are in the virtual environment:

source .env/bin/activate

Then run the build:

./build.sh

circuitpython_community_bundle's People

Contributors

2bndy5 avatar adafruit-adabot avatar bablokb avatar benevpi avatar brentru avatar cdarius avatar cedargrovestudios avatar cognitivegears avatar dhalbert avatar foamyguy avatar fourstix avatar furbrain avatar gamblor21 avatar gbeland avatar hierophect avatar ilikecake avatar jamesbowman avatar jepler avatar jposada202020 avatar kattni avatar ladyada avatar lesamouraipourpre avatar neradoc avatar ntavish avatar s-light avatar sommersoft avatar tannewt avatar tekktrik avatar todbot avatar tristanwarder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

circuitpython_community_bundle's Issues

circup --verbose update --all fails to fetch the proper version of CircuitPython_Community_Bundle

Not sure if this is to be reported as a circup or a CircuitPython_Community_Bundle issue.
MacOS Sonoma, Metro express M0, homebrew, circup and latest CircuitPython 8.2.6.
Command: circup --verbose update --all

From the release notes at https://github.com/adafruit/CircuitPython_Community_Bundle/releases/tag/20231004 it should fetch the 8.x bundle instead of the 7.x.

`
....
10/04/2023 19:07:23 INFO: Checking library updates for adafruit/CircuitPython_Community_Bundle.
10/04/2023 19:07:23 INFO: Requesting redirect information: https://github.com/adafruit/CircuitPython_Community_Bundle/releases/latest
10/04/2023 19:07:23 INFO: Tag: '20231004'
10/04/2023 19:07:23 INFO: New version available (20231004).
Downloading latest version for adafruit/CircuitPython_Community_Bundle.
10/04/2023 19:07:23 INFO: Downloading bundle: https://github.com/adafruit/CircuitPython_Community_Bundle/releases/download/20231004/circuitpython-community-bundle-py-20231004.zip

10/04/2023 19:07:24 INFO: Saved to /Users/REDACTED/Library/Application Support/circup/circuitpython-community-bundle-py.zip
10/04/2023 19:07:24 INFO: Downloading bundle: https://github.com/adafruit/CircuitPython_Community_Bundle/releases/download/20231004/circuitpython-community-bundle-7.x-mpy-20231004.zip
10/04/2023 19:07:25 WARNING: Unable to connect to https://github.com/adafruit/CircuitPython_Community_Bundle/releases/download/20231004/circuitpython-community-bundle-7.x-mpy-20231004.zip
There was a problem downloading the bundle. Please try again in a moment.
10/04/2023 19:07:25 ERROR: 404 Client Error: Not Found for url: https://github.com/adafruit/CircuitPython_Community_Bundle/releases/download/20231004/circuitpython-community-bundle-7.x-mpy-20231004.zip
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/circup/init.py", line 483, in ensure_latest_bundle
get_bundle(bundle, tag)
File "/opt/homebrew/lib/python3.11/site-packages/circup/init.py", line 702, in get_bundle
r.raise_for_status()
File "/opt/homebrew/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://github.com/adafruit/CircuitPython_Community_Bundle/releases/download/20231004/circuitpython-community-bundle-7.x-mpy-20231004.zip

`

circup-log.txt

Fix Bundling of Package Folders

Since switching circuitpython-build-tools to use a prefix argument to determine package folder names, this bundle has excluded packaged libraries. This was identified in #26.

I'm almost finished with a change to circuitpython-build-tools that will fix this. Once that is finished, travis.yml will need to be updated to include the INA3221, DotStar_FeatherWing, and nonblocking_timer packages:

# Note: if a packaged library is not being included in the bundle, add the folder
# name to the 'package_folder_prefix' argument list below
script: circuitpython-build-bundles --filename_prefix circuitpython-community-bundle --library_location libraries --library_depth 2 --package_folder_prefix "barbudor_ina3221, dotstar_featherwing, nonblocking_timer"

PaletteSlice not visible to circup as valid library

Just noticed that the submodule and file path for the recently added PaletteSlice helper library are in camelcase rather than all lowercase. What's the process to remove the new library and resubmit correctly -- or can it be fixed in place?

Thanks

Chime Library was moved to a newly created folder rather than libraries/helpers

Somewhere in the process to submit the Chime library to the bundle, the target folder was misspelled and a folder named liibraries/helpers was created. I attempted to move the Chime library folder into the libraries/helpers folder, but apparently didn't have the permissions to delete the errant liibraries/helpers folder. I'll need some help, I guess.

Packaging problems

As diagnosed/solved on discord earlier today (you can thank my rf"..." later ๐Ÿ˜‰)

With the current configuration of actions, if the "compilation" to .mpy fails, the zip is not generated and circup will get broken.

On this very situation it was due to me using a feature that mpy-cross does not support (raw fstring), which caused the process to error out. However i wouldnt be surprised if a fail somewhere else in the pipeline also causes this kind of problem.

Probably the easier and best solution is to do some fallback logic as in:

try:
    latest_zip = run_pipeline()
except:
    latest_zip = previous_one

But since i have no idea about GHA (nor perms to do anything) i'm simply noting this so it doesnt get forgotten far in the chat's history

HC-SR04 not working with 7.x

Hi,

The hcsr04 sonar sensor, and the RCWL-1601 (lower voltage compatible sonar sensor) - does not work with the 7.x versions of CircuitPython, only if you downgrade the chip (tried with gemma m0 and itsy bitsy m0) - 6.x version will the sensors work again.

6.3.0.uf2, and use the 6.x version of adafruit_hcsr04.mpy

Thank you!

BetterPad: An easy-to-use wrapper over GamePadShift

GamePadShift is an essential component of some Adafruit boards (read: PyGamer), but is not very... beginner-friendly. BetterPad aims to fix that. It's a small wrapper over GamePadShift that makes it far easier to use. It provides one class, BetterPad. This class takes the same parameters as a GamePadShift class, and has one function: getPressed. This function returns a dictionary in this format: {"a": True, "b": False, ...} where the value of each key corresponds to the state of the button it represents. You can also pass a dictionary as the buttons parameter to the constructor, for different gamepads. See the attached file for the source.
betterpad.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.