From ffe630679f0d54d838f2f0d97e19614855765347 Mon Sep 17 00:00:00 2001 From: royjr Date: Sat, 18 Jul 2026 21:43:19 -0400 Subject: [PATCH] sync: fix paths after openpilot package move --- .github/workflows/badges.yaml | 35 ------------------- .../workflows/build-all-tinygrad-models.yaml | 2 +- .github/workflows/sunnypilot-build-model.yaml | 10 +++--- launch_openpilot.sh | 2 +- opendbc_repo | 2 +- openpilot/sunnypilot/modeld_v2/modeld.py | 2 +- .../sunnylink/athena/manage_sunnylinkd.py | 2 +- .../system/hardware/c3/launch_chffrplus.sh | 16 ++++++--- openpilot/system/athena/manage_athenad.py | 2 +- release/ci/publish.sh | 4 +-- 10 files changed, 25 insertions(+), 52 deletions(-) delete mode 100644 .github/workflows/badges.yaml diff --git a/.github/workflows/badges.yaml b/.github/workflows/badges.yaml deleted file mode 100644 index d170a96368..0000000000 --- a/.github/workflows/badges.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: badges -on: - schedule: - - cron: '0 * * * *' - workflow_dispatch: - -env: - PYTHONPATH: ${{ github.workspace }} - -jobs: - badges: - name: create badges - runs-on: ubuntu-latest - if: github.repository == 'sunnypilot/sunnypilot' - permissions: - contents: write - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - run: ./tools/op.sh setup - - name: Push badges - run: | - python3 selfdrive/ui/translations/create_badges.py - - rm .gitattributes - - git checkout --orphan badges - git rm -rf --cached . - git config user.email "badge-researcher@sunnypilot.ai" - git config user.name "Badge Researcher" - - git add translation_badge.svg - git commit -m "Add/Update badges" - git push -f origin HEAD diff --git a/.github/workflows/build-all-tinygrad-models.yaml b/.github/workflows/build-all-tinygrad-models.yaml index 1e341cb8ec..0eedb04703 100644 --- a/.github/workflows/build-all-tinygrad-models.yaml +++ b/.github/workflows/build-all-tinygrad-models.yaml @@ -30,7 +30,7 @@ jobs: run: | cd sunnypilot export PYTHONPATH=$(pwd) - ref=$(python3 sunnypilot/models/tinygrad_ref.py) + ref=$(python3 openpilot/sunnypilot/models/tinygrad_ref.py) echo "tinygrad_ref=$ref" >> $GITHUB_OUTPUT echo "tinygrad_ref is $ref" diff --git a/.github/workflows/sunnypilot-build-model.yaml b/.github/workflows/sunnypilot-build-model.yaml index 3c5554fcc4..93edd29e14 100644 --- a/.github/workflows/sunnypilot-build-model.yaml +++ b/.github/workflows/sunnypilot-build-model.yaml @@ -6,7 +6,7 @@ env: SCONS_CACHE_DIR: ${{ github.workspace }}/release/ci/scons_cache UPSTREAM_REPO: "commaai/openpilot" TINYGRAD_PATH: ${{ github.workspace }}/tinygrad_repo - MODELS_DIR: ${{ github.workspace }}/selfdrive/modeld/models + MODELS_DIR: ${{ github.workspace }}/openpilot/selfdrive/modeld/models on: workflow_call: @@ -92,7 +92,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: models-${{ env.REF }}${{ inputs.artifact_suffix }} - path: ${{ github.workspace }}/openpilot/selfdrive/modeld/models/*.onnx + path: ${{ github.workspace }}/openpilot/openpilot/selfdrive/modeld/models/*.onnx build_model: runs-on: [self-hosted, tici] @@ -155,9 +155,9 @@ jobs: uses: actions/download-artifact@v4 with: name: models-${{ env.REF }}${{ inputs.artifact_suffix }} - path: ${{ github.workspace }}/selfdrive/modeld/models + path: ${{ env.MODELS_DIR }} - run: | - rm -f ${{ github.workspace }}/selfdrive/modeld/models/{dmonitoring_model,big_driving_policy,big_driving_vision}.onnx + rm -f ${{ env.MODELS_DIR }}/{dmonitoring_model,big_driving_policy,big_driving_vision}.onnx - name: Build Model run: | @@ -166,7 +166,7 @@ jobs: export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT export PYTHONPATH="${PYTHONPATH}:${{ env.TINYGRAD_PATH }}:${{ github.workspace }}" - COMPILE_MODELD="${{ github.workspace }}/sunnypilot/modeld_v2/compile_modeld.py" + COMPILE_MODELD="${{ github.workspace }}/openpilot/sunnypilot/modeld_v2/compile_modeld.py" MODEL_SIZE=$(python3 -c "from openpilot.common.transformations.model import MEDMODEL_INPUT_SIZE as s; print(f'{s[0]}x{s[1]}')") CAMERA_RES=$(python3 -c "from openpilot.common.transformations.camera import _ar_ox_fisheye as a, _os_fisheye as o; print(f'{a.width}x{a.height} {o.width}x{o.height}')") TG_FLAGS="DEV=QCOM IMAGE=1 FLOAT16=1 NOLOCALS=1 JIT_BATCH_SIZE=0 OPENPILOT_HACKS=1" diff --git a/launch_openpilot.sh b/launch_openpilot.sh index d4841b601f..0b3550aba8 100755 --- a/launch_openpilot.sh +++ b/launch_openpilot.sh @@ -4,7 +4,7 @@ IFS=$'\n\t' # On any failure, run the fallback launcher trap 'exec ./launch_chffrplus.sh' ERR -C3_LAUNCH_SH="./sunnypilot/system/hardware/c3/launch_chffrplus.sh" +C3_LAUNCH_SH="./openpilot/sunnypilot/system/hardware/c3/launch_chffrplus.sh" MODEL="$(tr -d '\0' < "/sys/firmware/devicetree/base/model")" export MODEL diff --git a/opendbc_repo b/opendbc_repo index fe8389fa49..2e335a208a 160000 --- a/opendbc_repo +++ b/opendbc_repo @@ -1 +1 @@ -Subproject commit fe8389fa495e26fe378fe4b5b1b7211a77beb42f +Subproject commit 2e335a208a71310b33dbc6120588d1732465b43a diff --git a/openpilot/sunnypilot/modeld_v2/modeld.py b/openpilot/sunnypilot/modeld_v2/modeld.py index ad18071b3b..86d5b05868 100755 --- a/openpilot/sunnypilot/modeld_v2/modeld.py +++ b/openpilot/sunnypilot/modeld_v2/modeld.py @@ -42,7 +42,7 @@ from openpilot.sunnypilot.livedelay.helpers import get_lat_delay from openpilot.sunnypilot.modeld_v2.modeld_base import ModelStateBase from openpilot.sunnypilot.models.helpers import get_active_bundle -PROCESS_NAME = "selfdrive.modeld.modeld_tinygrad" +PROCESS_NAME = "openpilot.selfdrive.modeld.modeld_tinygrad" def _pkl_exists(path): diff --git a/openpilot/sunnypilot/sunnylink/athena/manage_sunnylinkd.py b/openpilot/sunnypilot/sunnylink/athena/manage_sunnylinkd.py index 377b6990f7..d811fa5dbc 100755 --- a/openpilot/sunnypilot/sunnylink/athena/manage_sunnylinkd.py +++ b/openpilot/sunnypilot/sunnylink/athena/manage_sunnylinkd.py @@ -2,4 +2,4 @@ from openpilot.system.athena.manage_athenad import manage_athenad if __name__ == '__main__': - manage_athenad("SunnylinkDongleId", "SunnylinkdPid", 'sunnylinkd', 'sunnypilot.sunnylink.athena.sunnylinkd') + manage_athenad("SunnylinkDongleId", "SunnylinkdPid", 'sunnylinkd', 'openpilot.sunnypilot.sunnylink.athena.sunnylinkd') diff --git a/openpilot/sunnypilot/system/hardware/c3/launch_chffrplus.sh b/openpilot/sunnypilot/system/hardware/c3/launch_chffrplus.sh index 45cc950537..a505e4f1f1 100755 --- a/openpilot/sunnypilot/system/hardware/c3/launch_chffrplus.sh +++ b/openpilot/sunnypilot/system/hardware/c3/launch_chffrplus.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash SP_C3_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" -DIR="$( cd "$SP_C3_DIR/../../../.." >/dev/null 2>&1 && pwd )" +DIR="$( cd "$SP_C3_DIR/../../../../.." >/dev/null 2>&1 && pwd )" source "$SP_C3_DIR/launch_env.sh" @@ -19,12 +19,12 @@ function agnos_init { if [ $(< /VERSION) != "$AGNOS_VERSION" ]; then - AGNOS_PY="$DIR/system/hardware/tici/agnos.py" + AGNOS_PY="$DIR/openpilot/common/hardware/tici/agnos.py" MANIFEST="$SP_C3_DIR/agnos.json" if $AGNOS_PY --verify $MANIFEST; then sudo reboot fi - $DIR/system/hardware/tici/updater $AGNOS_PY $MANIFEST + $DIR/openpilot/common/hardware/tici/updater $AGNOS_PY $MANIFEST fi } @@ -70,6 +70,14 @@ function launch { ln -sfn $(pwd) /data/pythonpath export PYTHONPATH="$PWD" + # submodule package symlinks for PYTHONPATH imports on device. + # on PC these come from editable installs via pyproject.toml / uv. + ln -sfn msgq_repo/msgq msgq + ln -sfn opendbc_repo/opendbc opendbc + ln -sfn rednose_repo/rednose rednose + ln -sfn teleoprtc_repo/teleoprtc teleoprtc + ln -sfn tinygrad_repo/tinygrad tinygrad + # hardware specific init if [ -f /AGNOS ]; then agnos_init @@ -79,7 +87,7 @@ function launch { tmux capture-pane -pq -S-1000 > /tmp/launch_log # start manager - cd $DIR/system/manager + cd $DIR/openpilot/system/manager if [ ! -f $DIR/prebuilt ]; then ./build.py fi diff --git a/openpilot/system/athena/manage_athenad.py b/openpilot/system/athena/manage_athenad.py index 7ab88fb67e..3f0d6adcd3 100755 --- a/openpilot/system/athena/manage_athenad.py +++ b/openpilot/system/athena/manage_athenad.py @@ -13,7 +13,7 @@ ATHENA_MGR_PID_PARAM = "AthenadPid" def main(): - manage_athenad("DongleId", ATHENA_MGR_PID_PARAM, 'athenad', 'system.athena.athenad') + manage_athenad("DongleId", ATHENA_MGR_PID_PARAM, 'athenad', 'openpilot.system.athena.athenad') def manage_athenad(dongle_id_param, pid_param, process_name, target): diff --git a/release/ci/publish.sh b/release/ci/publish.sh index 315ae22bfe..27904caf5d 100755 --- a/release/ci/publish.sh +++ b/release/ci/publish.sh @@ -30,7 +30,7 @@ if [ -z "$GIT_ORIGIN" ]; then fi # "Tagging" -echo "#define SUNNYPILOT_VERSION \"$VERSION\"" > ${OUTPUT_DIR}/sunnypilot/common/version.h +echo "#define SUNNYPILOT_VERSION \"$VERSION\"" > ${OUTPUT_DIR}/openpilot/sunnypilot/common/version.h ## set git identity #source $DIR/identity.sh @@ -55,7 +55,7 @@ git add -f . # include source commit hash and build date in commit GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD) DATETIME=$(date '+%Y-%m-%dT%H:%M:%S') -SP_VERSION=$(awk -F\" '{print $2}' $SOURCE_DIR/sunnypilot/common/version.h) +SP_VERSION=$(awk -F\" '{print $2}' $SOURCE_DIR/openpilot/sunnypilot/common/version.h) # Commit with detailed message git commit -a -m "sunnypilot v$VERSION