From 16937b8a0dcddd07c6dc2292924fb066495d72a2 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 2 Aug 2023 10:54:47 -0500 Subject: [PATCH 1/2] Fix markup of bitmaptools.blit stubs this prevented bitmaptools.blit from properly appearing in documentation. --- shared-bindings/bitmaptools/__init__.c | 60 +++++++++++++------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 5139a55645..2eb966ef8d 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -949,37 +949,37 @@ STATIC mp_obj_t bitmaptools_obj_draw_circle(size_t n_args, const mp_obj_t *pos_a MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_circle_obj, 0, bitmaptools_obj_draw_circle); -//| def blit( -//| dest_bitmap: displayio.Bitmap, -//| source_bitmap: displayio.Bitmap, -//| x: int, -//| y: int, -//| *, -//| x1: int, -//| y1: int, -//| x2: int, -//| y2: int, -//| skip_source_index: int, -//| skip_dest_index: int -//| ) -> None: -//| """Inserts the source_bitmap region defined by rectangular boundaries -//| (x1,y1) and (x2,y2) into the bitmap at the specified (x,y) location. +//| def blit( +//| dest_bitmap: displayio.Bitmap, +//| source_bitmap: displayio.Bitmap, +//| x: int, +//| y: int, +//| *, +//| x1: int, +//| y1: int, +//| x2: int, +//| y2: int, +//| skip_source_index: int, +//| skip_dest_index: int +//| ) -> None: +//| """Inserts the source_bitmap region defined by rectangular boundaries +//| (x1,y1) and (x2,y2) into the bitmap at the specified (x,y) location. //| -//| :param bitmap dest_bitmap: Destination bitmap that the area will be copied into. -//| :param bitmap source_bitmap: Source bitmap that contains the graphical region to be copied -//| :param int x: Horizontal pixel location in bitmap where source_bitmap upper-left -//| corner will be placed -//| :param int y: Vertical pixel location in bitmap where source_bitmap upper-left -//| corner will be placed -//| :param int x1: Minimum x-value for rectangular bounding box to be copied from the source bitmap -//| :param int y1: Minimum y-value for rectangular bounding box to be copied from the source bitmap -//| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be copied from the source bitmap -//| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be copied from the source bitmap -//| :param int skip_source_index: bitmap palette index in the source that will not be copied, -//| set to None to copy all pixels -//| :param int skip_dest_index: bitmap palette index in the destination bitmap that will not get overwritten -//| by the pixels from the source""" -//| ... +//| :param bitmap dest_bitmap: Destination bitmap that the area will be copied into. +//| :param bitmap source_bitmap: Source bitmap that contains the graphical region to be copied +//| :param int x: Horizontal pixel location in bitmap where source_bitmap upper-left +//| corner will be placed +//| :param int y: Vertical pixel location in bitmap where source_bitmap upper-left +//| corner will be placed +//| :param int x1: Minimum x-value for rectangular bounding box to be copied from the source bitmap +//| :param int y1: Minimum y-value for rectangular bounding box to be copied from the source bitmap +//| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be copied from the source bitmap +//| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be copied from the source bitmap +//| :param int skip_source_index: bitmap palette index in the source that will not be copied, +//| set to None to copy all pixels +//| :param int skip_dest_index: bitmap palette index in the destination bitmap that will not get overwritten +//| by the pixels from the source""" +//| ... //| STATIC mp_obj_t bitmaptools_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum {ARG_destination, ARG_source, ARG_x, ARG_y, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_skip_source_index, ARG_skip_dest_index}; From dbafba889dd36f09ba171dad8f9e7fb4d8be5f2b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 3 Aug 2023 08:55:56 -0500 Subject: [PATCH 2/2] include SRC_PATTERNS for ci_set_matrix Originally, all Makefile variables were implicitly included in settings[]. When I revised ci_set_matrix, only explicltly named variables are included. Depending on the set of changed files, ci_set_matrix needs the SRC_PATTERNS variable, so include it explicitly. Typical error, seen in the history of building this PR: ``` Traceback (most recent call last): File "/home/runner/work/circuitpython/circuitpython/tools/ci_set_matrix.py", line 309, in main() File "/home/runner/work/circuitpython/circuitpython/tools/ci_set_matrix.py", line 305, in main set_boards(run_all) File "/home/runner/work/circuitpython/circuitpython/tools/ci_set_matrix.py", line 215, in set_boards if module in settings["SRC_PATTERNS"]: ~~~~~~~~^^^^^^^^^^^^^^^^ KeyError: 'SRC_PATTERNS' Error: Process completed with exit code 1. ``` --- docs/shared_bindings_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index 27c48fb293..92def05fbf 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -177,7 +177,7 @@ def get_settings_from_makefile(port_dir, board_name): in this script, something that has proved error-prone """ contents = subprocess.run( - ["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS"], + ["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS", "print-SRC_PATTERNS"], encoding="utf-8", errors="replace", stdout=subprocess.PIPE,