From 0d9b37f62ed0190c7798969c8e09833868ebb062 Mon Sep 17 00:00:00 2001 From: Calvin Grunewald Date: Fri, 17 Apr 2026 16:13:30 -0700 Subject: [PATCH] fix(scripts): run ruff from repo root in regenerate_sdk.sh Ensures `uv run` resolves this repo's pyproject.toml regardless of the caller's working directory. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/regenerate_sdk.sh | 9 +++++++-- src/archastro/platform/__init__.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/regenerate_sdk.sh b/scripts/regenerate_sdk.sh index d71d7bd..95b54e2 100755 --- a/scripts/regenerate_sdk.sh +++ b/scripts/regenerate_sdk.sh @@ -75,7 +75,12 @@ npx --yes "$SDK_GENERATOR_SPEC" \ # the repo's style config. The generator emits deliberately plain # Python; this brings it in line with what CI expects. log "Applying ruff lint fixes + format" -uv run ruff check --fix --fix-only src tests >/dev/null -uv run ruff format src tests >/dev/null +# cd into the repo so `uv run` discovers this repo's pyproject.toml +# even when the script is invoked with a different CWD. +( + cd "$REPO_ROOT" + uv run ruff check --fix --fix-only src tests >/dev/null + uv run ruff format src tests >/dev/null +) log "Done. Review the diff and commit, or re-run this script after the spec is updated upstream." diff --git a/src/archastro/platform/__init__.py b/src/archastro/platform/__init__.py index 8444a44..c9b655f 100644 --- a/src/archastro/platform/__init__.py +++ b/src/archastro/platform/__init__.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 2f93d08a58dd +# Content hash: 02004325aba1 from importlib.metadata import version as _pkg_version