Skip to content

Commit b709882

Browse files
authored
Merge branch 'master' into pathlib
Signed-off-by: scivision <10931741+scivision@users.noreply.github.com>
2 parents 0ae6340 + 3eaf027 commit b709882

File tree

258 files changed

+6445
-1058
lines changed

Some content is hidden

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

258 files changed

+6445
-1058
lines changed

.github/workflows/build_packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
if: vars.MICROPY_PUBLISH_MIP_INDEX && github.event_name == 'push' && ! github.event.deleted
2424
run: source tools/ci.sh && ci_push_package_index
2525
- name: Upload packages as artifact
26-
uses: actions/upload-artifact@v3
26+
uses: actions/upload-artifact@v4
2727
with:
2828
name: packages-${{ github.sha }}
2929
path: ${{ env.PACKAGE_INDEX_PATH }}

.github/workflows/code_formatting.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check commit message formatting
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: '100'
16+
- uses: actions/setup-python@v4
17+
- name: Check commit message formatting
18+
run: source tools/ci.sh && ci_commit_formatting_run
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Package tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-python@v4
11+
- name: Setup environment
12+
run: source tools/ci.sh && ci_package_tests_setup_micropython
13+
- name: Setup libraries
14+
run: source tools/ci.sh && ci_package_tests_setup_lib
15+
- name: Run tests
16+
run: source tools/ci.sh && ci_package_tests_run

.github/workflows/ruff.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
2-
name: Python code lint with ruff
2+
name: Python code lint and formatting with ruff
33
on: [push, pull_request]
44
jobs:
55
ruff:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v3
9-
- run: pip install --user ruff
10-
- run: ruff --format=github .
8+
- uses: actions/checkout@v4
9+
# Version should be kept in sync with .pre-commit_config.yaml & also micropython
10+
- run: pip install --user ruff==0.11.6
11+
- run: ruff check --output-format=github .
12+
- run: ruff format --diff .

.pre-commit-config.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
repos:
22
- repo: local
33
hooks:
4-
- id: codeformat
5-
name: MicroPython codeformat.py for changed files
6-
entry: tools/codeformat.py -v -f
4+
- id: verifygitlog
5+
name: MicroPython git commit message format checker
6+
entry: tools/verifygitlog.py --check-file --ignore-rebase
77
language: python
8+
verbose: true
9+
stages: [commit-msg]
810
- repo: https://github.com/charliermarsh/ruff-pre-commit
9-
rev: v0.0.280
11+
# Version should be kept in sync with .github/workflows/ruff.yml & also micropython
12+
rev: v0.11.6
1013
hooks:
1114
- id: ruff
15+
id: ruff-format

CONTRIBUTING.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,20 @@ Pages](https://docs.github.com/en/pages):
102102
"truthy" value).
103103
5. The settings for GitHub Actions and GitHub Pages features should not need to
104104
be changed from the repository defaults, unless you've explicitly disabled
105-
them.
105+
Actions or Pages in your fork.
106106

107107
The next time you push commits to a branch in your fork, GitHub Actions will run
108108
an additional step in the "Build All Packages" workflow named "Publish Packages
109-
for branch".
109+
for branch". This step runs in *your fork*, but if you open a pull request then
110+
this workflow is not shown in the Pull Request's "Checks". These run in the
111+
upstream repository. Navigate to your fork's Actions tab in order to see
112+
the additional "Publish Packages for branch" step.
110113

111114
Anyone can then install these packages as described under [Installing packages
112-
from forks](README.md#installing-packages-from-forks). The exact commands are also
113-
quoted in the GitHub Actions log for the "Publish Packages for branch" step.
115+
from forks](README.md#installing-packages-from-forks).
116+
117+
The exact command is also quoted in the GitHub Actions log in your fork's
118+
Actions for the "Publish Packages for branch" step of "Build All Packages".
114119

115120
#### Opting Back Out
116121

micropython/aioespnow/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A supplementary module which extends the micropython `espnow` module to provide
44
`asyncio` support.
55

66
- Asyncio support is available on all ESP32 targets as well as those ESP8266
7-
boards which include the `uasyncio` module (ie. ESP8266 devices with at least
7+
boards which include the `asyncio` module (ie. ESP8266 devices with at least
88
2MB flash storage).
99

1010
## API reference
@@ -52,10 +52,10 @@ A small async server example::
5252
```python
5353
import network
5454
import aioespnow
55-
import uasyncio as asyncio
55+
import asyncio
5656

5757
# A WLAN interface must be active to send()/recv()
58-
network.WLAN(network.STA_IF).active(True)
58+
network.WLAN(network.WLAN.IF_STA).active(True)
5959

6060
e = aioespnow.AIOESPNow() # Returns AIOESPNow enhanced with async support
6161
e.active(True)

micropython/aioespnow/aioespnow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# aioespnow module for MicroPython on ESP32 and ESP8266
22
# MIT license; Copyright (c) 2022 Glenn Moloney @glenn20
33

4-
import uasyncio as asyncio
4+
import asyncio
55
import espnow
66

77

8-
# Modelled on the uasyncio.Stream class (extmod/stream/stream.py)
9-
# NOTE: Relies on internal implementation of uasyncio.core (_io_queue)
8+
# Modelled on the asyncio.Stream class (extmod/asyncio/stream.py)
9+
# NOTE: Relies on internal implementation of asyncio.core (_io_queue)
1010
class AIOESPNow(espnow.ESPNow):
1111
# Read one ESPNow message
1212
async def arecv(self):

micropython/aiorepl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To use this library, you need to import the library and then start the REPL task
2121
For example, in main.py:
2222

2323
```py
24-
import uasyncio as asyncio
24+
import asyncio
2525
import aiorepl
2626

2727
async def demo():

0 commit comments

Comments
 (0)