Skip to content

Some small pointers on library development #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions LIBRARY_DEVELOPMENT.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Developing Libraries in the Bundle
==================================

Adafruit CircuitPython libraries are generally installable on a CPython interpreter with `pip` (or other package
managers). The "Blinka" libraries are compatibility layers to fill in missing pieces that are expected from
CircuitPython. Unfortunately, some of these compatibility layers may not work in all environments.

Unless you are working with all of the libaries at the same time, the easiest workflow for development is to fork an
individual library and make your changes there before submitting a PR back to the adafruit repository. If, however, you
want to programmatically modify all libraries in this bundle, it may be more efficient to do development within this
repository.

Code Hygiene
------------

Adafruit libraries are not currently fully typed. If you would like to improve the typing coverage, we suggest
`installing mypy`_. You can then run mypy from the command line or from within your editor / IDE.

.. _installing mypy: https://mypy.readthedocs.io/en/stable/getting_started.html#installing-and-running-mypy
3 changes: 3 additions & 0 deletions LIBRARY_DEVELOPMENT.rst.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-FileCopyrightText: 2022 Dav Clark (@davclark)
#
# SPDX-License-Identifier: Unlicense
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Development
After you clone this repository you must run ``git submodule init``
and then ``git submodule update``.

For developing individual libraries, please see LIBRARY_DEVELOPMENT.rst.

Updating libraries
-------------------
To update the libraries run ``update-submodules.sh``. The script will fetch the
Expand Down