Skip to content

Commit 94de9fe

Browse files
authored
Merge pull request #319 from Josverl/feat/minify-updates
Replace manual maintenance of the different variants and minification of each with `make-variants` Kudo's to @BradenM for stating the work to generate the variants, and allow dynamic generation of these. Remaining todo: update the documentation on all this.
2 parents b53f8f7 + 56674d2 commit 94de9fe

File tree

88 files changed

+3198
-1713
lines changed

Some content is hidden

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

88 files changed

+3198
-1713
lines changed

.github/workflows/pytest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
# poetry is not in the default image
5252
#----------------------------------------------
5353
- name: Install poetry
54-
run: pipx install poetry~=1.3
54+
run: pipx install poetry==1.3.1
5555

5656
- name: Set up Python ${{ matrix.python-version }}
5757
uses: actions/setup-python@v4
@@ -72,9 +72,9 @@ jobs:
7272
- name: stubber clone
7373
run: poetry run stubber clone --add-stubs
7474

75-
- name: create or update minified version
75+
- name: create or update variants
7676
run: |
77-
poetry run stubber minify --all --compile
77+
poetry run stubber make-variants
7878
7979
- name: Test with pytest
8080
if: always()

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# poetry is not in the default image
1919
#----------------------------------------------
2020
- name: Install Poetry
21-
run: pipx install poetry~=1.3
21+
run: pipx install poetry==1.3.1
2222

2323
- name: Set up Python
2424
uses: actions/setup-python@v4

.github/workflows/run minify-pr.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,23 @@ jobs:
3232
# poetry is not in the default image
3333
#----------------------------------------------
3434
- name: Install Poetry
35-
run: pipx install poetry~=1.3
35+
run: pipx install poetry==1.3.1
3636

3737
#----------------------------------------------
3838
# install root project
3939
#----------------------------------------------
4040
- name: Install library
4141
run: poetry install --with dev --no-interaction
4242

43-
4443
- name: flag tools executable
4544
if: runner.os == 'Linux'
4645
run: |
4746
chmod +x $GITHUB_WORKSPACE/tests/tools/* --recursive --verbose
4847
MICROPYPATH=./board ./tests/tools/ubuntu_20_04/micropython_v1_18 -c "import sys;print(sys.path);import logging"
4948
50-
- name: stubber minify --all --compile
51-
shell: pwsh
49+
- name: make all variants
5250
run: |
53-
poetry run stubber minify --all --compile
51+
poetry run stubber make-variants
5452
5553
- name: run test on minified/createstubs.by
5654
run: |
@@ -68,7 +66,7 @@ jobs:
6866
automated pr
6967
7068
- name: Check outputs
71-
if: always()
69+
if: always()
7270
run: |
7371
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
7472
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ tests/codemods/codemod_test_cases/**/output.py
6262
snippets/*/typings
6363
typings_test
6464
typings
65+
src/stubber/board/modulelist.done

.libcst.codemod.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ generated_code_marker: "@generated"
55
# Command line and arguments for invoking a code formatter. Anything
66
# specified here must be capable of taking code via stdin and returning
77
# formatted code via stdout.
8-
# formatter: ['black', '-']
9-
formatter: []
8+
formatter: ['black', '-']
109

1110
# List of regex patterns which LibCST will evaluate against filenames to
1211
# determine if the module should be touched.

.vscode/launch.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "Python: file as Module",
99
"type": "python",
1010
"request": "launch",
11-
"module": "stubber.publish.${fileBasenameNoExtension}",
11+
"module": "stubber.${fileBasenameNoExtension}",
1212
"justMyCode": false
1313
},
1414
{
@@ -33,13 +33,14 @@
3333
"args": [
3434
"-v",
3535
"-v",
36-
"build",
37-
"--port",
38-
"esp32",
39-
"--board",
40-
"S3",
41-
// "--pypi",
42-
// "--dry-run",
36+
"publish",
37+
// "--port",
38+
// "esp32",
39+
// "--board",
40+
// "um_tinypico",
41+
"--pypi",
42+
"--dry-run",
43+
// "--build",
4344
// "switch",
4445
// "v1.19.1"
4546
// "get-frozen",

board/modulelist.txt

Lines changed: 0 additions & 176 deletions
This file was deleted.

board/pymakr.conf

Lines changed: 0 additions & 12 deletions
This file was deleted.

board/stub_lvgl.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

data/pico-lipo.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# MicroPython 67fac4e on 2023-02-16; Pimoroni Pico LiPo 16MB with RP2040
2+
3+
__main__ breakout_pmw3901 motor uasyncio/lock
4+
_boot breakout_potentiometer neopixel uasyncio/stream
5+
_boot_fat breakout_rgbmatrix5x5 onewire ubinascii
6+
_onewire breakout_rtc pcf85063a ucollections
7+
_rp2 breakout_scd41 picoexplorer ucryptolib
8+
_thread breakout_sgp30 picographics uctypes
9+
_uasyncio breakout_trackball picokeypad uerrno
10+
adcfft breakout_vl53l5cx picoscroll uhashlib
11+
breakout_as7262 builtins picounicorn uheapq
12+
breakout_bh1745 cmath picowireless uio
13+
breakout_bme280 dht pimoroni ujson
14+
breakout_bme68x ds18x20 pimoroni_bus ulab
15+
breakout_bmp280 encoder pimoroni_i2c umachine
16+
breakout_dotmatrix framebuf plasma uos
17+
breakout_encoder galactic qrcode urandom
18+
breakout_icp10125 gc rp2 ure
19+
breakout_ioexpander gfx_pack servo uselect
20+
breakout_ltr559 hub75 uarray ustruct
21+
breakout_matrix11x7 interstate75 uasyncio/__init__ usys
22+
breakout_mics6814 jpegdec uasyncio/core utime
23+
breakout_msa301 math uasyncio/event uzlib
24+
breakout_paa5100 micropython uasyncio/funcs version

0 commit comments

Comments
 (0)