Skip to content

Commit

Permalink
Merge branch 'update_micropython_v1.20'
Browse files Browse the repository at this point in the history
  • Loading branch information
amirgon committed Jun 18, 2023
2 parents b9fae5f + fb095f2 commit 3f25a76
Show file tree
Hide file tree
Showing 1,587 changed files with 43,538 additions and 40,821 deletions.
5 changes: 4 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#all: Reformat remaining C code that doesn't have a space after a comma.
# top: Update Python formatting to black "2023 stable style".
8b2748269244304854b3462cb8902952b4dcb892

# all: Reformat remaining C code that doesn't have a space after a comma.
5b700b0af90591d6b1a2c087bb8de6b7f1bfdd2d

# ports: Reformat more C and Python source code.
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ assignees: ''

---

* Remove all placeholder text below before submitting.

* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, please see the MicroPython Forum -- https://forum.micropython.org/
* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, or any sort of "how do I?" requests, please use the Discussions tab or raise a documentation request instead.

* In your issue, please include a clear and concise description of what the bug is, the expected output, and how to replicate it.

Expand All @@ -23,3 +21,5 @@ assignees: ''
- firmware file name
- git commit hash and port/board
- version information shown in the REPL (hit Ctrl-B to see the startup message)

* Remove all placeholder text above before submitting.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: MicroPython Forum
url: https://forum.micropython.org/
- name: MicroPython GitHub Discussions
url: https://github.com/orgs/micropython/discussions
about: Community discussion about all things MicroPython. This is the best place to start if you have questions about using MicroPython or getting started with MicroPython development.
- name: MicroPython Documentation
url: https://docs.micropython.org/
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ assignees: ''

---

* Remove all placeholder text below before submitting.

* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, please see the MicroPython Forum -- https://forum.micropython.org/
* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, or any sort of "how do I?" requests, please use the Discussions tab instead.

* Describe what was missing from the documentation and/or what was incorrect/incomplete.

* If possible, please link to the relevant page on https://docs.micropython.org/

* Remove all placeholder text above before submitting.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ assignees: ''

---

* Remove all placeholder text below before submitting.

* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, please see the MicroPython Forum -- https://forum.micropython.org/
* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, or any sort of "how do I?" requests, please use the Discussions tab or raise a documentation request instead.

* Describe the feature you'd like to see added to MicroPython. In particular, what does this feature enable and why is it useful. MicroPython aims to strike a balance between functionality and code size, so please consider whether this feature can be optionally enabled and whether it can be provided in other ways (e.g. pure-Python library).

Expand All @@ -22,3 +20,5 @@ assignees: ''
* For drivers (e.g. for external hardware), please link to datasheets and/or existing drivers from other sources.

* Who do you expect will implement the feature you are requesting? Would you be willing to sponsor this work?

* Remove all placeholder text above before submitting.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ assignees: ''

---

* Remove all placeholder text before submitting the new issue.

* If you need to raise this issue privately with the MicroPython team, please email [email protected] instead.

* Include a clear and concise description of what the security issue is.

* What does this issue allow an attacker to do?

* Remove all placeholder text above before submitting.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
105 changes: 105 additions & 0 deletions .github/workflows/code_size_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Code size comment

on:
workflow_run:
workflows: [Check code size]
types: [completed]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
comment:
runs-on: ubuntu-20.04
steps:
- name: 'Download artifact'
id: download-artifact
uses: actions/github-script@v6
with:
result-encoding: string
script: |
const fs = require('fs');
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
const matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "code-size-report"
});
if (matchArtifact.length === 0) {
console.log('no matching artifact found');
console.log('result: "skip"');
return 'skip';
}
const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact[0].id,
archive_format: 'zip',
});
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/code-size-report.zip`, Buffer.from(download.data));
console.log('artifact downloaded to `code-size-report.zip`');
console.log('result: "ok"');
return 'ok';
- name: 'Unzip artifact'
if: steps.download-artifact.outputs.result == 'ok'
run: unzip code-size-report.zip
- name: Post comment to pull request
if: steps.download-artifact.outputs.result == 'ok'
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const fs = require('fs');
const prNumber = Number(fs.readFileSync('pr_number'));
const codeSizeReport = `Code size report:
\`\`\`
${fs.readFileSync('diff')}
\`\`\`
`;
const comments = await github.paginate(
github.rest.issues.listComments,
{
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
}
);
comments.reverse();
const previousComment = comments.find(comment =>
comment.user.login === 'github-actions[bot]'
)
// if github-actions[bot] already made a comment, update it,
// otherwise create a new comment.
if (previousComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: previousComment.id,
body: codeSizeReport,
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: codeSizeReport,
});
}
9 changes: 7 additions & 2 deletions .github/workflows/ports_esp32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@ on:
- 'tools/**'
- 'py/**'
- 'extmod/**'
- 'shared/**'
- 'lib/**'
- 'drivers/**'
- 'ports/esp32/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_idf402:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Initialize lv_bindings submodule
run: git submodule update --init --recursive lib/lv_bindings
- name: Install packages
Expand All @@ -27,7 +32,7 @@ jobs:
build_idf44:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Initialize lv_bindings submodule
run: git submodule update --init --recursive lib/lv_bindings
- name: Install packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unix_port.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
- name: Initialize lv_bindings submodule
run: git submodule update --init --recursive lib/lv_bindings
- name: Update submodules
run: make -C ports/unix VARIANT=dev DEBUG=1 submodules
run: make -C ports/unix DEBUG=1 submodules
- name: Build mpy-cross
run: make -j $(nproc) -C mpy-cross
- name: Build the unix port
run: make -j $(nproc) -C ports/unix VARIANT=dev DEBUG=1
run: make -j $(nproc) -C ports/unix DEBUG=1
- name: Run tests
run: |
export XDG_RUNTIME_DIR=/tmp
Expand Down
20 changes: 10 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,31 @@ Session.vim
tags
TAGS

# Build directories
######################
# This .gitignore file is intended to be minimal.
#
# If you find that you need additional rules, such as IDE temporary
# files, please do so either via a global .gitignore file (registered
# with core.excludesFile), or by adding private repository-specific
# rules to .git/info/exclude. See https://git-scm.com/docs/gitignore
# for more information.

# Build directories
build/
build-*/
docs/genrst/

# Test failure outputs
######################
tests/results/*

# Python cache files
######################
__pycache__/
*.pyc

# Customized Makefile/project overrides
######################
GNUmakefile
user.props
ports/javascript/node_modules
.vscode/

# Generated rst files
######################
genrst/

# MacOS desktop metadata files
######################
.DS_Store
8 changes: 7 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[submodule "lib/stm32lib"]
path = lib/stm32lib
url = https://github.com/micropython/stm32lib
branch = work-F0-1.9.0+F4-1.16.0+F7-1.7.0+G4-1.3.0+H7-1.6.0+L0-1.11.2+L4-1.17.0+WB-1.10.0+WL-1.1.0
branch = work-F0-1.9.0+F4-1.16.0+F7-1.7.0+G0-1.5.1+G4-1.3.0+H7-1.6.0+L0-1.11.2+L1-1.10.3+L4-1.17.0+WB-1.10.0+WL-1.1.0
[submodule "lib/nrfx"]
path = lib/nrfx
url = https://github.com/NordicSemiconductor/nrfx.git
Expand Down Expand Up @@ -53,3 +53,9 @@
url = https://github.com/andrewleech/wiznet_ioLibrary_Driver.git
# Requires https://github.com/Wiznet/ioLibrary_Driver/pull/120
# url = https://github.com/Wiznet/ioLibrary_Driver.git
[submodule "lib/cyw43-driver"]
path = lib/cyw43-driver
url = https://github.com/georgerobotics/cyw43-driver.git
[submodule "lib/micropython-lib"]
path = lib/micropython-lib
url = https://github.com/micropython/micropython-lib.git
8 changes: 4 additions & 4 deletions .gitpod
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ ports:
onOpen: ignore
tasks:
- init: |
make -C ports/unix VARIANT=dev DEBUG=1 submodules
make -j $(nproc) -C mpy-cross VARIANT=dev DEBUG=1
make -j $(nproc) -C ports/unix VARIANT=dev DEBUG=1
make -C ports/unix DEBUG=1 submodules
make -j $(nproc) -C mpy-cross DEBUG=1
make -j $(nproc) -C ports/unix DEBUG=1
# source tools/ci.sh && ci_esp32_idf44_setup
# source tools/ci.sh && ci_esp32_build
command: |
xrandr --fb 500x500 # Fix resolution for LVGL screens which are smaller
ports/unix/micropython-dev -i lib/lv_bindings/examples/advanced_demo.py
ports/unix/build-standard/micropython -i lib/lv_bindings/examples/advanced_demo.py
vscode:
extensions:
- ms-vscode.cpptools
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: local
hooks:
- id: codeformat
name: MicroPython codeformat.py for changed files
entry: tools/codeformat.py -v -f
language: python
- id: verifygitlog
name: MicroPython git commit message format checker
entry: tools/verifygitlog.py --check-file --ignore-rebase
language: python
verbose: true
stages: [commit-msg]
Loading

0 comments on commit 3f25a76

Please sign in to comment.