From fcd0205203eb54776bf7d3b361db82c2681816ff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:16:48 +0000 Subject: [PATCH 1/4] chore(internal): version bump (#375) --- README.md | 4 ++-- pyproject.toml | 5 ++--- tests/test_client.py | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 93efe936..9812aafb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![PyPI version](https://img.shields.io/pypi/v/openlayer.svg)](https://pypi.org/project/openlayer/) -The Openlayer Python library provides convenient access to the Openlayer REST API from any Python 3.7+ +The Openlayer Python library provides convenient access to the Openlayer REST API from any Python 3.8+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx). @@ -438,7 +438,7 @@ print(openlayer.__version__) ## Requirements -Python 3.7 or higher. +Python 3.8 or higher. ## Contributing diff --git a/pyproject.toml b/pyproject.toml index be649c18..47715092 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,11 +20,10 @@ dependencies = [ "pyyaml>=6.0", "requests_toolbelt>=1.0.0", ] -requires-python = ">= 3.7" +requires-python = ">= 3.8" classifiers = [ "Typing :: Typed", "Intended Audience :: Developers", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -143,7 +142,7 @@ filterwarnings = [ # there are a couple of flags that are still disabled by # default in strict mode as they are experimental and niche. typeCheckingMode = "strict" -pythonVersion = "3.7" +pythonVersion = "3.8" exclude = [ "_dev", diff --git a/tests/test_client.py b/tests/test_client.py index b57e50db..bc26a02d 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -702,7 +702,7 @@ class Model(BaseModel): [3, "", 0.5], [2, "", 0.5 * 2.0], [1, "", 0.5 * 4.0], - [-1100, "", 7.8], # test large number potentially overflowing + [-1100, "", 8], # test large number potentially overflowing ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) @@ -1574,7 +1574,7 @@ class Model(BaseModel): [3, "", 0.5], [2, "", 0.5 * 2.0], [1, "", 0.5 * 4.0], - [-1100, "", 7.8], # test large number potentially overflowing + [-1100, "", 8], # test large number potentially overflowing ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) From 01ba806143e8cb0e2d718501226e62e55cb7a1de Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 02:58:22 +0000 Subject: [PATCH 2/4] chore: rebuild project due to codegen change (#378) --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9812aafb..68ed0822 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,7 @@ import os from openlayer import Openlayer client = Openlayer( - # This is the default and can be omitted - api_key=os.environ.get("OPENLAYER_API_KEY"), + api_key=os.environ.get("OPENLAYER_API_KEY"), # This is the default and can be omitted ) response = client.inference_pipelines.data.stream( @@ -69,8 +68,7 @@ import asyncio from openlayer import AsyncOpenlayer client = AsyncOpenlayer( - # This is the default and can be omitted - api_key=os.environ.get("OPENLAYER_API_KEY"), + api_key=os.environ.get("OPENLAYER_API_KEY"), # This is the default and can be omitted ) From a6fc82b48729044f8a00d2947b751414f4b423af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:21:33 +0000 Subject: [PATCH 3/4] chore: rebuild project due to codegen change (#379) --- src/openlayer/_utils/_transform.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/openlayer/_utils/_transform.py b/src/openlayer/_utils/_transform.py index d7c05345..a6b62cad 100644 --- a/src/openlayer/_utils/_transform.py +++ b/src/openlayer/_utils/_transform.py @@ -316,6 +316,11 @@ async def _async_transform_recursive( # Iterable[T] or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str)) ): + # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually + # intended as an iterable, so we don't transform it. + if isinstance(data, dict): + return cast(object, data) + inner_type = extract_type_arg(stripped_type, 0) return [await _async_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data] From 99a953d4f628c1cb694afc671435e2a19d41ecc4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 18:30:57 +0000 Subject: [PATCH 4/4] release: 0.2.0-alpha.37 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 11 +++++++++++ pyproject.toml | 2 +- src/openlayer/_version.py | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c2ab8ddb..c7ea920d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.2.0-alpha.36" + ".": "0.2.0-alpha.37" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a2bd1c4a..1cebe9f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.2.0-alpha.37 (2024-11-13) + +Full Changelog: [v0.2.0-alpha.36...v0.2.0-alpha.37](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.36...v0.2.0-alpha.37) + +### Chores + +* add Vertex AI example ([b668aeb](https://github.com/openlayer-ai/openlayer-python/commit/b668aeb58f7b78f85136c3635d1c8959df5bec21)) +* **internal:** version bump ([#375](https://github.com/openlayer-ai/openlayer-python/issues/375)) ([fcd0205](https://github.com/openlayer-ai/openlayer-python/commit/fcd0205203eb54776bf7d3b361db82c2681816ff)) +* rebuild project due to codegen change ([#378](https://github.com/openlayer-ai/openlayer-python/issues/378)) ([01ba806](https://github.com/openlayer-ai/openlayer-python/commit/01ba806143e8cb0e2d718501226e62e55cb7a1de)) +* rebuild project due to codegen change ([#379](https://github.com/openlayer-ai/openlayer-python/issues/379)) ([a6fc82b](https://github.com/openlayer-ai/openlayer-python/commit/a6fc82b48729044f8a00d2947b751414f4b423af)) + ## 0.2.0-alpha.36 (2024-11-04) Full Changelog: [v0.2.0-alpha.35...v0.2.0-alpha.36](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.35...v0.2.0-alpha.36) diff --git a/pyproject.toml b/pyproject.toml index 47715092..af8ce269 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openlayer" -version = "0.2.0-alpha.36" +version = "0.2.0-alpha.37" description = "The official Python library for the openlayer API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/openlayer/_version.py b/src/openlayer/_version.py index c5384c3f..7394da09 100644 --- a/src/openlayer/_version.py +++ b/src/openlayer/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "openlayer" -__version__ = "0.2.0-alpha.36" # x-release-please-version +__version__ = "0.2.0-alpha.37" # x-release-please-version