diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml new file mode 100644 index 0000000..9133aad --- /dev/null +++ b/.github/workflows/publish-pypi.yml @@ -0,0 +1,28 @@ +# 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/btbowman/PythonSDK/actions/workflows/publish-pypi.yml +name: Publish PyPI +on: + workflow_dispatch: + + release: + types: [published] + +jobs: + publish: + name: publish + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + version: '0.9.13' + + - name: Publish to PyPI + run: | + bash ./bin/publish-pypi + env: + PYPI_TOKEN: ${{ secrets.IDEALJ_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml new file mode 100644 index 0000000..c2645c9 --- /dev/null +++ b/.github/workflows/release-doctor.yml @@ -0,0 +1,21 @@ +name: Release Doctor +on: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + release_doctor: + name: release doctor + runs-on: ubuntu-latest + if: github.repository == 'btbowman/PythonSDK' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + + steps: + - uses: actions/checkout@v6 + + - name: Check release environment + run: | + bash ./bin/check-release-environment + env: + PYPI_TOKEN: ${{ secrets.IDEALJ_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..c7159c1 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.0.2" +} \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 3cff8b9..18fcfc7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 19 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/my-org-btbowman%2Fidealj-21652c2d2e6a5aab678ca435ba09ef698ff34270021f349660b84d5d98bf3923.yml openapi_spec_hash: 356a7298b2abac3fdf72ad5ee046b952 -config_hash: d0b472f62661154d27a4f4e5c6cdaea9 +config_hash: 5bea3d33917e913164584aa26a4e93ea diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1d79896 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +## 0.0.2 (2026-04-03) + +Full Changelog: [v0.0.1...v0.0.2](https://github.com/btbowman/PythonSDK/compare/v0.0.1...v0.0.2) + +### Chores + +* update SDK settings ([5b45038](https://github.com/btbowman/PythonSDK/commit/5b45038f1acfcf35c1f69781d1e1e792c0751ae1)) +* update SDK settings ([18abf87](https://github.com/btbowman/PythonSDK/commit/18abf87ce5fb7f08bf10392b384d90208c7b7efe)) +* update SDK settings ([89609e6](https://github.com/btbowman/PythonSDK/commit/89609e62e512c2b66d94377ef1f84f59b0a3ac98)) +* update SDK settings ([f24a3c9](https://github.com/btbowman/PythonSDK/commit/f24a3c99c859171b8a5d6abd29488e9e0580f5f5)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 497ec1d..afc508d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,7 +62,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/stainless-sdks/idealj-python.git +$ pip install git+ssh://git@github.com/btbowman/PythonSDK.git ``` Alternatively, you can build from source and install the wheel file: @@ -113,7 +113,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/stainless-sdks/idealj-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/btbowman/PythonSDK/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 2dd3ddf..6f530a5 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,10 @@ The full API of this library can be found in [api.md](api.md). ## Installation ```sh -# install from this staging repo -pip install git+ssh://git@github.com/stainless-sdks/idealj-python.git +# install from PyPI +pip install idealj ``` -> [!NOTE] -> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install idealj` - ## Usage The full API of this library can be found in [api.md](api.md). @@ -83,8 +80,8 @@ By default, the async client uses `httpx` for HTTP requests. However, for improv You can enable this by installing `aiohttp`: ```sh -# install from this staging repo -pip install 'idealj[aiohttp] @ git+ssh://git@github.com/stainless-sdks/idealj-python.git' +# install from PyPI +pip install idealj[aiohttp] ``` Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: @@ -268,9 +265,9 @@ store = response.parse() # get the object that `store.list_inventory()` would h print(store) ``` -These methods return an [`APIResponse`](https://github.com/stainless-sdks/idealj-python/tree/main/src/idealj/_response.py) object. +These methods return an [`APIResponse`](https://github.com/btbowman/PythonSDK/tree/main/src/idealj/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/idealj-python/tree/main/src/idealj/_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/btbowman/PythonSDK/tree/main/src/idealj/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -374,7 +371,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/stainless-sdks/idealj-python/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/btbowman/PythonSDK/issues) with questions, bugs, or suggestions. ### Determining the installed version diff --git a/bin/check-release-environment b/bin/check-release-environment new file mode 100644 index 0000000..b845b0f --- /dev/null +++ b/bin/check-release-environment @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +errors=() + +if [ -z "${PYPI_TOKEN}" ]; then + errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") +fi + +lenErrors=${#errors[@]} + +if [[ lenErrors -gt 0 ]]; then + echo -e "Found the following errors in the release environment:\n" + + for error in "${errors[@]}"; do + echo -e "- $error\n" + done + + exit 1 +fi + +echo "The environment is ready to push releases!" diff --git a/pyproject.toml b/pyproject.toml index b9b7e24..66b75ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "idealj" -version = "0.0.1" +version = "0.0.2" description = "The official Python library for the idealj API" dynamic = ["readme"] license = "Apache-2.0" @@ -37,8 +37,8 @@ classifiers = [ ] [project.urls] -Homepage = "https://github.com/stainless-sdks/idealj-python" -Repository = "https://github.com/stainless-sdks/idealj-python" +Homepage = "https://github.com/btbowman/PythonSDK" +Repository = "https://github.com/btbowman/PythonSDK" [project.optional-dependencies] aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"] @@ -112,7 +112,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/stainless-sdks/idealj-python/tree/main/\g<2>)' +replacement = '[\1](https://github.com/btbowman/PythonSDK/tree/main/\g<2>)' [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..6a0709f --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,66 @@ +{ + "packages": { + ".": {} + }, + "$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", + "include-v-in-tag": true, + "include-component-in-tag": false, + "versioning": "prerelease", + "prerelease": true, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "pull-request-header": "Automated Release PR", + "pull-request-title-pattern": "release: ${version}", + "changelog-sections": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "revert", + "section": "Reverts" + }, + { + "type": "chore", + "section": "Chores" + }, + { + "type": "docs", + "section": "Documentation" + }, + { + "type": "style", + "section": "Styles" + }, + { + "type": "refactor", + "section": "Refactors" + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "build", + "section": "Build System" + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ], + "release-type": "python", + "extra-files": [ + "src/idealj/_version.py" + ] +} \ No newline at end of file diff --git a/src/idealj/_version.py b/src/idealj/_version.py index 8324b38..4265dba 100644 --- a/src/idealj/_version.py +++ b/src/idealj/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "idealj" -__version__ = "0.0.1" +__version__ = "0.0.2" # x-release-please-version diff --git a/src/idealj/resources/pets.py b/src/idealj/resources/pets.py index ca38282..c1a8207 100644 --- a/src/idealj/resources/pets.py +++ b/src/idealj/resources/pets.py @@ -60,7 +60,7 @@ def with_raw_response(self) -> PetsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/idealj-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/btbowman/PythonSDK#accessing-raw-response-data-eg-headers """ return PetsResourceWithRawResponse(self) @@ -69,7 +69,7 @@ def with_streaming_response(self) -> PetsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/idealj-python#with_streaming_response + For more information, see https://www.github.com/btbowman/PythonSDK#with_streaming_response """ return PetsResourceWithStreamingResponse(self) @@ -411,7 +411,7 @@ def with_raw_response(self) -> AsyncPetsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/idealj-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/btbowman/PythonSDK#accessing-raw-response-data-eg-headers """ return AsyncPetsResourceWithRawResponse(self) @@ -420,7 +420,7 @@ def with_streaming_response(self) -> AsyncPetsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/idealj-python#with_streaming_response + For more information, see https://www.github.com/btbowman/PythonSDK#with_streaming_response """ return AsyncPetsResourceWithStreamingResponse(self) diff --git a/src/idealj/resources/store/orders.py b/src/idealj/resources/store/orders.py index a2a690d..dfb20b7 100644 --- a/src/idealj/resources/store/orders.py +++ b/src/idealj/resources/store/orders.py @@ -34,7 +34,7 @@ def with_raw_response(self) -> OrdersResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/idealj-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/btbowman/PythonSDK#accessing-raw-response-data-eg-headers """ return OrdersResourceWithRawResponse(self) @@ -43,7 +43,7 @@ def with_streaming_response(self) -> OrdersResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/idealj-python#with_streaming_response + For more information, see https://www.github.com/btbowman/PythonSDK#with_streaming_response """ return OrdersResourceWithStreamingResponse(self) @@ -173,7 +173,7 @@ def with_raw_response(self) -> AsyncOrdersResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/idealj-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/btbowman/PythonSDK#accessing-raw-response-data-eg-headers """ return AsyncOrdersResourceWithRawResponse(self) @@ -182,7 +182,7 @@ def with_streaming_response(self) -> AsyncOrdersResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/idealj-python#with_streaming_response + For more information, see https://www.github.com/btbowman/PythonSDK#with_streaming_response """ return AsyncOrdersResourceWithStreamingResponse(self) diff --git a/src/idealj/resources/store/store.py b/src/idealj/resources/store/store.py index 5aa0f9a..5b1cb34 100644 --- a/src/idealj/resources/store/store.py +++ b/src/idealj/resources/store/store.py @@ -41,7 +41,7 @@ def with_raw_response(self) -> StoreResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/idealj-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/btbowman/PythonSDK#accessing-raw-response-data-eg-headers """ return StoreResourceWithRawResponse(self) @@ -50,7 +50,7 @@ def with_streaming_response(self) -> StoreResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/idealj-python#with_streaming_response + For more information, see https://www.github.com/btbowman/PythonSDK#with_streaming_response """ return StoreResourceWithStreamingResponse(self) @@ -88,7 +88,7 @@ def with_raw_response(self) -> AsyncStoreResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/idealj-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/btbowman/PythonSDK#accessing-raw-response-data-eg-headers """ return AsyncStoreResourceWithRawResponse(self) @@ -97,7 +97,7 @@ def with_streaming_response(self) -> AsyncStoreResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/idealj-python#with_streaming_response + For more information, see https://www.github.com/btbowman/PythonSDK#with_streaming_response """ return AsyncStoreResourceWithStreamingResponse(self) diff --git a/src/idealj/resources/users.py b/src/idealj/resources/users.py index 66d302c..57f12d5 100644 --- a/src/idealj/resources/users.py +++ b/src/idealj/resources/users.py @@ -33,7 +33,7 @@ def with_raw_response(self) -> UsersResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/idealj-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/btbowman/PythonSDK#accessing-raw-response-data-eg-headers """ return UsersResourceWithRawResponse(self) @@ -42,7 +42,7 @@ def with_streaming_response(self) -> UsersResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/idealj-python#with_streaming_response + For more information, see https://www.github.com/btbowman/PythonSDK#with_streaming_response """ return UsersResourceWithStreamingResponse(self) @@ -331,7 +331,7 @@ def with_raw_response(self) -> AsyncUsersResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/idealj-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/btbowman/PythonSDK#accessing-raw-response-data-eg-headers """ return AsyncUsersResourceWithRawResponse(self) @@ -340,7 +340,7 @@ def with_streaming_response(self) -> AsyncUsersResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/idealj-python#with_streaming_response + For more information, see https://www.github.com/btbowman/PythonSDK#with_streaming_response """ return AsyncUsersResourceWithStreamingResponse(self)