diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c0ecf6a..508f13bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,10 +35,10 @@ jobs: - name: Run lints run: ./scripts/lint - upload: + build: if: github.repository == 'stainless-sdks/mixedbread-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) timeout-minutes: 10 - name: upload + name: build permissions: contents: read id-token: write @@ -46,6 +46,20 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Rye + run: | + curl -sSf https://rye.astral.sh/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: '0.44.0' + RYE_INSTALL_OPTION: '--yes' + + - name: Install dependencies + run: rye sync --all-features + + - name: Run build + run: rye build + - name: Get GitHub OIDC Token id: github-oidc uses: actions/github-script@v6 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8f3e0a49..b4e9013b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.15.0" + ".": "0.16.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 970eac21..8071ffce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 49 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-fe968780e87b8a5ff65ea009ade00fb0e27e951f7ce16d39a2ae0957740add45.yml -openapi_spec_hash: 9a29ae1bb05df2061e321b0d1adef675 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-315b0ef2cbe106abc1299563d329b70c233e3bcbe5233db006fa09fbeafb7b62.yml +openapi_spec_hash: 56fa40291a1ee5d7bfcde5654540cba8 config_hash: e4d40031e9232e8e6c16e73430b7f535 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a0b729e..53cb41a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.16.0 (2025-07-02) + +Full Changelog: [v0.15.0...v0.16.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.15.0...v0.16.0) + +### Features + +* **api:** api update ([4ede5dc](https://github.com/mixedbread-ai/mixedbread-python/commit/4ede5dc339b9f37dd3a0be5dbf4c7f9ff1331e2e)) + + +### Chores + +* **ci:** change upload type ([b9599e2](https://github.com/mixedbread-ai/mixedbread-python/commit/b9599e29379e8637e27c97c0c5040aae83bb242c)) + ## 0.15.0 (2025-06-30) Full Changelog: [v0.14.0...v0.15.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.14.0...v0.15.0) diff --git a/pyproject.toml b/pyproject.toml index c5f6a0cd..d4b82f8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mixedbread" -version = "0.15.0" +version = "0.16.0" description = "The official Python library for the Mixedbread API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index e9b57e7c..5af44df7 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash set -exuo pipefail -RESPONSE=$(curl -X POST "$URL" \ +FILENAME=$(basename dist/*.whl) + +RESPONSE=$(curl -X POST "$URL?filename=$FILENAME" \ -H "Authorization: Bearer $AUTH" \ -H "Content-Type: application/json") @@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then exit 1 fi -UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \ - -H "Content-Type: application/gzip" \ - --data-binary @- "$SIGNED_URL" 2>&1) +UPLOAD_RESPONSE=$(curl -v -X PUT \ + -H "Content-Type: binary/octet-stream" \ + --data-binary "@dist/$FILENAME" "$SIGNED_URL" 2>&1) if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then echo -e "\033[32mUploaded build to Stainless storage.\033[0m" - echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/mixedbread-python/$SHA'\033[0m" + echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/mixedbread-python/$SHA/$FILENAME'\033[0m" else echo -e "\033[31mFailed to upload artifact.\033[0m" exit 1 diff --git a/src/mixedbread/_version.py b/src/mixedbread/_version.py index fe278751..1fc64f37 100644 --- a/src/mixedbread/_version.py +++ b/src/mixedbread/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "mixedbread" -__version__ = "0.15.0" # x-release-please-version +__version__ = "0.16.0" # x-release-please-version diff --git a/src/mixedbread/resources/parsing/jobs.py b/src/mixedbread/resources/parsing/jobs.py index f439ac92..ea6ec2d3 100644 --- a/src/mixedbread/resources/parsing/jobs.py +++ b/src/mixedbread/resources/parsing/jobs.py @@ -158,6 +158,7 @@ def list( before: Optional[str] | NotGiven = NOT_GIVEN, include_total: bool | NotGiven = NOT_GIVEN, statuses: Optional[List[ParsingJobStatus]] | NotGiven = NOT_GIVEN, + q: Optional[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -186,6 +187,8 @@ def list( statuses: Status to filter by + q: Search query to filter by + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -208,6 +211,7 @@ def list( "before": before, "include_total": include_total, "statuses": statuses, + "q": q, }, job_list_params.JobListParams, ), @@ -577,6 +581,7 @@ async def list( before: Optional[str] | NotGiven = NOT_GIVEN, include_total: bool | NotGiven = NOT_GIVEN, statuses: Optional[List[ParsingJobStatus]] | NotGiven = NOT_GIVEN, + q: Optional[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -605,6 +610,8 @@ async def list( statuses: Status to filter by + q: Search query to filter by + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -627,6 +634,7 @@ async def list( "before": before, "include_total": include_total, "statuses": statuses, + "q": q, }, job_list_params.JobListParams, ), diff --git a/src/mixedbread/types/parsing/job_list_params.py b/src/mixedbread/types/parsing/job_list_params.py index 979c53a3..c34f3c09 100644 --- a/src/mixedbread/types/parsing/job_list_params.py +++ b/src/mixedbread/types/parsing/job_list_params.py @@ -31,3 +31,6 @@ class JobListParams(TypedDict, total=False): statuses: Optional[List[ParsingJobStatus]] """Status to filter by""" + + q: Optional[str] + """Search query to filter by""" diff --git a/src/mixedbread/types/parsing/job_list_response.py b/src/mixedbread/types/parsing/job_list_response.py index 3833e4f8..4b24ab2c 100644 --- a/src/mixedbread/types/parsing/job_list_response.py +++ b/src/mixedbread/types/parsing/job_list_response.py @@ -45,6 +45,9 @@ class Data(BaseModel): file_id: str """The ID of the file to parse""" + filename: Optional[str] = None + """The name of the file""" + status: ParsingJobStatus """The status of the job""" diff --git a/src/mixedbread/types/parsing/parsing_job.py b/src/mixedbread/types/parsing/parsing_job.py index 026f0d7d..c950c5a4 100644 --- a/src/mixedbread/types/parsing/parsing_job.py +++ b/src/mixedbread/types/parsing/parsing_job.py @@ -68,6 +68,9 @@ class ParsingJob(BaseModel): file_id: str """The ID of the file to parse""" + filename: Optional[str] = None + """The name of the file""" + status: ParsingJobStatus """The status of the job""" diff --git a/tests/api_resources/parsing/test_jobs.py b/tests/api_resources/parsing/test_jobs.py index 5586218b..5ce07165 100644 --- a/tests/api_resources/parsing/test_jobs.py +++ b/tests/api_resources/parsing/test_jobs.py @@ -114,6 +114,7 @@ def test_method_list_with_all_params(self, client: Mixedbread) -> None: before="eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMVQyMzo1OTo1OS4wMDBaIiwiaWQiOiJhYmMxMjMifQ==", include_total=False, statuses=["pending", "in_progress"], + q="x", ) assert_matches_type(JobListResponse, job, path=["response"]) @@ -312,6 +313,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncMixedbread) before="eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMVQyMzo1OTo1OS4wMDBaIiwiaWQiOiJhYmMxMjMifQ==", include_total=False, statuses=["pending", "in_progress"], + q="x", ) assert_matches_type(JobListResponse, job, path=["response"])