diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7c1a64..1243b2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,13 +36,13 @@ jobs: run: ./scripts/lint build: - if: github.repository == 'stainless-sdks/benchify-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork timeout-minutes: 10 name: build permissions: contents: read id-token: write - runs-on: depot-ubuntu-24.04 + runs-on: ${{ github.repository == 'stainless-sdks/benchify-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - uses: actions/checkout@v4 @@ -61,12 +61,14 @@ jobs: run: rye build - name: Get GitHub OIDC Token + if: github.repository == 'stainless-sdks/benchify-python' id: github-oidc uses: actions/github-script@v6 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball + if: github.repository == 'stainless-sdks/benchify-python' env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6b7b74c..da59f99 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.0" + ".": "0.4.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 852af64..e86ce84 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-882428dc42061ac58fad8814f920a7afec0a8fb54bb744e8e709b27156b8afb3.yml -openapi_spec_hash: 4778a24a07fa3aafa7a9befb36579c19 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-ab558f95704950c728ee836f3478686714fc4656096d3c3c33ffcedcd5df531f.yml +openapi_spec_hash: 5b3cfc31b1cf87e0ca4ddc57a5a97e3d config_hash: 935baad1727a1116efdc14e9ce6e4405 diff --git a/CHANGELOG.md b/CHANGELOG.md index 63f4c90..5f55c89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## 0.4.0 (2025-08-28) + +Full Changelog: [v0.3.0...v0.4.0](https://github.com/Benchify/benchify-sdk-python/compare/v0.3.0...v0.4.0) + +### Features + +* **api:** api update ([07eecd5](https://github.com/Benchify/benchify-sdk-python/commit/07eecd55d41eccc9e0458e86953cfd2ace4df597)) +* **api:** api update ([f87668b](https://github.com/Benchify/benchify-sdk-python/commit/f87668b95b3994606ff161fec99b6db3e784dd78)) +* **api:** api update ([54363e0](https://github.com/Benchify/benchify-sdk-python/commit/54363e025d3bc72b709c6396ae0106ebc8ac10e3)) +* **api:** api update ([64bb2c7](https://github.com/Benchify/benchify-sdk-python/commit/64bb2c7146518ea47ac317ca9f8057ff9856b83d)) + + +### Bug Fixes + +* avoid newer type syntax ([a7101dd](https://github.com/Benchify/benchify-sdk-python/commit/a7101dde3a1454ff7cad1fdb75e342a896fe180d)) + + +### Chores + +* **internal:** change ci workflow machines ([266d71e](https://github.com/Benchify/benchify-sdk-python/commit/266d71e50478d32e3f3974bdc53926791437af75)) +* **internal:** update pyright exclude list ([f2e7661](https://github.com/Benchify/benchify-sdk-python/commit/f2e7661d7d4776cdd258671f1da3133d9a9d22a5)) +* update github action ([4b44888](https://github.com/Benchify/benchify-sdk-python/commit/4b44888aed8836ba34f24dade4456e9769334b52)) + ## 0.3.0 (2025-08-18) Full Changelog: [v0.2.0...v0.3.0](https://github.com/Benchify/benchify-sdk-python/compare/v0.2.0...v0.3.0) diff --git a/pyproject.toml b/pyproject.toml index 194096a..0acc12e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "benchify" -version = "0.3.0" +version = "0.4.0" description = "The official Python library for the benchify API" dynamic = ["readme"] license = "Apache-2.0" @@ -148,6 +148,7 @@ exclude = [ "_dev", ".venv", ".nox", + ".git", ] reportImplicitOverride = true diff --git a/src/benchify/_models.py b/src/benchify/_models.py index b8387ce..92f7c10 100644 --- a/src/benchify/_models.py +++ b/src/benchify/_models.py @@ -304,7 +304,7 @@ def model_dump( exclude_none=exclude_none, ) - return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped + return cast("dict[str, Any]", json_safe(dumped)) if mode == "json" else dumped @override def model_dump_json( diff --git a/src/benchify/_version.py b/src/benchify/_version.py index c7dc4f7..3465bfe 100644 --- a/src/benchify/_version.py +++ b/src/benchify/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "benchify" -__version__ = "0.3.0" # x-release-please-version +__version__ = "0.4.0" # x-release-please-version diff --git a/src/benchify/resources/fixer.py b/src/benchify/resources/fixer.py index fc87c29..218d1af 100644 --- a/src/benchify/resources/fixer.py +++ b/src/benchify/resources/fixer.py @@ -49,7 +49,7 @@ def run( *, files: Iterable[fixer_run_params.File], bundle: bool | NotGiven = NOT_GIVEN, - fix_types: List[Literal["import_export", "string_literals", "css", "tailwind", "ai_fallback", "types"]] + fix_types: List[Literal["import_export", "string_literals", "css", "ai_fallback", "types", "sql"]] | NotGiven = NOT_GIVEN, fixes: Optional[fixer_run_params.Fixes] | NotGiven = NOT_GIVEN, meta: Optional[fixer_run_params.Meta] | NotGiven = NOT_GIVEN, @@ -134,7 +134,7 @@ async def run( *, files: Iterable[fixer_run_params.File], bundle: bool | NotGiven = NOT_GIVEN, - fix_types: List[Literal["import_export", "string_literals", "css", "tailwind", "ai_fallback", "types"]] + fix_types: List[Literal["import_export", "string_literals", "css", "ai_fallback", "types", "sql"]] | NotGiven = NOT_GIVEN, fixes: Optional[fixer_run_params.Fixes] | NotGiven = NOT_GIVEN, meta: Optional[fixer_run_params.Meta] | NotGiven = NOT_GIVEN, diff --git a/src/benchify/types/fixer_run_params.py b/src/benchify/types/fixer_run_params.py index 70f83e2..8f2be97 100644 --- a/src/benchify/types/fixer_run_params.py +++ b/src/benchify/types/fixer_run_params.py @@ -17,7 +17,7 @@ class FixerRunParams(TypedDict, total=False): bundle: bool """Whether to bundle the project (experimental)""" - fix_types: List[Literal["import_export", "string_literals", "css", "tailwind", "ai_fallback", "types"]] + fix_types: List[Literal["import_export", "string_literals", "css", "ai_fallback", "types", "sql"]] """Configuration for which fix types to apply""" fixes: Optional[Fixes] diff --git a/src/benchify/types/fixer_run_response.py b/src/benchify/types/fixer_run_response.py index a49d77d..94788d0 100644 --- a/src/benchify/types/fixer_run_response.py +++ b/src/benchify/types/fixer_run_response.py @@ -20,6 +20,20 @@ class DataStatus(BaseModel): + composite_status: Literal[ + "FIXED_EVERYTHING", "FIXED_REQUESTED", "PARTIALLY_FIXED", "NO_REQUESTED_ISSUES", "NO_ISSUES", "FAILED" + ] + + file_to_composite_status: Optional[ + Dict[ + str, + Literal[ + "FIXED_EVERYTHING", "FIXED_REQUESTED", "PARTIALLY_FIXED", "NO_REQUESTED_ISSUES", "NO_ISSUES", "FAILED" + ], + ] + ] = None + """Status of each file.""" + file_to_status: Optional[Dict[str, Literal["FIXED", "PARTIALLY_FIXED", "FAILED", "NO_ISSUES_FOUND"]]] = None """Fix status of each file sent.""" @@ -51,6 +65,11 @@ class Data(BaseModel): bundled_files: Optional[List[FileChange]] = None """Bundled files""" + fix_types_used: Optional[ + List[Literal["import_export", "string_literals", "css", "ai_fallback", "types", "sql"]] + ] = None + """List of fix types that were actually applied during the fixer run""" + suggested_changes: Optional[DataSuggestedChanges] = None """Changes made by the fixer in the requested format"""