Skip to content

Get ulab stubs

Get ulab stubs #234

# This will attempt to retrieve and add/update the hand coded stubs from cpwood/Pico-Stub
name: Get ulab stubs
on:
workflow_dispatch:
schedule:
- cron: "0 1 * * 5" # Run every Friday at 01:00
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
jobs:
# job prepare sets everything up
get-ulab-stubs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
continue-on-error: true
# Most scripts will be run from the stubs repo, set that as default
defaults:
run:
shell: bash
working-directory: ${{github.workspace}}/micropython-stubs
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
######################################
# Check out repos side-by-side:
# https://github.com/josverl/micropython-stubs
# https://github.com/v923z/micropython-ulab
######################################
- name: Checkout stubs repo
uses: actions/checkout@v3
with:
repository: josverl/micropython-stubs
path: micropython-stubs
# - name: Checkout stubber repo
# uses: actions/checkout@v3
# with:
# repository: josverl/micropython-stubber
# path: micropython-stubber
# # simplify processing using symlink
# - name: create symlink for all_stubs
# working-directory: ${{github.workspace}}/micropython-stubber
# run: |
# ln -s ${{github.workspace}}/micropython-stubs/stubs all-stubs --force
# integrate stubs from this repo
- name: Checkout micropython-ulab repo
uses: actions/checkout@v3
with:
repository: v923z/micropython-ulab
path: micropython-ulab
# make Python work
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
- name: Install Python dependencies
run: |
pip install --upgrade wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
######################################
# This is where the actual work starts
######################################
- name: extract stubs using ulab's extract script
working-directory: ${{github.workspace}}/micropython-ulab
shell: bash
run: |
python extract_pyi.py ./micropython-stubs/stubs/micropython-ulab/ulab
# Todo: add manifest.json
# - name: Update stubs with .pyi ${{ matrix.version }}
# run: |
# python ./src/update_pyi.py
# - name: Update Documentation
# working-directory: ${{github.workspace}}/micropython-stubber
# shell: pwsh
# run: |
# scripts/update_docs.ps1
- name: commit
uses: ./.github/actions/commit
with:
message: "add/update micropython-ulab modules"