Skip to content

Commit 1d37d3f

Browse files
committed
Merge branch 'main' of https://github.com/adafruit/circuitpython into main
2 parents e2c833a + a2d2d69 commit 1d37d3f

File tree

564 files changed

+13158
-2761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

564 files changed

+13158
-2761
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
test:
17-
runs-on: ubuntu-18.04
17+
runs-on: ubuntu-20.04
1818
steps:
1919
- name: Dump GitHub context
2020
env:
@@ -35,9 +35,10 @@ jobs:
3535
python-version: 3.8
3636
- name: Install deps
3737
run: |
38+
sudo apt-get update
3839
sudo apt-get install -y eatmydata
3940
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
40-
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli
41+
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli mypy
4142
- name: Versions
4243
run: |
4344
gcc --version
@@ -67,8 +68,8 @@ jobs:
6768
- name: mpy Tests
6869
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
6970
working-directory: tests
70-
- name: Stubs
71-
run: make stubs -j2
71+
- name: Build and Validate Stubs
72+
run: make check-stubs -j2
7273
- uses: actions/upload-artifact@v2
7374
with:
7475
name: stubs
@@ -111,12 +112,15 @@ jobs:
111112
with:
112113
name: mpy-cross.static-x64-windows
113114
path: mpy-cross/mpy-cross.static.exe
114-
- name: Upload mpy-cross builds to S3
115+
- name: Upload stubs and mpy-cross builds to S3
115116
run: |
116117
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1
117118
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1
118119
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1
120+
zip -9r circuitpython-stubs.zip circuitpython-stubs
121+
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1
119122
env:
123+
AWS_PAGER: ''
120124
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
121125
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
122126
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
@@ -157,19 +161,21 @@ jobs:
157161
run: |
158162
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-catalina-${{ env.CP_VERSION }} --no-progress --region us-east-1
159163
env:
164+
AWS_PAGER: ''
160165
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
161166
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
162167
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
163168

164169

165170
build-arm:
166-
runs-on: ubuntu-18.04
171+
runs-on: ubuntu-20.04
167172
needs: test
168173
strategy:
169174
fail-fast: false
170175
matrix:
171176
board:
172177
- "8086_commander"
178+
- "ADM_B_NRF52840_1"
173179
- "TG-Watch02A"
174180
- "aloriumtech_evo_m51"
175181
- "aramcon_badge_2019"
@@ -193,6 +199,8 @@ jobs:
193199
- "circuitplayground_express_displayio"
194200
- "clue_nrf52840_express"
195201
- "cp32-m4"
202+
- "cp_sapling_m0"
203+
- "cp_sapling_m0_spiflash"
196204
- "datalore_ip_m4"
197205
- "datum_distance"
198206
- "datum_imu"
@@ -312,7 +320,8 @@ jobs:
312320
- "teensy40"
313321
- "teensy41"
314322
- "teknikio_bluebird"
315-
- "thunderpack"
323+
- "thunderpack_v11"
324+
- "thunderpack_v12"
316325
- "tinkeringtech_scoutmakes_azul"
317326
- "trellis_m4_express"
318327
- "trinket_m0"
@@ -360,12 +369,13 @@ jobs:
360369
- name: Upload to S3
361370
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
362371
env:
372+
AWS_PAGER: ''
363373
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
364374
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
365375
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
366376

367377
build-riscv:
368-
runs-on: ubuntu-18.04
378+
runs-on: ubuntu-20.04
369379
needs: test
370380
strategy:
371381
fail-fast: false
@@ -408,16 +418,18 @@ jobs:
408418
- name: Upload to S3
409419
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
410420
env:
421+
AWS_PAGER: ''
411422
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
412423
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
413424
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
414425
build-xtensa:
415-
runs-on: ubuntu-latest
426+
runs-on: ubuntu-20.04
416427
needs: test
417428
strategy:
418429
fail-fast: false
419430
matrix:
420431
board:
432+
- "adafruit_magtag_2.9_grayscale"
421433
- "adafruit_metro_esp32s2"
422434
- "electroniccats_bastwifi"
423435
- "espressif_kaluga_1"
@@ -501,6 +513,7 @@ jobs:
501513
- name: Upload to S3
502514
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
503515
env:
516+
AWS_PAGER: ''
504517
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
505518
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
506519
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))

.github/workflows/create_website_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
website:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-20.04
1414
steps:
1515
- name: Dump GitHub context
1616
env:

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
pre-commit:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-20.04
1515
steps:
1616
- uses: actions/checkout@v1
1717
- uses: actions/setup-python@v1

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,7 @@
152152
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git
153153
[submodule "ports/esp32s2/esp-idf"]
154154
path = ports/esp32s2/esp-idf
155-
url = https://github.com/espressif/esp-idf.git
155+
url = https://github.com/jepler/esp-idf.git
156+
[submodule "ports/esp32s2/certificates/nina-fw"]
157+
path = ports/esp32s2/certificates/nina-fw
158+
url = https://github.com/adafruit/nina-fw.git

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT
66

77
# Contributing
88
Please note that this project is released with a
9-
[Contributor Code of Conduct](https://github.com/adafruit/circuitpython/blob/main/CODE_OF_CONDUCT.md).
9+
[Contributor Code of Conduct](CODE_OF_CONDUCT.md).
1010
By participating in this project you agree to abide by its terms. Participation
1111
covers any forum used to converse about CircuitPython including unofficial and official spaces. Failure to do
1212
so will result in corrective actions such as time out or ban from the project.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ update-frozen-libraries:
265265
@echo "Updating all frozen libraries to latest tagged version."
266266
cd frozen; for library in *; do cd $$library; ../../tools/git-checkout-latest-tag.sh; cd ..; done
267267

268-
one-of-each: samd21 samd51 esp32s2 litex mimxrt10xx nrf stm
268+
one-of-each: samd21 litex mimxrt10xx nrf stm
269269

270270
samd21:
271271
$(MAKE) -C ports/atmel-samd BOARD=trinket_m0

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ Behavior
114114
finishes or is interrupted. After it is done running, the vm and
115115
hardware is reinitialized. **This means you cannot read state from**
116116
``code.py`` **in the REPL anymore.** CircuitPython's goal for this
117-
change includes reduce confusion about pins and memory being used.
117+
change includes reducing confusion about pins and memory being used.
118118
- After ``code.py`` the REPL can be entered by pressing any key. It no
119119
longer shares state with ``code.py`` so it is a fresh vm.
120120
- Autoreload state will be maintained across reload.
121121
- Adds a safe mode that does not run user code after a hard crash or
122122
brown out. The hope is that this will make it easier to fix code that
123123
causes nasty crashes by making it available through mass storage
124-
after the crash. A reset (the button) is needed after its fixed to
124+
after the crash. A reset (the button) is needed after it's fixed to
125125
get back into normal mode.
126126
- RGB status LED indicating CircuitPython state, and errors through a sequence of colored flashes.
127127
- Re-runs ``code.py`` or other main file after file system writes over USB mass storage. (Disable with

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
"ports/atmel-samd/tools",
173173
"ports/cxd56/mkspk",
174174
"ports/cxd56/spresense-exported-sdk",
175+
"ports/esp32s2/certificates",
175176
"ports/esp32s2/esp-idf",
176177
"ports/esp32s2/peripherals",
177178
"ports/litex/hw",

docs/design_guide.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ SPI Example
421421
"""Widget's one register."""
422422
with self.spi_device as spi:
423423
spi.write(b'0x00')
424-
i2c.readinto(self.buf)
424+
spi.readinto(self.buf)
425425
return self.buf[0]
426426
427427
Use composition
@@ -462,7 +462,7 @@ like properties for state even if it sacrifices a bit of speed.
462462
Avoid allocations in drivers
463463
--------------------------------------------------------------------------------
464464

465-
Although Python doesn't require managing memory, its still a good practice for
465+
Although Python doesn't require managing memory, it's still a good practice for
466466
library writers to think about memory allocations. Avoid them in drivers if
467467
you can because you never know how much something will be called. Fewer
468468
allocations means less time spent cleaning up. So, where you can, prefer
@@ -471,7 +471,7 @@ object with methods that read or write into the buffer instead of creating new
471471
objects. Unified hardware API classes such as `busio.SPI` are design to read and
472472
write to subsections of buffers.
473473

474-
Its ok to allocate an object to return to the user. Just beware of causing more
474+
It's ok to allocate an object to return to the user. Just beware of causing more
475475
than one allocation per call due to internal logic.
476476

477477
**However**, this is a memory tradeoff so do not do it for large or rarely used
@@ -580,4 +580,4 @@ MicroPython compatibility
580580
--------------------------------------------------------------------------------
581581

582582
Keeping compatibility with MicroPython isn't a high priority. It should be done
583-
when its not in conflict with any of the above goals.
583+
when it's not in conflict with any of the above goals.

docs/drivers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Adafruit CircuitPython Library Bundle
1212
We provide a bundle of all our libraries to ease installation of drivers and
1313
their dependencies. The bundle is primarily geared to the Adafruit Express line
1414
of boards which feature a relatively large external flash. With Express boards,
15-
its easy to copy them all onto the filesystem. However, if you don't have
15+
it's easy to copy them all onto the filesystem. However, if you don't have
1616
enough space simply copy things over as they are needed.
1717

1818
- The Adafruit bundles are available on GitHub: <https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases>.

0 commit comments

Comments
 (0)