diff --git a/.github/workflows/create-releases.yml b/.github/workflows/create-releases.yml deleted file mode 100644 index 09ad5394..00000000 --- a/.github/workflows/create-releases.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Create releases -on: - schedule: - - cron: '0 5 * * *' # every day at 5am UTC - push: - branches: - - main - -jobs: - release: - name: release - if: github.ref == 'refs/heads/main' && github.repository == 'juliuslipp/mixedbread-python' - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: stainless-api/trigger-release-please@v1 - id: release - with: - repo: ${{ github.event.repository.full_name }} - stainless-api-key: ${{ secrets.STAINLESS_API_KEY }} - - - name: Install Rye - if: ${{ steps.release.outputs.releases_created }} - run: | - curl -sSf https://rye.astral.sh/get | bash - echo "$HOME/.rye/shims" >> $GITHUB_PATH - env: - RYE_VERSION: '0.35.0' - RYE_INSTALL_OPTION: '--yes' - - - name: Publish to PyPI - if: ${{ steps.release.outputs.releases_created }} - run: | - bash ./bin/publish-pypi - env: - PYPI_TOKEN: ${{ secrets.MIXEDBREAD_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 6d8f33e9..467239d4 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,9 +1,13 @@ -# workflow for re-running publishing to PyPI in case it fails for some reason -# you can run this workflow by navigating to https://www.github.com/juliuslipp/mixedbread-python/actions/workflows/publish-pypi.yml +# This workflow is triggered when a GitHub release is created. +# It can also be run manually to re-publish to PyPI in case it failed for some reason. +# You can run this workflow by navigating to https://www.github.com/mixedbread-ai/mixedbread-python/actions/workflows/publish-pypi.yml name: Publish PyPI on: workflow_dispatch: + release: + types: [published] + jobs: publish: name: publish diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 329c5563..f49b8bb9 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -9,7 +9,7 @@ jobs: release_doctor: name: release doctor runs-on: ubuntu-latest - if: github.repository == 'juliuslipp/mixedbread-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + if: github.repository == 'mixedbread-ai/mixedbread-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - uses: actions/checkout@v4 @@ -18,5 +18,4 @@ jobs: run: | bash ./bin/check-release-environment env: - STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }} PYPI_TOKEN: ${{ secrets.MIXEDBREAD_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 38406ce2..e9ccd896 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,7 +63,7 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```sh -$ pip install git+ssh://git@github.com/juliuslipp/mixedbread-python.git +$ pip install git+ssh://git@github.com/mixedbread-ai/mixedbread-python.git ``` Alternatively, you can build from source and install the wheel file: @@ -121,7 +121,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/juliuslipp/mixedbread-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/mixedbread-ai/mixedbread-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index 91a9bb40..155aa0f4 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The REST API documentation can be found on [mixedbread.ai](https://mixedbread.ai ```sh # install from the production repo -pip install git+ssh://git@github.com/juliuslipp/mixedbread-python.git +pip install git+ssh://git@github.com/mixedbread-ai/mixedbread-python.git ``` > [!NOTE] @@ -206,9 +206,9 @@ vector_store = response.parse() # get the object that `vector_stores.create()` print(vector_store.id) ``` -These methods return an [`APIResponse`](https://github.com/juliuslipp/mixedbread-python/tree/main/src/mixedbread/_response.py) object. +These methods return an [`APIResponse`](https://github.com/mixedbread-ai/mixedbread-python/tree/main/src/mixedbread/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/juliuslipp/mixedbread-python/tree/main/src/mixedbread/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/mixedbread-ai/mixedbread-python/tree/main/src/mixedbread/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -313,7 +313,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/juliuslipp/mixedbread-python/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/mixedbread-ai/mixedbread-python/issues) with questions, bugs, or suggestions. ### Determining the installed version diff --git a/bin/check-release-environment b/bin/check-release-environment index c4a1f8a4..fa95a3ba 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -2,10 +2,6 @@ errors=() -if [ -z "${STAINLESS_API_KEY}" ]; then - errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.") -fi - if [ -z "${PYPI_TOKEN}" ]; then errors+=("The MIXEDBREAD_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") fi diff --git a/pyproject.toml b/pyproject.toml index ccddb7e9..8f5b000a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,8 +34,8 @@ classifiers = [ ] [project.urls] -Homepage = "https://github.com/juliuslipp/mixedbread-python" -Repository = "https://github.com/juliuslipp/mixedbread-python" +Homepage = "https://github.com/mixedbread-ai/mixedbread-python" +Repository = "https://github.com/mixedbread-ai/mixedbread-python" @@ -122,7 +122,7 @@ path = "README.md" [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # replace relative links with absolute links pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' -replacement = '[\1](https://github.com/juliuslipp/mixedbread-python/tree/main/\g<2>)' +replacement = '[\1](https://github.com/mixedbread-ai/mixedbread-python/tree/main/\g<2>)' [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/src/mixedbread/resources/document_ai/document_ai.py b/src/mixedbread/resources/document_ai/document_ai.py index 2e1440af..af35dce6 100644 --- a/src/mixedbread/resources/document_ai/document_ai.py +++ b/src/mixedbread/resources/document_ai/document_ai.py @@ -27,7 +27,7 @@ def with_raw_response(self) -> DocumentAIResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return DocumentAIResourceWithRawResponse(self) @@ -36,7 +36,7 @@ def with_streaming_response(self) -> DocumentAIResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return DocumentAIResourceWithStreamingResponse(self) @@ -52,7 +52,7 @@ def with_raw_response(self) -> AsyncDocumentAIResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return AsyncDocumentAIResourceWithRawResponse(self) @@ -61,7 +61,7 @@ def with_streaming_response(self) -> AsyncDocumentAIResourceWithStreamingRespons """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return AsyncDocumentAIResourceWithStreamingResponse(self) diff --git a/src/mixedbread/resources/document_ai/parse.py b/src/mixedbread/resources/document_ai/parse.py index 0fe65c7b..adbef7f0 100644 --- a/src/mixedbread/resources/document_ai/parse.py +++ b/src/mixedbread/resources/document_ai/parse.py @@ -35,7 +35,7 @@ def with_raw_response(self) -> ParseResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return ParseResourceWithRawResponse(self) @@ -44,7 +44,7 @@ def with_streaming_response(self) -> ParseResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return ParseResourceWithStreamingResponse(self) @@ -160,7 +160,7 @@ def with_raw_response(self) -> AsyncParseResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return AsyncParseResourceWithRawResponse(self) @@ -169,7 +169,7 @@ def with_streaming_response(self) -> AsyncParseResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return AsyncParseResourceWithStreamingResponse(self) diff --git a/src/mixedbread/resources/embeddings.py b/src/mixedbread/resources/embeddings.py index 6d7457b5..15f1e35f 100644 --- a/src/mixedbread/resources/embeddings.py +++ b/src/mixedbread/resources/embeddings.py @@ -34,7 +34,7 @@ def with_raw_response(self) -> EmbeddingsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return EmbeddingsResourceWithRawResponse(self) @@ -43,7 +43,7 @@ def with_streaming_response(self) -> EmbeddingsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return EmbeddingsResourceWithStreamingResponse(self) @@ -123,7 +123,7 @@ def with_raw_response(self) -> AsyncEmbeddingsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return AsyncEmbeddingsResourceWithRawResponse(self) @@ -132,7 +132,7 @@ def with_streaming_response(self) -> AsyncEmbeddingsResourceWithStreamingRespons """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return AsyncEmbeddingsResourceWithStreamingResponse(self) diff --git a/src/mixedbread/resources/files.py b/src/mixedbread/resources/files.py index f15da64d..8bfc0b65 100644 --- a/src/mixedbread/resources/files.py +++ b/src/mixedbread/resources/files.py @@ -45,7 +45,7 @@ def with_raw_response(self) -> FilesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return FilesResourceWithRawResponse(self) @@ -54,7 +54,7 @@ def with_streaming_response(self) -> FilesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return FilesResourceWithStreamingResponse(self) @@ -325,7 +325,7 @@ def with_raw_response(self) -> AsyncFilesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return AsyncFilesResourceWithRawResponse(self) @@ -334,7 +334,7 @@ def with_streaming_response(self) -> AsyncFilesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return AsyncFilesResourceWithStreamingResponse(self) diff --git a/src/mixedbread/resources/jobs.py b/src/mixedbread/resources/jobs.py index c01de2ce..7cc949e2 100644 --- a/src/mixedbread/resources/jobs.py +++ b/src/mixedbread/resources/jobs.py @@ -27,7 +27,7 @@ def with_raw_response(self) -> JobsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return JobsResourceWithRawResponse(self) @@ -36,7 +36,7 @@ def with_streaming_response(self) -> JobsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return JobsResourceWithStreamingResponse(self) @@ -123,7 +123,7 @@ def with_raw_response(self) -> AsyncJobsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return AsyncJobsResourceWithRawResponse(self) @@ -132,7 +132,7 @@ def with_streaming_response(self) -> AsyncJobsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return AsyncJobsResourceWithStreamingResponse(self) diff --git a/src/mixedbread/resources/rerankings.py b/src/mixedbread/resources/rerankings.py index 05d91d79..bac44d99 100644 --- a/src/mixedbread/resources/rerankings.py +++ b/src/mixedbread/resources/rerankings.py @@ -33,7 +33,7 @@ def with_raw_response(self) -> RerankingsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return RerankingsResourceWithRawResponse(self) @@ -42,7 +42,7 @@ def with_streaming_response(self) -> RerankingsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return RerankingsResourceWithStreamingResponse(self) @@ -115,7 +115,7 @@ def with_raw_response(self) -> AsyncRerankingsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return AsyncRerankingsResourceWithRawResponse(self) @@ -124,7 +124,7 @@ def with_streaming_response(self) -> AsyncRerankingsResourceWithStreamingRespons """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return AsyncRerankingsResourceWithStreamingResponse(self) diff --git a/src/mixedbread/resources/vector_stores/files.py b/src/mixedbread/resources/vector_stores/files.py index fcf39ffe..b0d99634 100644 --- a/src/mixedbread/resources/vector_stores/files.py +++ b/src/mixedbread/resources/vector_stores/files.py @@ -35,7 +35,7 @@ def with_raw_response(self) -> FilesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return FilesResourceWithRawResponse(self) @@ -44,7 +44,7 @@ def with_streaming_response(self) -> FilesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return FilesResourceWithStreamingResponse(self) @@ -242,7 +242,7 @@ def with_raw_response(self) -> AsyncFilesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return AsyncFilesResourceWithRawResponse(self) @@ -251,7 +251,7 @@ def with_streaming_response(self) -> AsyncFilesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return AsyncFilesResourceWithStreamingResponse(self) diff --git a/src/mixedbread/resources/vector_stores/vector_stores.py b/src/mixedbread/resources/vector_stores/vector_stores.py index 7977bfd8..9e9068b1 100644 --- a/src/mixedbread/resources/vector_stores/vector_stores.py +++ b/src/mixedbread/resources/vector_stores/vector_stores.py @@ -54,7 +54,7 @@ def with_raw_response(self) -> VectorStoresResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return VectorStoresResourceWithRawResponse(self) @@ -63,7 +63,7 @@ def with_streaming_response(self) -> VectorStoresResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return VectorStoresResourceWithStreamingResponse(self) @@ -359,7 +359,7 @@ def with_raw_response(self) -> AsyncVectorStoresResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the the raw response object instead of the parsed content. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#accessing-raw-response-data-eg-headers """ return AsyncVectorStoresResourceWithRawResponse(self) @@ -368,7 +368,7 @@ def with_streaming_response(self) -> AsyncVectorStoresResourceWithStreamingRespo """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/juliuslipp/mixedbread-python#with_streaming_response + For more information, see https://www.github.com/mixedbread-ai/mixedbread-python#with_streaming_response """ return AsyncVectorStoresResourceWithStreamingResponse(self)