diff --git a/.github/workflows/repo-maintenance.yaml b/.github/workflows/repo-maintenance.yaml index cf35804492bd43..3893c7fa5e0bc1 100644 --- a/.github/workflows/repo-maintenance.yaml +++ b/.github/workflows/repo-maintenance.yaml @@ -46,17 +46,13 @@ jobs: python3 -m ensurepip --upgrade pip3 install uv uv lock --upgrade - - name: pre-commit autoupdate - run: | - git config --global --add safe.directory '*' - pre-commit autoupdate - name: Create Pull Request uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83 with: author: Vehicle Researcher token: ${{ secrets.ACTIONS_CREATE_PR_PAT }} - commit-message: Update Python packages and pre-commit hooks - title: '[bot] Update Python packages and pre-commit hooks' + commit-message: Update Python packages + title: '[bot] Update Python packages' branch: auto-package-updates base: master delete-branch: true diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index bfad6e1e7dda22..8c46e15c2f809b 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -25,7 +25,7 @@ env: DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} BUILD: selfdrive/test/docker_build.sh base - RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PRE_COMMIT_HOME=/tmp/pre-commit -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/pre-commit:/tmp/pre-commit -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c + RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c PYTEST: pytest --continue-on-collection-errors --cov --cov-report=xml --cov-append --durations=0 --durations-min=5 --hypothesis-seed 0 -n logical @@ -45,7 +45,6 @@ jobs: - name: Build devel timeout-minutes: 1 run: TARGET_DIR=$STRIPPED_DIR release/build_devel.sh - - uses: ./.github/workflows/setup-pre-commit - uses: ./.github/workflows/setup-with-retry - name: Check submodules if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot' @@ -62,14 +61,13 @@ jobs: cd $STRIPPED_DIR ${{ env.RUN }} "release/check-dirty.sh && \ MAX_EXAMPLES=5 $PYTEST -m 'not slow' selfdrive/car" - - name: pre-commit - timeout-minutes: 3 + - name: static analysis + timeout-minutes: 1 run: | cd $GITHUB_WORKSPACE - cp .pre-commit-config.yaml $STRIPPED_DIR cp pyproject.toml $STRIPPED_DIR cd $STRIPPED_DIR - ${{ env.RUN }} "unset PYTHONWARNINGS && SKIP=check-added-large-files,check-hooks-apply,check-useless-excludes pre-commit run --all && chmod -R 777 /tmp/pre-commit" + ${{ env.RUN }} "scripts/lint.sh" build: strategy: @@ -146,13 +144,12 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - uses: ./.github/workflows/setup-pre-commit - uses: ./.github/workflows/setup-with-retry - name: Build openpilot run: ${{ env.RUN }} "scons -j$(nproc)" - - name: pre-commit - timeout-minutes: 4 - run: ${{ env.RUN }} "unset PYTHONWARNINGS && pre-commit run --all && chmod -R 777 /tmp/pre-commit" + - name: static analysis + timeout-minutes: 1 + run: ${{ env.RUN }} "scripts/lint.sh" unit_tests: name: unit tests @@ -340,6 +337,7 @@ jobs: # This job name needs to be the same as UI_JOB_NAME in ui_preview.yaml name: Create UI Report runs-on: ubuntu-latest + if: github.event_name == 'pull_request' steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/setup-pre-commit/action.yaml b/.github/workflows/setup-pre-commit/action.yaml deleted file mode 100644 index f07a106861f729..00000000000000 --- a/.github/workflows/setup-pre-commit/action.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'set up pre-commit environment' - -runs: - using: "composite" - steps: - - uses: ./.github/workflows/auto-cache - with: - path: .ci_cache/pre-commit - key: pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }} - restore-keys: | - pre-commit- - save: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot' }} diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index a26691ea454538..f7f92a0387bad8 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -5,8 +5,8 @@ on: workflow_dispatch: env: - DAYS_BEFORE_PR_CLOSE: 3 - DAYS_BEFORE_PR_STALE: 14 + DAYS_BEFORE_PR_CLOSE: 2 + DAYS_BEFORE_PR_STALE: 9 jobs: stale: diff --git a/.gitmodules b/.gitmodules index 1d5d04577e9fa9..ad6530de9ac910 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,7 +2,7 @@ path = panda url = ../../commaai/panda.git [submodule "opendbc"] - path = opendbc + path = opendbc_repo url = ../../commaai/opendbc.git [submodule "msgq"] path = msgq_repo diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index a7a53790886ca2..00000000000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,105 +0,0 @@ -exclude: '^(tinygrad_repo)' -repos: -- repo: meta - hooks: - - id: check-hooks-apply - - id: check-useless-excludes -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 - hooks: - - id: check-ast - exclude: '^(third_party)/' - - id: check-json - exclude: '.devcontainer/devcontainer.json|.vscode/' # these support JSON with comments - - id: check-toml - - id: check-xml - - id: check-yaml - - id: check-merge-conflict - - id: check-symlinks - - id: check-executables-have-shebangs - - id: check-shebang-scripts-are-executable - - id: check-added-large-files - exclude: '(docs/CARS.md)|(uv.lock)|(third_party/acados/include/blasfeo/include/blasfeo_d_kernel.h)' - args: - - --maxkb=120 - - --enforce-all -- repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - exclude: '^(third_party/)|(body/)|(msgq/)|(panda/)|(opendbc/)|(rednose/)|(rednose_repo/)|(teleoprtc/)|(teleoprtc_repo/)|(selfdrive/ui/translations/.*.ts)|(uv.lock)' - args: - # if you've got a short variable name that's getting flagged, add it here - - -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn - - --builtins clear,rare,informal,usage,code,names,en-GB_to_en-US -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.5 - hooks: - - id: ruff - exclude: '^(third_party/)|(msgq/)|(panda/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(teleoprtc/)|(teleoprtc_repo/)' -- repo: local - hooks: - - id: mypy - name: mypy - entry: mypy - language: system - types: [python] - args: - - --local-partial-types - - --explicit-package-bases - exclude: '^(third_party/)|(body/)|(msgq/)|(opendbc/)|(panda/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(teleoprtc/)|(teleoprtc_repo/)' -- repo: local - hooks: - - id: cppcheck - name: cppcheck - entry: cppcheck - language: system - types: [c++] - exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(tools/)|(selfdrive/modeld/thneed/debug/)|(selfdrive/modeld/test/)|(selfdrive/camerad/test/)|(installer/)' - args: - - --error-exitcode=1 - - --language=c++ - - --quiet - - --force - - -j8 - - --library=qt - - --include=third_party/kaitai/kaitaistream.h -- repo: https://github.com/cpplint/cpplint - rev: 1.6.1 - hooks: - - id: cpplint - exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(generated/)' - args: - - --quiet - - --counting=total - - --linelength=240 - # https://google.github.io/styleguide/cppguide.html - # relevant rules are whitelisted, see all options with: cpplint --filter= - - --filter=-build,-legal,-readability,-runtime,-whitespace,+build/include_subdir,+build/forward_decl,+build/include_what_you_use,+build/deprecated,+whitespace/comma,+whitespace/line_length,+whitespace/empty_if_body,+whitespace/empty_loop_body,+whitespace/empty_conditional_body,+whitespace/forcolon,+whitespace/parens,+whitespace/semicolon,+whitespace/tab,+readability/braces -- repo: https://github.com/MarcoGorelli/cython-lint - rev: v0.16.2 - hooks: - - id: cython-lint - exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(generated/)' - args: - - --max-line-length=240 - - --ignore=E111, E302, E305 -- repo: local - hooks: - - id: test_translations - name: test translations - entry: pytest selfdrive/ui/tests/test_translations.py - language: system - pass_filenames: false - files: '^selfdrive/ui/translations/' -- repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.1 - hooks: - - id: check-github-workflows -- repo: local - hooks: - - id: import-linter - name: import linter - entry: lint-imports - language: system - pass_filenames: false diff --git a/common/params.cc b/common/params.cc index 03a3cc31f12d3a..615dd55abd2d45 100644 --- a/common/params.cc +++ b/common/params.cc @@ -24,8 +24,8 @@ int fsync_dir(const std::string &path) { int result = -1; int fd = HANDLE_EINTR(open(path.c_str(), O_RDONLY, 0755)); if (fd >= 0) { - result = fsync(fd); - close(fd); + result = HANDLE_EINTR(fsync(fd)); + HANDLE_EINTR(close(fd)); } return result; } diff --git a/common/transformations/camera.py b/common/transformations/camera.py index dc3ca5f3887341..2e68b5e37c56c6 100644 --- a/common/transformations/camera.py +++ b/common/transformations/camera.py @@ -47,9 +47,9 @@ def all_cams(self): yield cam, getattr(self, cam) _ar_ox_fisheye = CameraConfig(1928, 1208, 567.0) # focal length probably wrong? magnification is not consistent across frame -_os_fisheye = CameraConfig(2688, 1520, 567.0 / 2 * 3) +_os_fisheye = CameraConfig(2688 // 2, 1520 // 2, 567.0 / 4 * 3) _ar_ox_config = DeviceCameraConfig(CameraConfig(1928, 1208, 2648.0), _ar_ox_fisheye, _ar_ox_fisheye) -_os_config = DeviceCameraConfig(CameraConfig(2688, 1520, 2648.0 * 2 / 3), _os_fisheye, _os_fisheye) +_os_config = DeviceCameraConfig(CameraConfig(2688 // 2, 1520 // 2, 1522.0 * 3 / 4), _os_fisheye, _os_fisheye) _neo_config = DeviceCameraConfig(CameraConfig(1164, 874, 910.0), CameraConfig(816, 612, 650.0), _NoneCameraConfig()) DEVICE_CAMERAS = { diff --git a/docs/WORKFLOW.md b/docs/WORKFLOW.md index 10cf244fd6cc32..477c7511ca6a9c 100644 --- a/docs/WORKFLOW.md +++ b/docs/WORKFLOW.md @@ -29,7 +29,7 @@ pytest cd system/loggerd && pytest . # run the linter -pre-commit run --all +op lint ``` ## Testing diff --git a/opendbc b/opendbc deleted file mode 160000 index 39a5345924d241..00000000000000 --- a/opendbc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 39a5345924d2414f05c40d258d359eb8412a0b03 diff --git a/opendbc b/opendbc new file mode 120000 index 00000000000000..7cd9a5bd1ebf2e --- /dev/null +++ b/opendbc @@ -0,0 +1 @@ +opendbc_repo/opendbc \ No newline at end of file diff --git a/opendbc_repo b/opendbc_repo new file mode 160000 index 00000000000000..a40652d341ea31 --- /dev/null +++ b/opendbc_repo @@ -0,0 +1 @@ +Subproject commit a40652d341ea3161a6a10001fa74284d9d650f8c diff --git a/pyproject.toml b/pyproject.toml index b486df3870e68d..90b6ecf983af06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,6 @@ testing = [ "hypothesis ==6.47.*", "import-linter", "mypy", - "pre-commit", "pytest", "pytest-cov", "pytest-cpp", @@ -87,7 +86,8 @@ testing = [ "pytest-asyncio", "pytest-mock", "pytest-repeat", - "ruff" + "ruff", + "codespell", ] dev = [ @@ -164,6 +164,13 @@ testpaths = [ "cereal/messaging/tests", ] +[tool.codespell] +count = true +quiet-level = 3 +# if you've got a short variable name that's getting flagged, add it here +ignore-words-list = "bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn" +builtin = "clear,rare,informal,usage,code,names,en-GB_to_en-US" + [tool.mypy] python_version = "3.11" plugins = [ diff --git a/release/release_files.py b/release/release_files.py index 1590807435be3b..29d565a952d223 100755 --- a/release/release_files.py +++ b/release/release_files.py @@ -14,8 +14,8 @@ "panda/examples/", "panda/tests/safety/", - "opendbc/.*.dbc$", - "opendbc/generator/", + "opendbc_repo/dbc/.*.dbc$", + "opendbc_repo/dbc/generator/", "cereal/.*test.*", "^common/tests/", @@ -26,7 +26,6 @@ "selfdrive/car/tests/test_models.*", "^tools/", - "^scripts/", "^tinygrad_repo/", "matlab.*.md", @@ -74,55 +73,55 @@ "tinygrad_repo/tinygrad/.*.py", # TODO: do this automatically - "opendbc/comma_body.dbc", - "opendbc/chrysler_ram_hd_generated.dbc", - "opendbc/chrysler_ram_dt_generated.dbc", - "opendbc/chrysler_pacifica_2017_hybrid_generated.dbc", - "opendbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc", - "opendbc/gm_global_a_powertrain_generated.dbc", - "opendbc/gm_global_a_object.dbc", - "opendbc/gm_global_a_chassis.dbc", - "opendbc/FORD_CADS.dbc", - "opendbc/ford_fusion_2018_adas.dbc", - "opendbc/ford_lincoln_base_pt.dbc", - "opendbc/honda_accord_2018_can_generated.dbc", - "opendbc/acura_ilx_2016_can_generated.dbc", - "opendbc/acura_rdx_2018_can_generated.dbc", - "opendbc/acura_rdx_2020_can_generated.dbc", - "opendbc/honda_civic_touring_2016_can_generated.dbc", - "opendbc/honda_civic_hatchback_ex_2017_can_generated.dbc", - "opendbc/honda_crv_touring_2016_can_generated.dbc", - "opendbc/honda_crv_ex_2017_can_generated.dbc", - "opendbc/honda_crv_ex_2017_body_generated.dbc", - "opendbc/honda_crv_executive_2016_can_generated.dbc", - "opendbc/honda_fit_ex_2018_can_generated.dbc", - "opendbc/honda_odyssey_exl_2018_generated.dbc", - "opendbc/honda_odyssey_extreme_edition_2018_china_can_generated.dbc", - "opendbc/honda_insight_ex_2019_can_generated.dbc", - "opendbc/acura_ilx_2016_nidec.dbc", - "opendbc/honda_civic_ex_2022_can_generated.dbc", - "opendbc/hyundai_canfd.dbc", - "opendbc/hyundai_kia_generic.dbc", - "opendbc/hyundai_kia_mando_front_radar_generated.dbc", - "opendbc/mazda_2017.dbc", - "opendbc/nissan_x_trail_2017_generated.dbc", - "opendbc/nissan_leaf_2018_generated.dbc", - "opendbc/subaru_global_2017_generated.dbc", - "opendbc/subaru_global_2020_hybrid_generated.dbc", - "opendbc/subaru_outback_2015_generated.dbc", - "opendbc/subaru_outback_2019_generated.dbc", - "opendbc/subaru_forester_2017_generated.dbc", - "opendbc/toyota_tnga_k_pt_generated.dbc", - "opendbc/toyota_new_mc_pt_generated.dbc", - "opendbc/toyota_nodsu_pt_generated.dbc", - "opendbc/toyota_adas.dbc", - "opendbc/toyota_tss2_adas.dbc", - "opendbc/vw_golf_mk4.dbc", - "opendbc/vw_mqb_2010.dbc", - "opendbc/tesla_can.dbc", - "opendbc/tesla_radar_bosch_generated.dbc", - "opendbc/tesla_radar_continental_generated.dbc", - "opendbc/tesla_powertrain.dbc", + "opendbc_repo/dbc/comma_body.dbc", + "opendbc_repo/dbc/chrysler_ram_hd_generated.dbc", + "opendbc_repo/dbc/chrysler_ram_dt_generated.dbc", + "opendbc_repo/dbc/chrysler_pacifica_2017_hybrid_generated.dbc", + "opendbc_repo/dbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc", + "opendbc_repo/dbc/gm_global_a_powertrain_generated.dbc", + "opendbc_repo/dbc/gm_global_a_object.dbc", + "opendbc_repo/dbc/gm_global_a_chassis.dbc", + "opendbc_repo/dbc/FORD_CADS.dbc", + "opendbc_repo/dbc/ford_fusion_2018_adas.dbc", + "opendbc_repo/dbc/ford_lincoln_base_pt.dbc", + "opendbc_repo/dbc/honda_accord_2018_can_generated.dbc", + "opendbc_repo/dbc/acura_ilx_2016_can_generated.dbc", + "opendbc_repo/dbc/acura_rdx_2018_can_generated.dbc", + "opendbc_repo/dbc/acura_rdx_2020_can_generated.dbc", + "opendbc_repo/dbc/honda_civic_touring_2016_can_generated.dbc", + "opendbc_repo/dbc/honda_civic_hatchback_ex_2017_can_generated.dbc", + "opendbc_repo/dbc/honda_crv_touring_2016_can_generated.dbc", + "opendbc_repo/dbc/honda_crv_ex_2017_can_generated.dbc", + "opendbc_repo/dbc/honda_crv_ex_2017_body_generated.dbc", + "opendbc_repo/dbc/honda_crv_executive_2016_can_generated.dbc", + "opendbc_repo/dbc/honda_fit_ex_2018_can_generated.dbc", + "opendbc_repo/dbc/honda_odyssey_exl_2018_generated.dbc", + "opendbc_repo/dbc/honda_odyssey_extreme_edition_2018_china_can_generated.dbc", + "opendbc_repo/dbc/honda_insight_ex_2019_can_generated.dbc", + "opendbc_repo/dbc/acura_ilx_2016_nidec.dbc", + "opendbc_repo/dbc/honda_civic_ex_2022_can_generated.dbc", + "opendbc_repo/dbc/hyundai_canfd.dbc", + "opendbc_repo/dbc/hyundai_kia_generic.dbc", + "opendbc_repo/dbc/hyundai_kia_mando_front_radar_generated.dbc", + "opendbc_repo/dbc/mazda_2017.dbc", + "opendbc_repo/dbc/nissan_x_trail_2017_generated.dbc", + "opendbc_repo/dbc/nissan_leaf_2018_generated.dbc", + "opendbc_repo/dbc/subaru_global_2017_generated.dbc", + "opendbc_repo/dbc/subaru_global_2020_hybrid_generated.dbc", + "opendbc_repo/dbc/subaru_outback_2015_generated.dbc", + "opendbc_repo/dbc/subaru_outback_2019_generated.dbc", + "opendbc_repo/dbc/subaru_forester_2017_generated.dbc", + "opendbc_repo/dbc/toyota_tnga_k_pt_generated.dbc", + "opendbc_repo/dbc/toyota_new_mc_pt_generated.dbc", + "opendbc_repo/dbc/toyota_nodsu_pt_generated.dbc", + "opendbc_repo/dbc/toyota_adas.dbc", + "opendbc_repo/dbc/toyota_tss2_adas.dbc", + "opendbc_repo/dbc/vw_golf_mk4.dbc", + "opendbc_repo/dbc/vw_mqb_2010.dbc", + "opendbc_repo/dbc/tesla_can.dbc", + "opendbc_repo/dbc/tesla_radar_bosch_generated.dbc", + "opendbc_repo/dbc/tesla_radar_continental_generated.dbc", + "opendbc_repo/dbc/tesla_powertrain.dbc", ] diff --git a/scripts/lint.sh b/scripts/lint.sh new file mode 100755 index 00000000000000..3cf548f2bbb612 --- /dev/null +++ b/scripts/lint.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +cd $DIR/../ + +# TODO: bring back rest of pre-commit checks: +# https://github.com/commaai/openpilot/blob/4b11c9e914707df9def598616995be2a5d355a6a/.pre-commit-config.yaml#L2 + +ruff check . diff --git a/scripts/pyupgrade.sh b/scripts/pyupgrade.sh deleted file mode 100755 index 19aac4b5e23d5c..00000000000000 --- a/scripts/pyupgrade.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -e - -pip install --upgrade pyupgrade - -git ls-files '*.py' | grep -v 'third_party/' | xargs pyupgrade --py311-plus diff --git a/selfdrive/modeld/parse_model_outputs.py b/selfdrive/modeld/parse_model_outputs.py index af57e11d03c7a9..03d03c5e1cc38e 100644 --- a/selfdrive/modeld/parse_model_outputs.py +++ b/selfdrive/modeld/parse_model_outputs.py @@ -42,7 +42,6 @@ def parse_mdn(self, name, outs, in_N=0, out_N=1, out_shape=None): raw = outs[name] raw = raw.reshape((raw.shape[0], max(in_N, 1), -1)) - pred_mu = raw[:,:,:(raw.shape[2] - out_N)//2] n_values = (raw.shape[2] - out_N)//2 pred_mu = raw[:,:,:n_values] pred_std = np.exp(raw[:,:,n_values: 2*n_values]) diff --git a/system/camerad/cameras/camera_common.cc b/system/camerad/cameras/camera_common.cc index 542be29d80aa46..6c745e1cde9404 100644 --- a/system/camerad/cameras/camera_common.cc +++ b/system/camerad/cameras/camera_common.cc @@ -15,8 +15,6 @@ #include "CL/cl_ext_qcom.h" #endif -ExitHandler do_exit; - class ImgProc { public: ImgProc(cl_device_id device_id, cl_context context, const CameraBuf *b, const CameraState *s, int buf_width, int uv_offset) { @@ -35,9 +33,11 @@ class ImgProc { krnl_ = CL_CHECK_ERR(clCreateKernel(prg_imgproc, "process_raw", &err)); CL_CHECK(clReleaseProgram(prg_imgproc)); + const cl_queue_properties props[] = {0}; //CL_QUEUE_PRIORITY_KHR, CL_QUEUE_PRIORITY_HIGH_KHR, 0}; + queue = CL_CHECK_ERR(clCreateCommandQueueWithProperties(context, device_id, props, &err)); } - void queue(cl_command_queue q, cl_mem cam_buf_cl, cl_mem buf_cl, int width, int height, cl_event *imgproc_event, int expo_time) { + void runKernel(cl_mem cam_buf_cl, cl_mem buf_cl, int width, int height, int expo_time) { CL_CHECK(clSetKernelArg(krnl_, 0, sizeof(cl_mem), &cam_buf_cl)); CL_CHECK(clSetKernelArg(krnl_, 1, sizeof(cl_mem), &buf_cl)); CL_CHECK(clSetKernelArg(krnl_, 2, sizeof(cl_int), &expo_time)); @@ -45,15 +45,21 @@ class ImgProc { const size_t globalWorkSize[] = {size_t(width / 2), size_t(height / 2)}; const int imgproc_local_worksize = 16; const size_t localWorkSize[] = {imgproc_local_worksize, imgproc_local_worksize}; - CL_CHECK(clEnqueueNDRangeKernel(q, krnl_, 2, NULL, globalWorkSize, localWorkSize, 0, 0, imgproc_event)); + + cl_event event; + CL_CHECK(clEnqueueNDRangeKernel(queue, krnl_, 2, NULL, globalWorkSize, localWorkSize, 0, 0, &event)); + clWaitForEvents(1, &event); + CL_CHECK(clReleaseEvent(event)); } ~ImgProc() { CL_CHECK(clReleaseKernel(krnl_)); + CL_CHECK(clReleaseCommandQueue(queue)); } private: cl_kernel krnl_; + cl_command_queue queue; }; void CameraBuf::init(cl_device_id device_id, cl_context context, CameraState *s, VisionIpcServer * v, int frame_cnt, VisionStreamType type) { @@ -84,15 +90,12 @@ void CameraBuf::init(cl_device_id device_id, cl_context context, CameraState *s, // the encoder HW tells us the size it wants after setting it up. // TODO: VENUS_BUFFER_SIZE should give the size, but it's too small. dependent on encoder settings? - size_t nv12_size = (rgb_width >= 2688 ? 2900 : 2346)*nv12_width; + size_t nv12_size = (rgb_width <= 1344 ? 2900 : 2346)*nv12_width; vipc_server->create_buffers_with_sizes(stream_type, YUV_BUFFER_COUNT, false, rgb_width, rgb_height, nv12_size, nv12_width, nv12_uv_offset); LOGD("created %d YUV vipc buffers with size %dx%d", YUV_BUFFER_COUNT, nv12_width, nv12_height); imgproc = new ImgProc(device_id, context, this, s, nv12_width, nv12_uv_offset); - - const cl_queue_properties props[] = {0}; //CL_QUEUE_PRIORITY_KHR, CL_QUEUE_PRIORITY_HIGH_KHR, 0}; - q = CL_CHECK_ERR(clCreateCommandQueueWithProperties(context, device_id, props, &err)); } CameraBuf::~CameraBuf() { @@ -100,7 +103,6 @@ CameraBuf::~CameraBuf() { camera_bufs[i].free(); } if (imgproc) delete imgproc; - if (q) CL_CHECK(clReleaseCommandQueue(q)); } bool CameraBuf::acquire() { @@ -116,10 +118,7 @@ bool CameraBuf::acquire() { cur_camera_buf = &camera_bufs[cur_buf_idx]; double start_time = millis_since_boot(); - cl_event event; - imgproc->queue(q, camera_bufs[cur_buf_idx].buf_cl, cur_yuv_buf->buf_cl, rgb_width, rgb_height, &event, cur_frame_data.integ_lines); - clWaitForEvents(1, &event); - CL_CHECK(clReleaseEvent(event)); + imgproc->runKernel(camera_bufs[cur_buf_idx].buf_cl, cur_yuv_buf->buf_cl, rgb_width, rgb_height, cur_frame_data.integ_lines); cur_frame_data.processing_time = (millis_since_boot() - start_time) / 1000.0; VisionIpcBufExtra extra = { diff --git a/system/camerad/cameras/camera_common.h b/system/camerad/cameras/camera_common.h index d58f4d3195fdec..7c2fbaeec8656e 100644 --- a/system/camerad/cameras/camera_common.h +++ b/system/camerad/cameras/camera_common.h @@ -53,7 +53,6 @@ class CameraBuf { int frame_buf_count; public: - cl_command_queue q; FrameMetadata cur_frame_data; VisionBuf *cur_yuv_buf; VisionBuf *cur_camera_buf; diff --git a/system/camerad/cameras/camera_qcom2.cc b/system/camerad/cameras/camera_qcom2.cc index 2729aa264c1590..0648ddf4dede34 100644 --- a/system/camerad/cameras/camera_qcom2.cc +++ b/system/camerad/cameras/camera_qcom2.cc @@ -24,7 +24,7 @@ const int MIPI_SETTLE_CNT = 33; // Calculated by camera_freqs.py // For debugging: // echo "4294967295" > /sys/module/cam_debug_util/parameters/debug_mdl -extern ExitHandler do_exit; +ExitHandler do_exit; CameraState::CameraState(MultiCameraState *multi_camera_state, const CameraConfig &config) : multi_cam_state(multi_camera_state), @@ -345,7 +345,7 @@ void CameraState::config_isp(int io_mem_handle, int fence, int request_id, int b void CameraState::enqueue_buffer(int i, bool dp) { int ret; - int request_id = request_ids[i]; + uint64_t request_id = request_ids[i]; if (buf_handle[i] && sync_objs[i]) { // wait @@ -386,7 +386,7 @@ void CameraState::enqueue_buffer(int i, bool dp) { req_mgr_sched_request.req_id = request_id; ret = do_cam_control(multi_cam_state->video0_fd, CAM_REQ_MGR_SCHED_REQ, &req_mgr_sched_request, sizeof(req_mgr_sched_request)); if (ret != 0) { - LOGE("failed to schedule cam mgr request: %d %d", ret, request_id); + LOGE("failed to schedule cam mgr request: %d %lu", ret, request_id); } // poke sensor, must happen after schedule @@ -396,8 +396,8 @@ void CameraState::enqueue_buffer(int i, bool dp) { config_isp(buf_handle[i], sync_objs[i], request_id, buf0_handle, 65632*(i+1)); } -void CameraState::enqueue_req_multi(int start, int n, bool dp) { - for (int i=start; iu.frame_msg.link_hdl == link_handle); uint64_t timestamp = event_data->u.frame_msg.timestamp; - int main_id = event_data->u.frame_msg.frame_id; - int real_id = event_data->u.frame_msg.request_id; + uint64_t main_id = event_data->u.frame_msg.frame_id; + uint64_t real_id = event_data->u.frame_msg.request_id; if (real_id != 0) { // next ready if (real_id == 1) {idx_offset = main_id;} @@ -799,7 +799,7 @@ void CameraState::handle_camera_event(void *evdat) { // check for dropped requests if (real_id > request_id_last + 1) { - LOGE("camera %d dropped requests %d %d", camera_num, real_id, request_id_last); + LOGE("camera %d dropped requests %ld %ld", camera_num, real_id, request_id_last); enqueue_req_multi(request_id_last + 1 + FRAME_BUF_COUNT, real_id - (request_id_last + 1), 0); } diff --git a/system/camerad/cameras/camera_qcom2.h b/system/camerad/cameras/camera_qcom2.h index 1b27fb18b83bbd..02ebeb71f31296 100644 --- a/system/camerad/cameras/camera_qcom2.h +++ b/system/camerad/cameras/camera_qcom2.h @@ -105,17 +105,17 @@ class CameraState { int buf0_handle = 0; int buf_handle[FRAME_BUF_COUNT] = {}; int sync_objs[FRAME_BUF_COUNT] = {}; - int request_ids[FRAME_BUF_COUNT] = {}; - int request_id_last = 0; - int frame_id_last = 0; - int idx_offset = 0; + uint64_t request_ids[FRAME_BUF_COUNT] = {}; + uint64_t request_id_last = 0; + uint64_t frame_id_last = 0; + uint64_t idx_offset = 0; bool skipped = true; CameraBuf buf; MemoryManager mm; void config_isp(int io_mem_handle, int fence, int request_id, int buf0_mem_handle, int buf0_offset); - void enqueue_req_multi(int start, int n, bool dp); + void enqueue_req_multi(uint64_t start, int n, bool dp); void enqueue_buffer(int i, bool dp); int clear_req_queue(); diff --git a/system/camerad/sensors/os04c10.cc b/system/camerad/sensors/os04c10.cc index 97a317407ab1e1..e651d6ff7ac762 100644 --- a/system/camerad/sensors/os04c10.cc +++ b/system/camerad/sensors/os04c10.cc @@ -20,12 +20,12 @@ const uint32_t os04c10_analog_gains_reg[] = { OS04C10::OS04C10() { image_sensor = cereal::FrameData::ImageSensor::OS04C10; - pixel_size_mm = 0.002; + pixel_size_mm = 0.004; data_word = false; hdr_offset = 64 * 2 + 8; // stagger - frame_width = 2688; - frame_height = 1520 * 2 + hdr_offset; + frame_width = 1344; + frame_height = 760 * 2 + hdr_offset; frame_stride = (frame_width * 10 / 8); // no alignment extra_height = 0; diff --git a/system/camerad/sensors/os04c10_registers.h b/system/camerad/sensors/os04c10_registers.h index 91eb48b24f6d54..d698b1311f5682 100644 --- a/system/camerad/sensors/os04c10_registers.h +++ b/system/camerad/sensors/os04c10_registers.h @@ -95,7 +95,7 @@ const struct i2c_random_wr_payload init_array_os04c10[] = { {0x388b, 0x00}, {0x3c80, 0x10}, {0x3c86, 0x00}, - // {0x3c8c, 0x20}, + {0x3c8c, 0x20}, {0x3c9f, 0x01}, {0x3d85, 0x1b}, {0x3d8c, 0x71}, @@ -199,7 +199,7 @@ const struct i2c_random_wr_payload init_array_os04c10[] = { {0x370b, 0xa2}, {0x370c, 0x01}, {0x370f, 0x00}, - {0x3714, 0x24}, + {0x3714, 0x28}, {0x3716, 0x04}, {0x3719, 0x11}, {0x371a, 0x1e}, @@ -231,24 +231,24 @@ const struct i2c_random_wr_payload init_array_os04c10[] = { {0x37bd, 0x01}, {0x37bf, 0x26}, {0x37c0, 0x11}, - {0x37c2, 0x04}, + {0x37c2, 0x14}, {0x37cd, 0x19}, - // {0x37e0, 0x08}, - // {0x37e6, 0x04}, + {0x37e0, 0x08}, + {0x37e6, 0x04}, {0x37e5, 0x02}, - // {0x37e1, 0x0c}, - // {0x3737, 0x04}, + {0x37e1, 0x0c}, + {0x3737, 0x04}, {0x37d8, 0x02}, - // {0x37e2, 0x10}, + {0x37e2, 0x10}, {0x3739, 0x10}, - {0x3662, 0x10}, - // {0x37e4, 0x20}, - // {0x37e3, 0x08}, - {0x37d9, 0x08}, + {0x3662, 0x08}, + {0x37e4, 0x20}, + {0x37e3, 0x08}, + {0x37d9, 0x04}, {0x4040, 0x00}, - {0x4041, 0x07}, - {0x4008, 0x02}, - {0x4009, 0x0d}, + {0x4041, 0x03}, + {0x4008, 0x01}, + {0x4009, 0x06}, // FSIN {0x3002, 0x22}, @@ -269,20 +269,20 @@ const struct i2c_random_wr_payload init_array_os04c10[] = { {0x3802, 0x00}, {0x3803, 0x00}, {0x3804, 0x0a}, {0x3805, 0x8f}, {0x3806, 0x05}, {0x3807, 0xff}, - {0x3808, 0x0a}, {0x3809, 0x80}, - {0x380a, 0x05}, {0x380b, 0xf0}, + {0x3808, 0x05}, {0x3809, 0x40}, + {0x380a, 0x02}, {0x380b, 0xf8}, {0x3811, 0x08}, {0x3813, 0x08}, - {0x3814, 0x01}, + {0x3814, 0x03}, {0x3815, 0x01}, - {0x3816, 0x01}, + {0x3816, 0x03}, {0x3817, 0x01}, {0x380c, 0x04}, {0x380d, 0x2e}, // HTS {0x380e, 0x09}, {0x380f, 0xdb}, // VTS - {0x3820, 0xb0}, - {0x3821, 0x04}, + {0x3820, 0xb3}, + {0x3821, 0x05}, {0x3880, 0x00}, {0x3882, 0x20}, {0x3c91, 0x0b}, diff --git a/system/loggerd/loggerd.cc b/system/loggerd/loggerd.cc index a324479fb5de8f..c9632c0dd60c7c 100644 --- a/system/loggerd/loggerd.cc +++ b/system/loggerd/loggerd.cc @@ -15,8 +15,8 @@ ExitHandler do_exit; struct LoggerdState { LoggerState logger; - std::atomic last_camera_seen_tms; - std::atomic ready_to_rotate; // count of encoders ready to rotate + std::atomic last_camera_seen_tms{0.0}; + std::atomic ready_to_rotate{0}; // count of encoders ready to rotate int max_waiting = 0; double last_rotate_tms = 0.; // last rotate time in ms }; diff --git a/system/loggerd/tests/test_loggerd.py b/system/loggerd/tests/test_loggerd.py index 6a24540acf7510..cfd12477029b81 100644 --- a/system/loggerd/tests/test_loggerd.py +++ b/system/loggerd/tests/test_loggerd.py @@ -7,7 +7,7 @@ import time from collections import defaultdict from pathlib import Path -from flaky import flaky +import pytest import cereal.messaging as messaging from cereal import log @@ -136,7 +136,7 @@ def test_init_data_values(self): assert getattr(initData, initData_key) == v assert logged_params[param_key].decode() == v - @flaky(max_runs=3) + @pytest.mark.skip("FIXME: encoderd sometimes crashes in CI when running with pytest-xdist") def test_rotation(self): os.environ["LOGGERD_TEST"] = "1" Params().put("RecordFront", "1") diff --git a/tools/cabana/SConscript b/tools/cabana/SConscript index 04b768dc695a12..911ac9324c7751 100644 --- a/tools/cabana/SConscript +++ b/tools/cabana/SConscript @@ -16,7 +16,7 @@ qt_libs = ['qt_util'] + base_libs cabana_env = qt_env.Clone() cabana_libs = [widgets, cereal, messaging, visionipc, replay_lib, 'panda', 'avutil', 'avcodec', 'avformat', 'bz2', 'zstd', 'curl', 'yuv', 'usb-1.0'] + qt_libs -opendbc_path = '-DOPENDBC_FILE_PATH=\'"%s"\'' % (cabana_env.Dir("../../opendbc").abspath) +opendbc_path = '-DOPENDBC_FILE_PATH=\'"%s"\'' % (cabana_env.Dir("../../opendbc/dbc").abspath) cabana_env['CXXFLAGS'] += [opendbc_path] # build assets diff --git a/tools/install_python_dependencies.sh b/tools/install_python_dependencies.sh index a90462888fb80f..8d118525a52b77 100755 --- a/tools/install_python_dependencies.sh +++ b/tools/install_python_dependencies.sh @@ -43,9 +43,3 @@ if [[ "$(uname)" == 'Darwin' ]]; then echo "export ZMQ=1" >> $ROOT/.env echo "export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES" >> $ROOT/.env fi - -if [ "$(uname)" != "Darwin" ] && [ -e "$ROOT/.git" ]; then - echo "pre-commit hooks install..." - pre-commit install - git submodule foreach pre-commit install -fi diff --git a/tools/install_ubuntu_dependencies.sh b/tools/install_ubuntu_dependencies.sh index 67b28fa2806234..a7cf0e75c3eeff 100755 --- a/tools/install_ubuntu_dependencies.sh +++ b/tools/install_ubuntu_dependencies.sh @@ -12,6 +12,11 @@ if [[ ! $(id -u) -eq 0 ]]; then SUDO="sudo" fi +# Check if stdin is open +if [ -t 0 ]; then + INTERACTIVE=1 +fi + # Install common packages function install_ubuntu_common_requirements() { $SUDO apt-get update @@ -133,7 +138,7 @@ if [ -f "/etc/os-release" ]; then esac # Install extra packages - if [[ -z "$INSTALL_EXTRA_PACKAGES" ]]; then + if [[ -z "$INSTALL_EXTRA_PACKAGES" && -n "$INTERACTIVE" ]]; then read -p "Base setup done. Do you want to install extra development packages? [Y/n]: " -n 1 -r echo "" if [[ $REPLY =~ ^[Yy]$ ]]; then diff --git a/tools/op.sh b/tools/op.sh index 3ebd413a799b28..e578459ae0c515 100755 --- a/tools/op.sh +++ b/tools/op.sh @@ -1,24 +1,28 @@ #!/usr/bin/env bash +if [[ ! "${BASH_SOURCE[0]}" = "${0}" ]]; then + echo "Invalid invocation! This script must not be sourced." + echo "Run 'op.sh' directly or check your .bashrc for a valid alias" + return 0 +fi + +set -e + RED='\033[0;31m' GREEN='\033[0;32m' UNDERLINE='\033[4m' BOLD='\033[1m' NC='\033[0m' +RC_FILE="${HOME}/.$(basename ${SHELL})rc" +if [ "$(uname)" == "Darwin" ] && [ $SHELL == "/bin/bash" ]; then + RC_FILE="$HOME/.bash_profile" +fi function op_install() { - (set -e - echo "Installing op system-wide..." - RC_FILE="${HOME}/.$(basename ${SHELL})rc" - if [ "$(uname)" == "Darwin" ] && [ $SHELL == "/bin/bash" ]; then - RC_FILE="$HOME/.bash_profile" - fi - CMD="\nalias op='source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )/op.sh" \"\$@\"'\n" + CMD="\nalias op='"$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )/op.sh" \"\$@\"'\n" grep "alias op=" "$RC_FILE" &> /dev/null || printf "$CMD" >> $RC_FILE echo -e " ↳ [${GREEN}✔${NC}] op installed successfully. Open a new shell to use it.\n" - - ) } function op_run_command() { @@ -55,8 +59,6 @@ function op_check_openpilot_dir() { } function op_check_git() { - (set -e - echo "Checking for git..." if ! command -v "git" > /dev/null 2>&1; then echo -e " ↳ [${RED}✗${NC}] git not found on your system!" @@ -81,13 +83,9 @@ function op_check_git() { fi done echo -e " ↳ [${GREEN}✔${NC}] git submodules found." - - ) } function op_check_os() { - (set -e - echo "Checking for compatible os version..." if [[ "$OSTYPE" == "linux-gnu"* ]]; then @@ -113,13 +111,9 @@ function op_check_os() { echo -e " ↳ [${RED}✗${NC}] OS type $OSTYPE not supported!" return 1 fi - - ) } function op_check_python() { - (set -e - echo "Checking for compatible python version..." REQUIRED_PYTHON_VERSION=$(grep "requires-python" $OPENPILOT_ROOT/pyproject.toml) INSTALLED_PYTHON_VERSION=$(python3 --version 2> /dev/null || true) @@ -127,14 +121,12 @@ function op_check_python() { if [[ -z $INSTALLED_PYTHON_VERSION ]]; then echo -e " ↳ [${RED}✗${NC}] python3 not found on your system. You need python version at least $(echo $REQUIRED_PYTHON_VERSION | tr -d -c '[0-9.]') to continue!" return 1 - elif [[ $(echo $INSTALLED_PYTHON_VERSION | tr -d -c '[0-9]') -ge $(($(echo $REQUIRED_PYTHON_VERSION | tr -d -c '[0-9]') * 10)) ]]; then + elif [[ $(echo $INSTALLED_PYTHON_VERSION | grep -o '[0-9]\+\.[0-9]\+' | tr -d -c '[0-9]') -ge $(echo $REQUIRED_PYTHON_VERSION | tr -d -c '[0-9]') ]]; then echo -e " ↳ [${GREEN}✔${NC}] $INSTALLED_PYTHON_VERSION detected." else echo -e " ↳ [${RED}✗${NC}] You need python version at least $(echo $REQUIRED_PYTHON_VERSION | tr -d -c '[0-9.]') to continue!" return 1 fi - - ) } function op_check_venv() { @@ -171,8 +163,6 @@ function op_before_cmd() { } function op_setup() { - (set -e - op_get_openpilot_dir cd $OPENPILOT_ROOT @@ -203,8 +193,6 @@ function op_setup() { echo -e " ↳ [${GREEN}✔${NC}] Files pulled successfully in $((et - st)) seconds.\n" op_check - - ) } function op_activate_venv() { @@ -212,99 +200,52 @@ function op_activate_venv() { } function op_venv() { - ( set -e - op_before_cmd - - ) - - if [[ "$?" -eq 0 ]]; then - - if [[ "${BASH_SOURCE[0]}" = "${0}" ]]; then - echo "Run 'op venv' or 'source op.sh venv' to activate your venv!" - return 1 - fi - - # this must be run in the same shell as the user calling "op" - op_get_openpilot_dir - op_run_command source $OPENPILOT_ROOT/.venv/bin/activate - fi + bash --rcfile <(echo "source $RC_FILE; source $OPENPILOT_ROOT/.venv/bin/activate") } function op_check() { - (set -e - VERBOSE=1 op_before_cmd unset VERBOSE - - ) } function op_build() { - (set -e - CDIR=$(pwd) op_before_cmd cd "$CDIR" op_run_command scons $@ - - ) } function op_juggle() { - (set -e - op_before_cmd op_run_command tools/plotjuggler/juggle.py $@ - - ) } function op_lint() { - (set -e - op_before_cmd - op_run_command pre-commit run --all $@ - - ) + op_run_command scripts/lint.sh $@ } function op_test() { - (set -e - op_before_cmd op_run_command pytest $@ - - ) } function op_replay() { - (set -e - op_before_cmd op_run_command tools/replay/replay $@ - - ) } function op_cabana() { - (set -e - op_before_cmd op_run_command tools/cabana/cabana $@ - - ) } function op_sim() { - (set -e - op_before_cmd op_run_command exec tools/sim/run_bridge.py & op_run_command exec tools/sim/launch_openpilot.sh - - ) } function op_default() { @@ -331,7 +272,7 @@ function op_default() { echo -e " ${BOLD}juggle${NC} Run Plotjuggler" echo -e " ${BOLD}replay${NC} Run replay" echo -e " ${BOLD}cabana${NC} Run cabana" - echo -e " ${BOLD}lint${NC} Run all the pre-commit checks" + echo -e " ${BOLD}lint${NC} Run the linter" echo -e " ${BOLD}test${NC} Run all unit tests from pytest" echo -e " ${BOLD}help${NC} Show this message" echo -e " ${BOLD}install${NC} Install the 'op' tool system wide" @@ -387,36 +328,3 @@ function _op() { } _op $@ - -# remove from env -unset -f _op -unset -f op_check -unset -f op_setup -unset -f op_build -unset -f op_juggle -unset -f op_venv -unset -f op_check_openpilot_dir -unset -f op_check_git -unset -f op_check_python -unset -f op_check_os -unset -f op_install -unset -f op_default -unset -f op_run_command -unset -f op_lint -unset -f op_replay -unset -f op_cabana -unset -f op_check_venv -unset -f op_before_cmd -unset -f op_sim -unset -f op_activate_venv -unset -f op_get_openpilot_dir -unset -f op_test -unset DRY -unset NC -unset RED -unset GREEN -unset UNDERLINE -unset BOLD -unset OPENPILOT_ROOT -unset NO_VERIFY -unset VERBOSE diff --git a/tools/setup.sh b/tools/setup.sh index e770ba48aa22a5..b2b9563d30356f 100755 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -73,9 +73,14 @@ function check_dir() { return 1 fi + # already a "valid" openpilot clone, skip cloning again + if [[ ! -z "$(ls -A $OPENPILOT_ROOT)" ]]; then + SKIP_GIT_CLONE=1 + fi + # by default, don't try installing in already existing directory if [[ -z $INTERACTIVE ]]; then - return 1 + return 0 fi read -p " Would you like to attempt installation anyway? [Y/n] " -n 1 -r @@ -84,11 +89,6 @@ function check_dir() { return 1 fi - # already a "valid" openpilot clone, skip cloning again - if [[ ! -z "$(ls -A $OPENPILOT_ROOT)" ]]; then - SKIP_GIT_CLONE=1 - fi - return 0 fi @@ -123,10 +123,10 @@ function git_clone() { function install_with_op() { cd $OPENPILOT_ROOT $OPENPILOT_ROOT/tools/op.sh install - $OPENPILOT_ROOT/tools/op.sh setup + $OPENPILOT_ROOT/tools/op.sh setup || (echo -e "\n[${RED}✗${NC}] failed to install openpilot!" && return 1) echo -e "\n----------------------------------------------------------------------" - echo -e "openpilot was successfully installed into ${BOLD}$OPENPILOT_ROOT${NC}" + echo -e "[${GREEN}✔${NC}] openpilot was successfully installed into ${BOLD}$OPENPILOT_ROOT${NC}" echo -e "Checkout the docs at https://docs.comma.ai" echo -e "Checkout how to contribute at https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md" } diff --git a/uv.lock b/uv.lock index 7afdbb3c655d4f..6876de533c0680 100644 --- a/uv.lock +++ b/uv.lock @@ -1,10 +1,5 @@ version = 1 requires-python = ">=3.11" -environment-markers = [ - "python_version == '3.12' and platform_machine == 'aarch64'", - "python_version == '3.12' and platform_machine == 'aarch64' and (python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64')", - "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'", -] [[distribution]] name = "aiohttp" @@ -179,9 +174,6 @@ wheels = [ name = "casadi" version = "3.6.5" source = { registry = "https://pypi.org/simple" } -environment-markers = [ - "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'", -] dependencies = [ { name = "numpy", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, ] @@ -208,11 +200,8 @@ wheels = [ name = "casadi" version = "3.6.6" source = { url = "https://github.com/commaai/casadi/releases/download/nightly-release-3.6.6/casadi-3.6.6-cp312-none-manylinux2014_aarch64.whl" } -environment-markers = [ - "python_version == '3.12' and platform_machine == 'aarch64'", -] dependencies = [ - { name = "numpy", marker = "python_version == '3.12' and platform_machine == 'aarch64'" }, + { name = "numpy" }, ] wheels = [ { url = "https://github.com/commaai/casadi/releases/download/nightly-release-3.6.6/casadi-3.6.6-cp312-none-manylinux2014_aarch64.whl", hash = "sha256:06a15e0099657b960620a2491e565c7f126030018da80c39f6bd33439160c669" }, @@ -259,15 +248,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e9/63/e285470a4880a4f36edabe4810057bd4b562c6ddcc165eacf9c3c7210b40/cffi-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235", size = 181956 }, ] -[[distribution]] -name = "cfgv" -version = "3.4.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/11/74/539e56497d9bd1d484fd863dd69cbbfa653cd2aa27abfe35653494d85e94/cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560", size = 7114 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9", size = 7249 }, -] - [[distribution]] name = "charset-normalizer" version = "3.3.2" @@ -328,6 +308,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/96/43/dae06432d0c4b1dc9e9149ad37b4ca8384cf6eb7700cd9215b177b914f0a/cloudpickle-3.0.0-py3-none-any.whl", hash = "sha256:246ee7d0c295602a036e86369c77fecda4ab17b506496730f2f576d9016fd9c7", size = 20088 }, ] +[[distribution]] +name = "codespell" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a0/a9/98353dfc7afcdf18cffd2dd3e959a25eaaf2728cf450caa59af89648a8e4/codespell-2.3.0.tar.gz", hash = "sha256:360c7d10f75e65f67bad720af7007e1060a5d395670ec11a7ed1fed9dd17471f", size = 329791 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0e/20/b6019add11e84f821184234cea0ad91442373489ef7ccfa3d73a71b908fa/codespell-2.3.0-py3-none-any.whl", hash = "sha256:a9c7cef2501c9cfede2110fd6d4e5e62296920efe9abfb84648df866e47f58d1", size = 329167 }, +] + [[distribution]] name = "colorama" version = "0.4.6" @@ -486,15 +475,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/47/ef/4cb333825d10317a36a1154341ba37e6e9c087bac99c1990ef07ffdb376f/dictdiffer-0.9.0-py2.py3-none-any.whl", hash = "sha256:442bfc693cfcadaf46674575d2eba1c53b42f5e404218ca2c2ff549f2df56595", size = 16754 }, ] -[[distribution]] -name = "distlib" -version = "0.3.8" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c4/91/e2df406fb4efacdf46871c25cde65d3c6ee5e173b7e5a4547a47bae91920/distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64", size = 609931 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/8e/41/9307e4f5f9976bc8b7fea0b66367734e8faf3ec84bc0d412d8cfabbb66cd/distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784", size = 468850 }, -] - [[distribution]] name = "dnspython" version = "2.6.1" @@ -762,15 +742,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d3/a7/389bbaade2cbbb2534cb2715986041ed01c6d792152c527e71f7f68e93b5/hypothesis-6.47.5-py3-none-any.whl", hash = "sha256:87049b781ee11ec1c7948565b889ab02e428a1e32d427ab4de8fdb3649242d06", size = 387311 }, ] -[[distribution]] -name = "identify" -version = "2.6.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/32/f4/8e8f7db397a7ce20fbdeac5f25adaf567fc362472432938d25556008e03a/identify-2.6.0.tar.gz", hash = "sha256:cb171c685bdc31bcc4c1734698736a7d5b6c8bf2e0c15117f4d469c8640ae5cf", size = 99116 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/24/6c/a4f39abe7f19600b74528d0c717b52fff0b300bb0161081510d39c53cb00/identify-2.6.0-py2.py3-none-any.whl", hash = "sha256:e79ae4406387a9d300332b5fd366d8994f1525e8414984e1a59e058b2eda2dd0", size = 98962 }, -] - [[distribution]] name = "idna" version = "3.7" @@ -1081,28 +1052,28 @@ name = "metadrive-simulator" version = "0.4.2.3" source = { git = "https://github.com/commaai/metadrive?rev=opencv_headless#9b6ddb791919249effa0573883076681514787e4" } dependencies = [ - { name = "filelock", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "geopandas", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "gymnasium", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "lxml", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "matplotlib", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "numpy", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "opencv-python-headless", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "panda3d", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "panda3d-gltf", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "pandas", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "pillow", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "progressbar", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "psutil", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "pygame", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "pygments", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "pytest", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "requests", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "scipy", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "seaborn", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "shapely", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "tqdm", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, - { name = "yapf", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'" }, + { name = "filelock" }, + { name = "geopandas" }, + { name = "gymnasium" }, + { name = "lxml" }, + { name = "matplotlib" }, + { name = "numpy" }, + { name = "opencv-python-headless" }, + { name = "panda3d" }, + { name = "panda3d-gltf" }, + { name = "pandas" }, + { name = "pillow" }, + { name = "progressbar" }, + { name = "psutil" }, + { name = "pygame" }, + { name = "pygments" }, + { name = "pytest" }, + { name = "requests" }, + { name = "scipy" }, + { name = "seaborn" }, + { name = "shapely" }, + { name = "tqdm" }, + { name = "yapf" }, ] [[distribution]] @@ -1169,7 +1140,6 @@ version = "1.30.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cryptography", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pyjwt", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, { name = "pyjwt", extra = ["crypto"] }, { name = "requests", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, ] @@ -1271,15 +1241,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ef/82/7a9d0550484a62c6da82858ee9419f3dd1ccc9aa1c26a1e43da3ecd20b0d/natsort-8.4.0-py3-none-any.whl", hash = "sha256:4732914fb471f56b5cce04d7bae6f164a592c7712e1c85f9ef585e197299521c", size = 38268 }, ] -[[distribution]] -name = "nodeenv" -version = "1.9.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314 }, -] - [[distribution]] name = "numpy" version = "1.26.4" @@ -1404,8 +1365,8 @@ dependencies = [ { name = "libusb1", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, { name = "numpy", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, { name = "onnx", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "onnxruntime", marker = "platform_machine == 'aarch64' and platform_system == 'Linux'" }, - { name = "onnxruntime-gpu", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, + { name = "onnxruntime", marker = "(python_version == '3.12' and platform_machine == 'aarch64' and platform_system == 'Linux') or (python_version == '3.12' and platform_machine == 'aarch64' and platform_system == 'Linux' and (python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64')) or (platform_machine == 'aarch64' and platform_system == 'Linux' and (python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'))" }, + { name = "onnxruntime-gpu", marker = "platform_machine == 'x86_64' and platform_system == 'Linux' and (python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64')" }, { name = "psutil", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, { name = "pyaudio", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, { name = "pycapnp", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, @@ -1419,7 +1380,7 @@ dependencies = [ { name = "setuptools", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, { name = "smbus2", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, { name = "sounddevice", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "spidev", marker = "platform_system == 'Linux'" }, + { name = "spidev", marker = "(python_version == '3.12' and platform_machine == 'aarch64' and platform_system == 'Linux') or (python_version == '3.12' and platform_machine == 'aarch64' and platform_system == 'Linux' and (python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64')) or (platform_system == 'Linux' and (python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64'))" }, { name = "sympy", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, { name = "tqdm", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, { name = "websocket-client", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, @@ -1428,49 +1389,49 @@ dependencies = [ [distribution.optional-dependencies] dev = [ - { name = "av", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "azure-identity", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "azure-storage-blob", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "dictdiffer", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "flaky", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "inputs", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "lru-dict", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "matplotlib", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, + { name = "av" }, + { name = "azure-identity" }, + { name = "azure-storage-blob" }, + { name = "dictdiffer" }, + { name = "flaky" }, + { name = "inputs" }, + { name = "lru-dict" }, + { name = "matplotlib" }, { name = "metadrive-simulator", marker = "platform_machine != 'aarch64'" }, - { name = "parameterized", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pyautogui", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, + { name = "parameterized" }, + { name = "pyautogui" }, { name = "pyopencl", marker = "platform_machine != 'aarch64'" }, - { name = "pyprof2calltree", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, + { name = "pyprof2calltree" }, { name = "pyqt5", marker = "platform_machine == 'x86_64'" }, { name = "pytools", marker = "platform_machine != 'aarch64'" }, - { name = "pywinctl", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "rerun-sdk", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "tabulate", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "types-requests", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "types-tabulate", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, + { name = "pywinctl" }, + { name = "rerun-sdk" }, + { name = "tabulate" }, + { name = "types-requests" }, + { name = "types-tabulate" }, ] docs = [ - { name = "jinja2", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "mkdocs", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "natsort", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, + { name = "jinja2" }, + { name = "mkdocs" }, + { name = "natsort" }, ] testing = [ - { name = "coverage", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "hypothesis", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "import-linter", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "mypy", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pre-commit", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pytest", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pytest-asyncio", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pytest-cov", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pytest-cpp", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pytest-mock", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pytest-randomly", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pytest-repeat", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pytest-subtests", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pytest-timeout", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pytest-xdist", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "ruff", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, + { name = "codespell" }, + { name = "coverage" }, + { name = "hypothesis" }, + { name = "import-linter" }, + { name = "mypy" }, + { name = "pytest" }, + { name = "pytest-asyncio" }, + { name = "pytest-cov" }, + { name = "pytest-cpp" }, + { name = "pytest-mock" }, + { name = "pytest-randomly" }, + { name = "pytest-repeat" }, + { name = "pytest-subtests" }, + { name = "pytest-timeout" }, + { name = "pytest-xdist" }, + { name = "ruff" }, ] [[distribution]] @@ -1643,22 +1604,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9b/fb/a70a4214956182e0d7a9099ab17d50bfcba1056188e9b14f35b9e2b62a0d/portalocker-2.10.1-py3-none-any.whl", hash = "sha256:53a5984ebc86a025552264b459b46a2086e269b21823cb572f8f28ee759e45bf", size = 18423 }, ] -[[distribution]] -name = "pre-commit" -version = "3.8.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cfgv", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "identify", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "nodeenv", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "pyyaml", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "virtualenv", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/64/10/97ee2fa54dff1e9da9badbc5e35d0bbaef0776271ea5907eccf64140f72f/pre_commit-3.8.0.tar.gz", hash = "sha256:8bb6494d4a20423842e198980c9ecf9f96607a07ea29549e180eef9ae80fe7af", size = 177815 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/07/92/caae8c86e94681b42c246f0bca35c059a2f0529e5b92619f6aba4cf7e7b6/pre_commit-3.8.0-py2.py3-none-any.whl", hash = "sha256:9a90a53bf82fdd8778d58085faf8d83df56e40dfe18f45b19446e26bf1b3a63f", size = 204643 }, -] - [[distribution]] name = "progressbar" version = "2.5" @@ -5170,20 +5115,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ca/1c/89ffc63a9605b583d5df2be791a27bc1a42b7c32bab68d3c8f2f73a98cd4/urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472", size = 121444 }, ] -[[distribution]] -name = "virtualenv" -version = "20.26.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "distlib", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "filelock", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, - { name = "platformdirs", marker = "python_version < '3.12' or python_version > '3.12' or platform_machine != 'aarch64' or (python_version == '3.12' and platform_machine == 'aarch64')" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/68/60/db9f95e6ad456f1872486769c55628c7901fb4de5a72c2f7bdd912abf0c1/virtualenv-20.26.3.tar.gz", hash = "sha256:4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a", size = 9057588 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/07/4d/410156100224c5e2f0011d435e477b57aed9576fc7fe137abcf14ec16e11/virtualenv-20.26.3-py3-none-any.whl", hash = "sha256:8cc4a31139e796e9a7de2cd5cf2489de1217193116a8fd42328f1bd65f434589", size = 5684792 }, -] - [[distribution]] name = "watchdog" version = "4.0.1"