mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
[python] Fixup python examples / build (#2509)
## Description This fixes up and renables the python examples builds. Main fixes - Test shell script just straight up didn't do what it was intended to do - Replace analog imus (and half refactored sims) with OnboardIMU - Fixes swerve velocities function signature - "regenerates" the default robotpy test ## Meta Merge checklist: - [x] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_, including events that led to this PR - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with all settings going back to the previous seasons's last release (seasons end after champs ends) - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added - [ ] If this PR adds a dependency, the license has been checked for compatibility and steps taken to follow it --------- Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com> Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
This commit is contained in:
79
.github/workflows/python.yml
vendored
79
.github/workflows/python.yml
vendored
@@ -78,55 +78,54 @@ jobs:
|
||||
- name: Run mypy type checking
|
||||
run: mypy --show-column-numbers --config-file photon-lib/py/pyproject.toml photon-lib
|
||||
|
||||
# build-python-examples:
|
||||
# needs: build-py
|
||||
# strategy:
|
||||
# matrix:
|
||||
# os: [ubuntu-24.04, windows-2022, macos-14]
|
||||
# runs-on: ${{ matrix.os }}
|
||||
build-python-examples:
|
||||
needs: build-py
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-24.04, windows-2022, macos-14]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
# steps:
|
||||
steps:
|
||||
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v6
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# - name: Set up Python
|
||||
# uses: actions/setup-python@v6
|
||||
# with:
|
||||
# python-version: 3.14
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: 3.14
|
||||
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip
|
||||
# python -m pip install mypy
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install mypy
|
||||
|
||||
# - name: Download artifacts
|
||||
# uses: actions/download-artifact@v8
|
||||
# with:
|
||||
# name: dist
|
||||
# path: ./photon-lib/py/dist/
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: dist
|
||||
path: ./photon-lib/py/dist/
|
||||
|
||||
# - name: Install PhotonLibPy package
|
||||
# working-directory: ./photon-lib/py
|
||||
# shell: bash
|
||||
# run: |
|
||||
# pip install --no-cache-dir dist/*.whl
|
||||
- name: Install PhotonLibPy package
|
||||
working-directory: ./photon-lib/py
|
||||
shell: bash
|
||||
run: |
|
||||
pip install --no-cache-dir dist/*.whl
|
||||
|
||||
# - name: Build Python examples
|
||||
# working-directory: photonlib-python-examples
|
||||
# shell: bash
|
||||
# run: |
|
||||
# for folder in */;
|
||||
# do
|
||||
# echo $folder
|
||||
# ./run.sh $folder
|
||||
# done
|
||||
- name: Build Python examples
|
||||
working-directory: photonlib-python-examples
|
||||
shell: bash
|
||||
run: |
|
||||
for folder in */;
|
||||
do
|
||||
echo $folder
|
||||
./test.sh $folder
|
||||
done
|
||||
|
||||
deploy:
|
||||
# TODO: BRING BACK PYTHON EXAMPLES
|
||||
needs: [test-py]
|
||||
needs: [test-py, build-python-examples]
|
||||
runs-on: ubuntu-24.04
|
||||
# Only upload on tags
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
|
||||
Reference in New Issue
Block a user