Giter Club home page Giter Club logo

Comments (7)

ladyada avatar ladyada commented on July 21, 2024

i think 'blinka' is a fine project name because its overall neutral, and doesn't mean/stand for anything. is that your q?

from adafruit_blinka.

cefn avatar cefn commented on July 21, 2024

OK, so any packages specific to the port will be rooted at blinka.x.y.

It would make sense to migrate stuff like https://github.com/cefn/Adafruit_Micropython_Blinka/blob/master/python/board/feather_huzzah.py under blinka/feather_huzzah/board/init.py so that all feather_huzzah-specific stuff can be kept in one (removable/includable) place.

from adafruit_blinka.

ladyada avatar ladyada commented on July 21, 2024

OK :) whatever makes you feel good about the structure! esp/pyb are fairly fast chips, so they can deal with layers of abstraction

from adafruit_blinka.

tannewt avatar tannewt commented on July 21, 2024

Having a top level blinka package won't affect the ability to import board directly, right? If we're forced to have a top level I'd be tempted to introduce a circuitpython package and having everything move under it. Our existing top levels shouldn't conflict with anything now though so I don't think its required.

I want to ensure that our imports we describe in learn guides work as documented after the blinka library is installed.

from adafruit_blinka.

cefn avatar cefn commented on July 21, 2024

Main intent is consistency esp. with other adafruit projects so I am not confusing other adopters/contributors, and future maintainability of bundles targeting different platforms.

In conclusion based on the cookiecutter approach and given the naming choice I should have a python path rooted at /blinka so there will be a /blinka/blinka/init.py to place wrapper-specific stuff imported as blinka, and /blinka/digitalio.py would be imported as digitalio

Then all stuff for a specific board would be in the repo at /blinka/blinka/board/NAME/*.py, imported at blinka.board.name. This should be a package not a module so that hardware-specific elements can be selectively included to save on RAM/flash storage (e.g. if you only trigger the platform-introspection logic of digitalio, then you won't have loaded all the platform-specific elements for bitbangio).

Alongside /blinka, I can have separate files and folders for documentation, integration testing and other stuff which isn't intended to be part of the distribution ending up on boards.

Thanks. It's pretty useful to get it right now, so that there isn't a lot of rework later on. Also means I can confidently raise a PR soon without corrupting the main repo with wrong-headed paths.

from adafruit_blinka.

cefn avatar cefn commented on July 21, 2024

@tannewt the blinka package is just a place to put stuff which is imported by the blinka-specific implementations of e.g. board or digitalio which indeed should be addressable exactly as if they were built-in packages on a board running a CircuitPython image. Does that answer your q?

from adafruit_blinka.

tannewt avatar tannewt commented on July 21, 2024

Yup! Works for me. Thanks!

from adafruit_blinka.

Related Issues (20)

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.