Skip to content
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

Rebasing to the latest version of micropython/master #119

Open
wants to merge 3,533 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3533 commits
Select commit Hold shift + click to select a range
e1fa14c
Debug output
pulkin Sep 12, 2019
9f29a37
Swap folder
pulkin Sep 12, 2019
1d9f94f
Download attempt
pulkin Sep 12, 2019
1d7cbed
Fix the job
pulkin Sep 12, 2019
c86b98d
Attempt release notes template
pulkin Sep 12, 2019
8641219
Attempt inline message
pulkin Sep 12, 2019
3638441
Fix multiline text
pulkin Sep 12, 2019
43f2735
Remove debug outputs
pulkin Sep 12, 2019
9514d1f
Sort binaries before publishing
pulkin Sep 12, 2019
9758a31
Update build scenario and checkout submodules separately
pulkin Sep 14, 2019
1d951c3
Debug outputs
pulkin Sep 14, 2019
b7aeb86
Try i386 for ESP
pulkin Sep 14, 2019
3942c24
More debug output
pulkin Sep 14, 2019
aa1b59b
Even more debug output
pulkin Sep 14, 2019
0e54e39
Move PATH setup to the main task
pulkin Sep 14, 2019
a6da984
Install pyserial in Azure
pulkin Sep 14, 2019
93b4679
Try switching to python2 for esptool
pulkin Sep 14, 2019
4e561c1
Update build instructions to the latest mp
pulkin Sep 14, 2019
93252ab
Custom submodule checkout
pulkin Sep 14, 2019
5700c03
Add recursive for gprs_a9
pulkin Sep 16, 2019
87c5602
Update README
pulkin Sep 16, 2019
87f326c
Collect esp8266 build
pulkin Sep 16, 2019
3538da0
Debug output
pulkin Sep 16, 2019
dad96d3
Publish esp8266
pulkin Sep 16, 2019
485a62b
Fix cleanup script
pulkin Sep 16, 2019
5449a67
Fix firmware name
pulkin Sep 16, 2019
caeb4b7
Propagate changes from travis to azure
pulkin Sep 19, 2019
c893c95
Fix typo in script
pulkin Sep 19, 2019
fdbcad8
Use proper IOError in sockets
pulkin Oct 27, 2019
5314ae4
Fix sockets
pulkin Oct 27, 2019
68c544a
Try previous azure image
pulkin Oct 27, 2019
de8d33c
Try updating first
pulkin Oct 27, 2019
db141d4
Revert to latest build
pulkin Oct 27, 2019
a306553
Update port status in README
pulkin Oct 27, 2019
dcfff56
Fix md list
pulkin Oct 27, 2019
5107100
Switch to conventional socket.getaddrinfo return value
pulkin Oct 27, 2019
0fbe8a7
Update README TODO
pulkin Oct 27, 2019
10761a3
Update README TODO
pulkin Oct 27, 2019
2a84212
Removed cellular exception classes for simplicity
pulkin Oct 28, 2019
4c044b7
Move SMS-related stuff to SMS class
pulkin Oct 29, 2019
ee509f6
Update test script to the recent API
pulkin Oct 29, 2019
871a9d2
Remove SMS section
pulkin Oct 28, 2019
9e7fc6b
Restructured README
pulkin Oct 29, 2019
dcbb086
Closes #12
pulkin Oct 29, 2019
9eb6721
Closes #14
pulkin Oct 29, 2019
9ef939e
Simplify wait until logic, fix exception handling and add flight mode
pulkin Oct 30, 2019
9a008cc
Close #17. Update API and tests.
pulkin Oct 31, 2019
8f917c0
Add network bands and reset. Small adjustments
pulkin Oct 31, 2019
7a43000
Move API section
pulkin Oct 31, 2019
66af94a
Simplify GPRS setting and extend timeout
pulkin Nov 2, 2019
d8d13b7
Fix typo
pulkin Nov 2, 2019
6452581
Add an option to list networks
pulkin Nov 2, 2019
bfc5207
Update tests
pulkin Nov 2, 2019
c2a05a7
Fix defaults
pulkin Nov 2, 2019
e982b2e
Update docs
pulkin Nov 2, 2019
bf87663
Add register and rename the scan function
pulkin Nov 3, 2019
70b6449
A proper reset, remove context attachment, update test
pulkin Nov 3, 2019
b878c87
Add operator name and reorder the output in operator tuples
pulkin Nov 3, 2019
fc9d664
Update docs
pulkin Nov 3, 2019
a5458a6
Fix pipelines
pulkin Nov 3, 2019
9dc62de
Add incoming and missing call numbers
pulkin Nov 3, 2019
35a5cb0
Add a function to poll base stations
pulkin Nov 4, 2019
ae2293b
Remove "raises" from README
pulkin Nov 4, 2019
731f501
Set GPIO defaults to output
pulkin Nov 9, 2019
a9509d1
Add software SPI
pulkin Nov 9, 2019
7f1f471
Mention SPI in README
pulkin Nov 9, 2019
7d8c4ee
Shorten api ref
pulkin Nov 9, 2019
3210158
Shorten API ref
pulkin Nov 10, 2019
5f5b2db
Add all-bands constant
pulkin Nov 10, 2019
1f8e3b4
Add a docstring
pulkin Nov 10, 2019
c8a6f66
Cleanup machine_pin.c
pulkin Nov 10, 2019
1a1d72a
Speed up gpio with an atomic pin type
pulkin Nov 10, 2019
2ffc160
Add file.tell
pulkin Nov 10, 2019
a97a2b7
Extract the header file from framebuffer
pulkin Nov 26, 2019
620dec8
Extract pin initialization
pulkin Nov 26, 2019
7511394
Add ST7735 display driver
pulkin Nov 26, 2019
7b78c69
Add ST7735 display docs
pulkin Nov 26, 2019
125e95a
Add agps providers
pulkin Nov 27, 2019
8c8b008
Add agps to README
pulkin Nov 27, 2019
b5dd329
Closes #4
pulkin Nov 29, 2019
83dc80c
Add module pinout to README
pulkin Nov 29, 2019
370cd1b
Add poll period constants
pulkin Nov 29, 2019
6d02705
Port dialing
pulkin Dec 3, 2019
02405ac
Remove access token
pulkin Dec 5, 2019
00e3083
Fix not being able to receive SMS right after the module starts
pulkin Dec 8, 2019
7aa42b6
Cleanup ptr cast warning
pulkin Dec 14, 2019
1c2bbd0
Fix missing header
pulkin Dec 14, 2019
bf2e785
Fix another missing import
pulkin Dec 14, 2019
c5bc5a3
Rename UartInit -> mp_hal_pyrepl_uart_init
pulkin Dec 14, 2019
3b0b4c1
Remove unused variable
pulkin Dec 14, 2019
cdcc660
Define mp_raise_CellularError before using it
pulkin Dec 14, 2019
1ab4e6d
Cleanup build warnings
pulkin Dec 14, 2019
ca91075
Cleanup build warnings (2)
pulkin Dec 14, 2019
00eb113
Add a 5s delay in tests
pulkin Dec 14, 2019
0792eb9
Fix issue when not being able to remove directories
pulkin Dec 17, 2019
aa04bca
Fixed filesystem bug and annotated functions
pulkin Dec 18, 2019
e4c59d4
Add mounting and VFS support
pulkin Dec 22, 2019
fcb20d8
Revamp filesystem to support custom mount points, block devices, etc
pulkin Dec 25, 2019
2a68bd7
Print warnings whenever init fails
pulkin Dec 25, 2019
86efe89
Small changes: tests, indents
pulkin Dec 25, 2019
422139b
Remove agps
pulkin Dec 26, 2019
d044f0c
Add blink in the example
pulkin Dec 26, 2019
107593b
Fix #21
pulkin Dec 28, 2019
eaccc7d
Add proper error codes for fs routines
pulkin Dec 28, 2019
44b7c7b
Close #18
pulkin Dec 28, 2019
c6403f3
README update
pulkin Dec 28, 2019
c8a0f12
Fix text rendering
pulkin Dec 29, 2019
2369f7e
Add os.dupterm (temporary impl)
pulkin Dec 29, 2019
384a3bd
Add gps shutdown on soft reset
pulkin Jan 5, 2020
80670b7
Add pin shutdown on reset func
pulkin Jan 5, 2020
638b715
Add pin power shutdown on reset
pulkin Jan 5, 2020
c737fda
Initial UART implementation
pulkin Jan 5, 2020
4e56e54
Fix warning
pulkin Jan 5, 2020
a21f95d
Mention hardware UART in README
pulkin Jan 5, 2020
3cb3272
Small changes in README
pulkin Jan 5, 2020
8d09ca0
Fix empty path
pulkin Jan 5, 2020
3794fc5
Fancy donate button
pulkin Jan 12, 2020
249af9d
Fix donate badge
pulkin Jan 12, 2020
8cfb8e0
Shorten help message towards esp8266-style
pulkin Jan 12, 2020
4755742
Switch to esp8266-like implementation for REPL dupterm. Close #23
pulkin Jan 12, 2020
f72e4cd
Indicate that ST7735 will be removed
pulkin Jan 12, 2020
1acf340
Transfer UART initialization to machine_uart.c
pulkin Jan 14, 2020
e3bdb20
Remove unused variables
pulkin Jan 14, 2020
20bc4cf
Fix UART ctrl-c interrupt with the new dupterm setup
pulkin Jan 14, 2020
fd08db1
Close #24
pulkin Jan 16, 2020
0ab6459
Add cellular.agps_station_data convenience function for use in agps
pulkin Jan 18, 2020
70236eb
Speed up soft SPI
pulkin Jan 23, 2020
50dba1b
Max out freq on reset
pulkin Jan 23, 2020
5ff8eee
Swap longitude and latitude
pulkin Jan 25, 2020
cd7d102
Add network module stub
pulkin Jan 25, 2020
b242cfb
Add the first example
pulkin Jan 25, 2020
e027b0f
Fix formatting for built-in blink
pulkin Jan 25, 2020
31983bb
Add blink example
pulkin Jan 25, 2020
45a0195
Examples: gps, network, ssl
pulkin Jan 25, 2020
997aa3f
Example: agps
pulkin Jan 25, 2020
ca7811a
Example: watchdog
pulkin Jan 25, 2020
caf13b1
Add date to github releases page
pulkin Jan 25, 2020
5d7f954
Add headers to examples
pulkin Jan 25, 2020
543a6b5
Example: http
pulkin Jan 25, 2020
46c04a2
Cleanup
pulkin Jan 25, 2020
242ead1
Close #25
pulkin Jan 27, 2020
4ba22dc
Attempt fixing azure build date/time
pulkin Jan 27, 2020
175187f
Fix indent
pulkin Jan 27, 2020
8a47409
Make startup scripts consistent with vfs
pulkin Jan 28, 2020
b408efb
Switch to custom CSDK repo
pulkin Feb 13, 2020
415bcdb
Remove garbage from Makefile
pulkin Feb 19, 2020
c75f230
uhashlib - initial
pulkin Feb 20, 2020
3cdaed0
uhashlib: add all optional libraries
pulkin Feb 20, 2020
8790233
ussl, uhashlib, ucryptolib: more consistent definitions
pulkin Feb 20, 2020
dec0c82
Add ssl alias
pulkin Feb 23, 2020
1e5e1ad
Attempt fixing #28 by patching csdk elf
pulkin Feb 13, 2020
1e1047c
Attempt fixing #28 by patching csdk lod
pulkin Feb 14, 2020
6593f38
Add information on contributions
pulkin Feb 14, 2020
22125aa
Fix reference
pulkin Feb 14, 2020
37b79af
Remove unnecessary delay in main loop
pulkin Feb 24, 2020
a60b144
fix (some of) uart issues
pulkin Feb 24, 2020
2813287
Fix errno for the internal file system
pulkin Feb 24, 2020
ef40484
Typo
pulkin Feb 28, 2020
f266431
Remove temp file
pulkin Feb 28, 2020
7bb5ce6
Swap lat lon in gps
pulkin Feb 29, 2020
7556bab
Add unix port to Azure builds
pulkin Mar 1, 2020
25c3325
Fixing soft reset doesn't clear the watchdog
sebi5361 Mar 5, 2020
64c8c64
Fix module layout
pulkin Mar 7, 2020
03f72a7
A more consistent initialization in case modgps_close changes
pulkin Mar 7, 2020
af9da77
Add information on issues
pulkin Mar 15, 2020
4a8a00b
No-gc setup fix
pulkin Mar 19, 2020
47b2e85
Comment out unused stuff
pulkin Mar 26, 2020
dc3e289
Close #46
pulkin Mar 26, 2020
8550955
Make debug messages in trace complete
pulkin Mar 27, 2020
372012c
Add traccar example
pulkin Mar 27, 2020
516aaf2
Add example README
pulkin Mar 27, 2020
39b2dd7
Edit README
pulkin Mar 27, 2020
d70a021
Use pointer for errno
pulkin Mar 28, 2020
e88bcfc
Fix some socket exceptions
pulkin Mar 28, 2020
58b45f4
Switch to a simpler patching script in python
pulkin Mar 31, 2020
1a26c91
Remove the workaround of #50 in favor of patched libcsdk
pulkin Mar 31, 2020
e8f3bfa
chip.flash_user_start() -> chip.USER_OFFSET
pulkin Mar 31, 2020
9946249
Fix the build by compiling libcsdk earlier
pulkin Mar 31, 2020
321942d
Fix the build by compiling libcsdk even earlier
pulkin Mar 31, 2020
0d8f486
Specify python3 for automatic builds explicitly
pulkin Mar 31, 2020
9eaf673
Attempt fixing patching in automatic builds
pulkin Mar 31, 2020
72be9bc
Remove f-strings for compatibility reasons
pulkin Apr 8, 2020
12d36b2
Add machine.RTC
pulkin May 2, 2020
eb3f850
readme: add mention of RTC
pulkin May 4, 2020
dd8bcf1
cellular: add on_status_event
pulkin May 4, 2020
05c674d
main: add mp_handle_pending in the main loop
pulkin May 4, 2020
d177d2a
readme: add on_network_event
pulkin May 4, 2020
89f73c2
cellular: fix callback
pulkin May 4, 2020
30cbebb
cellular: remove network_status_changed
pulkin May 5, 2020
796a732
cellular: remove SMS.poll in favor of on_sms callback
pulkin May 5, 2020
9b8fba7
cellular: add constants SMS_SENT, SMS_RECEIVED for the callback
pulkin May 5, 2020
053c803
cellular: reset callbacks
pulkin May 5, 2020
7a9afbb
cellular: add events and SMS examples
pulkin May 6, 2020
0891928
readme: remove obsolete
pulkin May 9, 2020
eee7c25
mp_handle_pending -> MICROPY_EVENT_POLL_HOOK
pulkin May 9, 2020
e46a02e
cellular: add optional timeout for gprs #15
pulkin May 9, 2020
6f58036
examples: fix typo in comments
pulkin May 9, 2020
4bf33cb
examples: add event-driven GPRS
pulkin May 9, 2020
83250b7
cellular: replace call -> on_call
pulkin May 10, 2020
2b4785e
cellular: remove CellularError, add timeout for GPRS shutdown
pulkin May 10, 2020
afcde63
readme: improve markup
pulkin May 10, 2020
cfcbfb2
readme: move obsolete entries to the bottom
pulkin May 10, 2020
860cf8a
cellular: skip raising exception if timeout is zero
pulkin May 10, 2020
80e2859
remove st7735
pulkin May 27, 2020
a115cc5
update patches for the new csdk
pulkin May 27, 2020
2b01cc7
update errno for the new csdk
pulkin May 27, 2020
85027f2
Added last version of a9_gprs submodules, including new csdtk42 version.
arlucio May 25, 2020
6230572
created boards/manifest.py
arlucio May 25, 2020
309e534
Changed &mp_const_none_obj to &mp_const_none_obj as explained in this…
arlucio May 25, 2020
aec610a
Fix errors related to posix functions and errno (reverting changes at…
arlucio May 25, 2020
b8601fc
Not necessary to patch lod anymore as we are using the new csdk version
arlucio May 25, 2020
5583c49
Fix errors related to posix functions and errno (reverting changes at…
arlucio May 25, 2020
7ce4df9
fix single-script test
pulkin Jun 14, 2020
e70a865
add a full module list to README
pulkin Jun 14, 2020
e0f9daa
remove unnecessary builds from azure
pulkin Jun 14, 2020
bb98a51
update esp8266 build in azure
pulkin Jun 14, 2020
2bd110e
fix esp8266 azure build
pulkin Jun 14, 2020
7706626
fix esp8266 azure build
pulkin Jun 14, 2020
616a746
add ussd
pulkin Jun 21, 2020
ba31b1e
update example index
pulkin Jun 21, 2020
7c66330
gps, cellular: use the same timeout macro
pulkin Aug 9, 2020
0753dcc
gps: remove GPSError
pulkin Aug 9, 2020
e6bee91
gps: add nmea_data
pulkin Aug 10, 2020
4c9ed6e
add discord badge
pulkin Jun 23, 2020
ab7c8ef
cellular: add timeout to sms_send
pulkin Aug 29, 2020
d167104
cellular: add SMS.get_storage_size
pulkin Aug 29, 2020
4d68e42
py: define ATOMIC macros
pulkin Aug 29, 2020
be1bc9f
readme: add a note about memory card
pulkin Sep 6, 2020
6e108db
cellular: add missing SMS.get_storage_size
pulkin Sep 6, 2020
4265a9b
deleting sms by index (useful for cleaning up whole memory)
Sep 1, 2020
6027992
cellular: SMS.delete_by_index -> SMS._withdraw_by_index
pulkin Sep 6, 2020
4cc0867
Handler for incoming sms
Sep 1, 2020
5d47508
cellular: join on_sms and on_new_sms
pulkin Sep 12, 2020
624b529
cellular: a more consistent SMS constructor
pulkin Sep 12, 2020
09b8c2e
cellular: rename SMS status -> purpose
pulkin Sep 12, 2020
7769fd0
cellular: add pn_type and index as readable fields
pulkin Sep 12, 2020
9d80323
cellular: remove several SMS functions in favor of read-only fields
pulkin Sep 12, 2020
2d024af
add power key handler
ubaldus Sep 9, 2020
62c8ecd
machine, cellular: post-merge cleanup
pulkin Sep 12, 2020
3a0056b
readme: add new API
pulkin Sep 12, 2020
b687cee
machine: change int->bool for on_power_key callback
pulkin Sep 12, 2020
522ab56
readme: adjustments
pulkin Sep 12, 2020
3553a2e
readme: community chat badge #85
pulkin Sep 14, 2020
5bf9aaa
build: fix #109
pulkin Apr 19, 2022
009b1a4
builds OK
Feb 24, 2023
793284f
fix registering ports
Feb 25, 2023
581a158
mbdetls (which was overrided with system mbedtls)
Feb 25, 2023
9d8d54f
axtls version
Feb 28, 2023
eacaf37
minor fixes
Mar 7, 2023
ab4dc35
AXTLS changes has been lost in time
intx82 Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
50 changes: 50 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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.
5c32111fa0e31e451b0f1666bdf926be2fdfd82c

# all: Update Python formatting to latest Black version 22.1.0.
ab2923dfa1174dc177f0a90cb00a7e4ff87958d2

# all: Update Python formatting to latest Black version 21.12b0.
3770fab33449a5dadf8eb06edfae0767e75320a6

# tools/gen-cpydiff.py: Fix formatting of doc strings for new Black.
0f78c36c5aa458a954eed39a46942209107a553e

# tests/run-tests.py: Reformat with Black.
2a38d7103672580882fb621a5b76e8d26805d593

# all: Update Python code to conform to latest black formatting.
06659077a81b85882254cf0953c33b27614e018e

# tools/uncrustify: Enable more opts to remove space between func and '('.
77ed6f69ac35c1663a5633a8ee1d8a2446542204

# tools/codeformat.py: Include extmod/{btstack,nimble} in code formatting.
026fda605e03113d6e753290d65fed774418bc53

# all: Format code to add space after C++-style comment start.
84fa3312cfa7d2237d4b56952f2cd6e3591210c4

# tests: Format all Python code with black, except tests in basics subdir.
3dc324d3f1312e40d3a8ed87e7244966bb756f26

# all: Remove spaces inside and around parenthesis.
1a3e386c67e03a79eb768cb6e9f6777e002d6660

# all: Remove spaces between nested paren and inside function arg paren.
feb25775851ba0c04b8d1013716f442258879d9c

# all: Reformat C and Python source code with tools/codeformat.py.
69661f3343bedf86e514337cff63d96cc42f8859

# stm32/usbdev: Convert files to unix line endings.
abde0fa2267f9062b28c3c015d7662a550125cc6

# all: Remove trailing spaces, per coding conventions.
761e4c7ff62896c7d8f8c3dfc3cc98a4cc4f2f6f
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: micropython
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Report an issue
title: ''
labels: bug
assignees: ''

---

* 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.

* If this issue involves external hardware, please include links to relevant datasheets and schematics.

* If you are seeing code being executed incorrectly, please provide a minimal example and expected output (e.g. comparison to CPython).

* For build issues, please include full details of your environment, compiler versions, command lines, and build output.

* Please provide as much information as possible about the version of MicroPython you're running, such as:
- 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.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- 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/
about: Documentation for using and working with MicroPython and libraries.
- name: MicroPython Downloads
url: https://micropython.org/download/
about: Pre-built firmware and information for most supported boards.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Documentation issue
about: Report areas of the documentation or examples that need improvement
title: 'docs: '
labels: documentation
assignees: ''

---

* 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.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Request a feature or improvement
title: ''
labels: enhancement
assignees: ''

---

* 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).

* For core Python features, where possible please include a link to the relevant PEP.

* For new architectures / ports / boards, please provide links to relevant documentation, specifications, and toolchains. Any information about the popularity and unique features about this hardware would also be useful.

* For features for existing ports (e.g. new peripherals or microcontroller features), please describe which port(s) it applies too, and whether this is could be an extension to the machine API or a port-specific module?

* 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.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Security report
about: Report a security issue or vunerability in MicroPython
title: ''
labels: security
assignees: ''

---

* 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"
20 changes: 20 additions & 0 deletions .github/workflows/code_formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check code formatting

on: [push, pull_request]

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

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install packages
run: source tools/ci.sh && ci_code_formatting_setup
- name: Run code formatting
run: source tools/ci.sh && ci_code_formatting_run
- name: Check code formatting
run: git diff --exit-code
45 changes: 45 additions & 0 deletions .github/workflows/code_size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Check code size

on:
push:
pull_request:
paths:
- '.github/workflows/*.yml'
- 'tools/**'
- 'py/**'
- 'extmod/**'
- 'lib/**'
- 'ports/bare-arm/**'
- 'ports/minimal/**'

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

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 100
- name: Install packages
run: source tools/ci.sh && ci_code_size_setup
- name: Build
run: source tools/ci.sh && ci_code_size_build
- name: Compute code size difference
run: tools/metrics.py diff ~/size0 ~/size1 | tee diff
- name: Save PR number
if: github.event_name == 'pull_request'
env:
PR_NUMBER: ${{ github.event.number }}
run: echo $PR_NUMBER > pr_number
- name: Upload diff
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: code-size-report
path: |
diff
pr_number
retention-days: 1
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,
});
}
18 changes: 18 additions & 0 deletions .github/workflows/commit_formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check commit message formatting

on: [push, pull_request]

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '100'
- uses: actions/setup-python@v4
- name: Check commit message formatting
run: source tools/ci.sh && ci_commit_formatting_run
22 changes: 22 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build docs

on:
pull_request:
paths:
- docs/**

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

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install Python packages
run: pip install Sphinx
- name: Build docs
run: make -C docs/ html
25 changes: 25 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check examples

on:
push:
pull_request:
paths:
- '.github/workflows/*.yml'
- 'examples/**'
- 'ports/unix/**'
- 'py/**'
- 'shared/**'

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

jobs:
embedding:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: make -C examples/embedding -f micropython_embed.mk && make -C examples/embedding
- name: Run
run: ./examples/embedding/embed | grep "hello world"
Loading