diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40293964..565ec95e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,24 +30,5 @@ jobs: - name: Run lints run: ./scripts/lint - test: - name: test - runs-on: ubuntu-latest - - 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.35.0' - RYE_INSTALL_OPTION: '--yes' - - - name: Bootstrap - run: ./scripts/bootstrap - - name: Run tests - run: ./scripts/test diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml new file mode 100644 index 00000000..5ed611c7 --- /dev/null +++ b/.github/workflows/publish-pypi.yml @@ -0,0 +1,31 @@ +# 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/cleanlab/codex-python/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@v4 + + - name: Install Rye + 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 + run: | + bash ./bin/publish-pypi + env: + PYPI_TOKEN: ${{ secrets.CODEX_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml new file mode 100644 index 00000000..2ce3cdc2 --- /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 == 'cleanlab/codex-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 + + - name: Check release environment + run: | + bash ./bin/check-release-environment + env: + PYPI_TOKEN: ${{ secrets.CODEX_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..ba6c3483 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.0-alpha.1" +} \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index a156c044..3a1d4dfc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1 @@ configured_endpoints: 29 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cleanlab%2Fcodex-5691cf2ac1617d7acc6532acfb2c08e151b48e6b045cdaf1715ff3843f611eb0.yml diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..43fed307 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +## 0.1.0-alpha.1 (2025-01-14) + +Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/cleanlab/codex-python/compare/v0.0.1-alpha.0...v0.1.0-alpha.1) + +### Chores + +* go live ([#1](https://github.com/cleanlab/codex-python/issues/1)) ([afa815c](https://github.com/cleanlab/codex-python/commit/afa815c9f4da93175e3e7c97551b657699c77245)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7111bafc..b9fa9a13 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/stainless-sdks/codex-python.git +$ pip install git+ssh://git@github.com/cleanlab/codex-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/stainless-sdks/codex-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/cleanlab/codex-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/LICENSE b/LICENSE index f00d3a6a..e6fab608 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,7 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +Copyright 2025 Cleanlab Inc. - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - 1. Definitions. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2025 Codex - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index f84291e1..7a8ff536 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Codex Python API library -[![PyPI version](https://img.shields.io/pypi/v/codex.svg)](https://pypi.org/project/codex/) +[![PyPI version](https://img.shields.io/pypi/v/codex-sdk.svg)](https://pypi.org/project/codex-sdk/) The Codex Python library provides convenient access to the Codex REST API from any Python 3.8+ application. The library includes type definitions for all request params and response fields, @@ -15,12 +15,12 @@ The REST API documentation can be found on [help.cleanlab.ai](https://help.clean ## Installation ```sh -# install from this staging repo -pip install git+ssh://git@github.com/stainless-sdks/codex-python.git +# install from the production repo +pip install git+ssh://git@github.com/cleanlab/codex-python.git ``` > [!NOTE] -> Once this package is [published to PyPI](https://app.stainlessapi.com/docs/guides/publish), this will become: `pip install --pre codex` +> Once this package is [published to PyPI](https://app.stainlessapi.com/docs/guides/publish), this will become: `pip install --pre codex-sdk` ## Usage @@ -84,6 +84,75 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`. +## Pagination + +List methods in the Codex API are paginated. + +This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually: + +```python +from codex import Codex + +client = Codex() + +all_entries = [] +# Automatically fetches more pages as needed. +for entry in client.projects.entries.list( + project_id=0, +): + # Do something with entry here + all_entries.append(entry) +print(all_entries) +``` + +Or, asynchronously: + +```python +import asyncio +from codex import AsyncCodex + +client = AsyncCodex() + + +async def main() -> None: + all_entries = [] + # Iterate through items across all pages, issuing requests as needed. + async for entry in client.projects.entries.list( + project_id=0, + ): + all_entries.append(entry) + print(all_entries) + + +asyncio.run(main()) +``` + +Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages: + +```python +first_page = await client.projects.entries.list( + project_id=0, +) +if first_page.has_next_page(): + print(f"will fetch next page using these details: {first_page.next_page_info()}") + next_page = await first_page.get_next_page() + print(f"number of items we just fetched: {len(next_page.entries)}") + +# Remove `await` for non-async usage. +``` + +Or just work directly with the returned data: + +```python +first_page = await client.projects.entries.list( + project_id=0, +) +for entry in first_page.entries: + print(entry.id) + +# Remove `await` for non-async usage. +``` + ## Handling errors When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `codex.APIConnectionError` is raised. @@ -230,9 +299,9 @@ project = response.parse() # get the object that `projects.create()` would have print(project.id) ``` -These methods return an [`APIResponse`](https://github.com/stainless-sdks/codex-python/tree/main/src/codex/_response.py) object. +These methods return an [`APIResponse`](https://github.com/cleanlab/codex-python/tree/main/src/codex/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/codex-python/tree/main/src/codex/_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/cleanlab/codex-python/tree/main/src/codex/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -340,7 +409,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/codex-python/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/cleanlab/codex-python/issues) with questions, bugs, or suggestions. ### Determining the installed version diff --git a/SECURITY.md b/SECURITY.md index fcad344e..54f64467 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -20,7 +20,7 @@ or products provided by Codex please follow the respective company's security re ### Codex Terms and Policies -Please contact support@cleanlab.ai for any questions or concerns regarding security of our services. +Please contact team@cleanlab.ai for any questions or concerns regarding security of our services. --- diff --git a/api.md b/api.md index 672aeeb6..d4720cc2 100644 --- a/api.md +++ b/api.md @@ -111,20 +111,20 @@ Methods: - client.projects.access_keys.retrieve_project_id() -> AccessKeyRetrieveProjectIDResponse - client.projects.access_keys.revoke(access_key_id, \*, project_id) -> None -## Knowledge +## Entries Types: ```python -from codex.types.projects import Entry, ListKnowledgeResponse +from codex.types.projects import Entry ``` Methods: -- client.projects.knowledge.create(project_id, \*\*params) -> Entry -- client.projects.knowledge.retrieve(entry_id, \*, project_id) -> Entry -- client.projects.knowledge.update(entry_id, \*, project_id, \*\*params) -> Entry -- client.projects.knowledge.list(project_id, \*\*params) -> ListKnowledgeResponse -- client.projects.knowledge.delete(entry_id, \*, project_id) -> None -- client.projects.knowledge.add_question(project_id, \*\*params) -> Entry -- client.projects.knowledge.query(project_id, \*\*params) -> Optional[Entry] +- client.projects.entries.create(project_id, \*\*params) -> Entry +- client.projects.entries.retrieve(entry_id, \*, project_id) -> Entry +- client.projects.entries.update(entry_id, \*, project_id, \*\*params) -> Entry +- client.projects.entries.list(project_id, \*\*params) -> SyncOffsetPageEntries[Entry] +- client.projects.entries.delete(entry_id, \*, project_id) -> None +- client.projects.entries.add_question(project_id, \*\*params) -> Entry +- client.projects.entries.query(project_id, \*\*params) -> Optional[Entry] diff --git a/bin/check-release-environment b/bin/check-release-environment new file mode 100644 index 00000000..a1446a75 --- /dev/null +++ b/bin/check-release-environment @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +errors=() + +if [ -z "${PYPI_TOKEN}" ]; then + errors+=("The CODEX_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 56dc3f1a..972e97dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] -name = "codex" -version = "0.0.1-alpha.0" +name = "codex-sdk" +version = "0.1.0-alpha.1" description = "The official Python library for the Codex API" dynamic = ["readme"] -license = "Apache-2.0" +license = "MIT" authors = [ -{ name = "Cleanlab", email = "support@cleanlab.ai" }, +{ name = "Cleanlab", email = "team@cleanlab.ai" }, ] dependencies = [ "httpx>=0.23.0, <1", @@ -30,12 +30,12 @@ classifiers = [ "Operating System :: POSIX :: Linux", "Operating System :: Microsoft :: Windows", "Topic :: Software Development :: Libraries :: Python Modules", - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: MIT License" ] [project.urls] -Homepage = "https://github.com/stainless-sdks/codex-python" -Repository = "https://github.com/stainless-sdks/codex-python" +Homepage = "https://github.com/cleanlab/codex-python" +Repository = "https://github.com/cleanlab/codex-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/stainless-sdks/codex-python/tree/main/\g<2>)' +replacement = '[\1](https://github.com/cleanlab/codex-python/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 00000000..8fd34900 --- /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/codex/_version.py" + ] +} \ No newline at end of file diff --git a/requirements-dev.lock b/requirements-dev.lock index 11bf46e6..47eb5e34 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -12,7 +12,7 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 - # via codex + # via codex-sdk # via httpx argcomplete==3.1.2 # via nox @@ -25,7 +25,7 @@ dirty-equals==0.6.0 distlib==0.3.7 # via virtualenv distro==1.8.0 - # via codex + # via codex-sdk exceptiongroup==1.2.2 # via anyio # via pytest @@ -36,7 +36,7 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.28.1 - # via codex + # via codex-sdk # via respx idna==3.4 # via anyio @@ -63,7 +63,7 @@ platformdirs==3.11.0 pluggy==1.5.0 # via pytest pydantic==2.10.3 - # via codex + # via codex-sdk pydantic-core==2.27.1 # via pydantic pygments==2.18.0 @@ -85,14 +85,14 @@ six==1.16.0 # via python-dateutil sniffio==1.3.0 # via anyio - # via codex + # via codex-sdk time-machine==2.9.0 tomli==2.0.2 # via mypy # via pytest typing-extensions==4.12.2 # via anyio - # via codex + # via codex-sdk # via mypy # via pydantic # via pydantic-core diff --git a/requirements.lock b/requirements.lock index fb7b045f..5d7fff82 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,13 +12,13 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 - # via codex + # via codex-sdk # via httpx certifi==2023.7.22 # via httpcore # via httpx distro==1.8.0 - # via codex + # via codex-sdk exceptiongroup==1.2.2 # via anyio h11==0.14.0 @@ -26,19 +26,19 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.28.1 - # via codex + # via codex-sdk idna==3.4 # via anyio # via httpx pydantic==2.10.3 - # via codex + # via codex-sdk pydantic-core==2.27.1 # via pydantic sniffio==1.3.0 # via anyio - # via codex + # via codex-sdk typing-extensions==4.12.2 # via anyio - # via codex + # via codex-sdk # via pydantic # via pydantic-core diff --git a/src/codex/_version.py b/src/codex/_version.py index 7ee46487..96b3eab2 100644 --- a/src/codex/_version.py +++ b/src/codex/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "codex" -__version__ = "0.0.1-alpha.0" +__version__ = "0.1.0-alpha.1" # x-release-please-version diff --git a/src/codex/pagination.py b/src/codex/pagination.py index 963a4310..48ed5018 100644 --- a/src/codex/pagination.py +++ b/src/codex/pagination.py @@ -9,14 +9,19 @@ from ._models import BaseModel from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage -__all__ = ["SyncMyOffsetPage", "AsyncMyOffsetPage"] +__all__ = [ + "SyncMyOffsetPageTopLevelArray", + "AsyncMyOffsetPageTopLevelArray", + "SyncOffsetPageEntries", + "AsyncOffsetPageEntries", +] _BaseModelT = TypeVar("_BaseModelT", bound=BaseModel) _T = TypeVar("_T") -class SyncMyOffsetPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): +class SyncMyOffsetPageTopLevelArray(BaseSyncPage[_T], BasePage[_T], Generic[_T]): items: List[_T] @override @@ -47,7 +52,7 @@ def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseM ) -class AsyncMyOffsetPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): +class AsyncMyOffsetPageTopLevelArray(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): items: List[_T] @override @@ -76,3 +81,63 @@ def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseM **(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}), }, ) + + +class SyncOffsetPageEntries(BaseSyncPage[_T], BasePage[_T], Generic[_T]): + entries: List[_T] + total_count: Optional[int] = None + + @override + def _get_page_items(self) -> List[_T]: + entries = self.entries + if not entries: + return [] + return entries + + @override + def next_page_info(self) -> Optional[PageInfo]: + offset = self._options.params.get("offset") or 0 + if not isinstance(offset, int): + raise ValueError(f'Expected "offset" param to be an integer but got {offset}') + + length = len(self._get_page_items()) + current_count = offset + length + + total_count = self.total_count + if total_count is None: + return None + + if current_count < total_count: + return PageInfo(params={"offset": current_count}) + + return None + + +class AsyncOffsetPageEntries(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): + entries: List[_T] + total_count: Optional[int] = None + + @override + def _get_page_items(self) -> List[_T]: + entries = self.entries + if not entries: + return [] + return entries + + @override + def next_page_info(self) -> Optional[PageInfo]: + offset = self._options.params.get("offset") or 0 + if not isinstance(offset, int): + raise ValueError(f'Expected "offset" param to be an integer but got {offset}') + + length = len(self._get_page_items()) + current_count = offset + length + + total_count = self.total_count + if total_count is None: + return None + + if current_count < total_count: + return PageInfo(params={"offset": current_count}) + + return None diff --git a/src/codex/resources/health.py b/src/codex/resources/health.py index 29c374e6..b50884e0 100644 --- a/src/codex/resources/health.py +++ b/src/codex/resources/health.py @@ -26,7 +26,7 @@ def with_raw_response(self) -> HealthResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return HealthResourceWithRawResponse(self) @@ -35,7 +35,7 @@ def with_streaming_response(self) -> HealthResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return HealthResourceWithStreamingResponse(self) @@ -104,7 +104,7 @@ def with_raw_response(self) -> AsyncHealthResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return AsyncHealthResourceWithRawResponse(self) @@ -113,7 +113,7 @@ def with_streaming_response(self) -> AsyncHealthResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return AsyncHealthResourceWithStreamingResponse(self) diff --git a/src/codex/resources/organizations/billing.py b/src/codex/resources/organizations/billing.py index fb234032..9c916d83 100644 --- a/src/codex/resources/organizations/billing.py +++ b/src/codex/resources/organizations/billing.py @@ -27,7 +27,7 @@ def with_raw_response(self) -> BillingResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return BillingResourceWithRawResponse(self) @@ -36,7 +36,7 @@ def with_streaming_response(self) -> BillingResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return BillingResourceWithStreamingResponse(self) @@ -114,7 +114,7 @@ def with_raw_response(self) -> AsyncBillingResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return AsyncBillingResourceWithRawResponse(self) @@ -123,7 +123,7 @@ def with_streaming_response(self) -> AsyncBillingResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return AsyncBillingResourceWithStreamingResponse(self) diff --git a/src/codex/resources/organizations/organizations.py b/src/codex/resources/organizations/organizations.py index 3aad77e0..e91099e3 100644 --- a/src/codex/resources/organizations/organizations.py +++ b/src/codex/resources/organizations/organizations.py @@ -38,7 +38,7 @@ def with_raw_response(self) -> OrganizationsResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return OrganizationsResourceWithRawResponse(self) @@ -47,7 +47,7 @@ def with_streaming_response(self) -> OrganizationsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return OrganizationsResourceWithStreamingResponse(self) @@ -96,7 +96,7 @@ def with_raw_response(self) -> AsyncOrganizationsResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return AsyncOrganizationsResourceWithRawResponse(self) @@ -105,7 +105,7 @@ def with_streaming_response(self) -> AsyncOrganizationsResourceWithStreamingResp """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return AsyncOrganizationsResourceWithStreamingResponse(self) diff --git a/src/codex/resources/projects/__init__.py b/src/codex/resources/projects/__init__.py index 5250b0b3..01599858 100644 --- a/src/codex/resources/projects/__init__.py +++ b/src/codex/resources/projects/__init__.py @@ -1,5 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from .entries import ( + EntriesResource, + AsyncEntriesResource, + EntriesResourceWithRawResponse, + AsyncEntriesResourceWithRawResponse, + EntriesResourceWithStreamingResponse, + AsyncEntriesResourceWithStreamingResponse, +) from .projects import ( ProjectsResource, AsyncProjectsResource, @@ -8,14 +16,6 @@ ProjectsResourceWithStreamingResponse, AsyncProjectsResourceWithStreamingResponse, ) -from .knowledge import ( - KnowledgeResource, - AsyncKnowledgeResource, - KnowledgeResourceWithRawResponse, - AsyncKnowledgeResourceWithRawResponse, - KnowledgeResourceWithStreamingResponse, - AsyncKnowledgeResourceWithStreamingResponse, -) from .access_keys import ( AccessKeysResource, AsyncAccessKeysResource, @@ -32,12 +32,12 @@ "AsyncAccessKeysResourceWithRawResponse", "AccessKeysResourceWithStreamingResponse", "AsyncAccessKeysResourceWithStreamingResponse", - "KnowledgeResource", - "AsyncKnowledgeResource", - "KnowledgeResourceWithRawResponse", - "AsyncKnowledgeResourceWithRawResponse", - "KnowledgeResourceWithStreamingResponse", - "AsyncKnowledgeResourceWithStreamingResponse", + "EntriesResource", + "AsyncEntriesResource", + "EntriesResourceWithRawResponse", + "AsyncEntriesResourceWithRawResponse", + "EntriesResourceWithStreamingResponse", + "AsyncEntriesResourceWithStreamingResponse", "ProjectsResource", "AsyncProjectsResource", "ProjectsResourceWithRawResponse", diff --git a/src/codex/resources/projects/access_keys.py b/src/codex/resources/projects/access_keys.py index 2882e65b..e282ad4f 100644 --- a/src/codex/resources/projects/access_keys.py +++ b/src/codex/resources/projects/access_keys.py @@ -36,7 +36,7 @@ def with_raw_response(self) -> AccessKeysResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return AccessKeysResourceWithRawResponse(self) @@ -45,7 +45,7 @@ def with_streaming_response(self) -> AccessKeysResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return AccessKeysResourceWithStreamingResponse(self) @@ -290,7 +290,7 @@ def with_raw_response(self) -> AsyncAccessKeysResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return AsyncAccessKeysResourceWithRawResponse(self) @@ -299,7 +299,7 @@ def with_streaming_response(self) -> AsyncAccessKeysResourceWithStreamingRespons """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return AsyncAccessKeysResourceWithStreamingResponse(self) diff --git a/src/codex/resources/projects/knowledge.py b/src/codex/resources/projects/entries.py similarity index 82% rename from src/codex/resources/projects/knowledge.py rename to src/codex/resources/projects/entries.py index 6005f9cc..59bc9f7f 100644 --- a/src/codex/resources/projects/knowledge.py +++ b/src/codex/resources/projects/entries.py @@ -20,39 +20,39 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import make_request_options +from ...pagination import SyncOffsetPageEntries, AsyncOffsetPageEntries +from ..._base_client import AsyncPaginator, make_request_options from ...types.projects import ( - knowledge_list_params, - knowledge_query_params, - knowledge_create_params, - knowledge_update_params, - knowledge_add_question_params, + entry_list_params, + entry_query_params, + entry_create_params, + entry_update_params, + entry_add_question_params, ) from ...types.projects.entry import Entry -from ...types.projects.list_knowledge_response import ListKnowledgeResponse -__all__ = ["KnowledgeResource", "AsyncKnowledgeResource"] +__all__ = ["EntriesResource", "AsyncEntriesResource"] -class KnowledgeResource(SyncAPIResource): +class EntriesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> KnowledgeResourceWithRawResponse: + def with_raw_response(self) -> EntriesResourceWithRawResponse: """ 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ - return KnowledgeResourceWithRawResponse(self) + return EntriesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> KnowledgeResourceWithStreamingResponse: + def with_streaming_response(self) -> EntriesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ - return KnowledgeResourceWithStreamingResponse(self) + return EntriesResourceWithStreamingResponse(self) def create( self, @@ -80,13 +80,13 @@ def create( timeout: Override the client-level default timeout for this request, in seconds """ return self._post( - f"/api/projects/{project_id}/knowledge/", + f"/api/projects/{project_id}/entries/", body=maybe_transform( { "question": question, "answer": answer, }, - knowledge_create_params.KnowledgeCreateParams, + entry_create_params.EntryCreateParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout @@ -121,7 +121,7 @@ def retrieve( if not entry_id: raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") return self._get( - f"/api/projects/{project_id}/knowledge/{entry_id}", + f"/api/projects/{project_id}/entries/{entry_id}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -157,13 +157,13 @@ def update( if not entry_id: raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") return self._put( - f"/api/projects/{project_id}/knowledge/{entry_id}", + f"/api/projects/{project_id}/entries/{entry_id}", body=maybe_transform( { "answer": answer, "question": question, }, - knowledge_update_params.KnowledgeUpdateParams, + entry_update_params.EntryUpdateParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout @@ -187,7 +187,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ListKnowledgeResponse: + ) -> SyncOffsetPageEntries[Entry]: """ List knowledge entries for a project. @@ -200,8 +200,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( - f"/api/projects/{project_id}/knowledge/", + return self._get_api_list( + f"/api/projects/{project_id}/entries/", + page=SyncOffsetPageEntries[Entry], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -216,10 +217,10 @@ def list( "sort": sort, "unanswered_only": unanswered_only, }, - knowledge_list_params.KnowledgeListParams, + entry_list_params.EntryListParams, ), ), - cast_to=ListKnowledgeResponse, + model=Entry, ) def delete( @@ -250,7 +251,7 @@ def delete( raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( - f"/api/projects/{project_id}/knowledge/{entry_id}", + f"/api/projects/{project_id}/entries/{entry_id}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -285,8 +286,8 @@ def add_question( timeout: Override the client-level default timeout for this request, in seconds """ return self._post( - f"/api/projects/{project_id}/knowledge/add_question", - body=maybe_transform({"question": question}, knowledge_add_question_params.KnowledgeAddQuestionParams), + f"/api/projects/{project_id}/entries/add_question", + body=maybe_transform({"question": question}, entry_add_question_params.EntryAddQuestionParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -323,8 +324,8 @@ def query( timeout: Override the client-level default timeout for this request, in seconds """ return self._post( - f"/api/projects/{project_id}/knowledge/query", - body=maybe_transform({"question": question}, knowledge_query_params.KnowledgeQueryParams), + f"/api/projects/{project_id}/entries/query", + body=maybe_transform({"question": question}, entry_query_params.EntryQueryParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -332,25 +333,25 @@ def query( ) -class AsyncKnowledgeResource(AsyncAPIResource): +class AsyncEntriesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncKnowledgeResourceWithRawResponse: + def with_raw_response(self) -> AsyncEntriesResourceWithRawResponse: """ 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ - return AsyncKnowledgeResourceWithRawResponse(self) + return AsyncEntriesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncKnowledgeResourceWithStreamingResponse: + def with_streaming_response(self) -> AsyncEntriesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ - return AsyncKnowledgeResourceWithStreamingResponse(self) + return AsyncEntriesResourceWithStreamingResponse(self) async def create( self, @@ -378,13 +379,13 @@ async def create( timeout: Override the client-level default timeout for this request, in seconds """ return await self._post( - f"/api/projects/{project_id}/knowledge/", + f"/api/projects/{project_id}/entries/", body=await async_maybe_transform( { "question": question, "answer": answer, }, - knowledge_create_params.KnowledgeCreateParams, + entry_create_params.EntryCreateParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout @@ -419,7 +420,7 @@ async def retrieve( if not entry_id: raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") return await self._get( - f"/api/projects/{project_id}/knowledge/{entry_id}", + f"/api/projects/{project_id}/entries/{entry_id}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -455,13 +456,13 @@ async def update( if not entry_id: raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") return await self._put( - f"/api/projects/{project_id}/knowledge/{entry_id}", + f"/api/projects/{project_id}/entries/{entry_id}", body=await async_maybe_transform( { "answer": answer, "question": question, }, - knowledge_update_params.KnowledgeUpdateParams, + entry_update_params.EntryUpdateParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout @@ -469,7 +470,7 @@ async def update( cast_to=Entry, ) - async def list( + def list( self, project_id: int, *, @@ -485,7 +486,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ListKnowledgeResponse: + ) -> AsyncPaginator[Entry, AsyncOffsetPageEntries[Entry]]: """ List knowledge entries for a project. @@ -498,14 +499,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( - f"/api/projects/{project_id}/knowledge/", + return self._get_api_list( + f"/api/projects/{project_id}/entries/", + page=AsyncOffsetPageEntries[Entry], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "answered_only": answered_only, "limit": limit, @@ -514,10 +516,10 @@ async def list( "sort": sort, "unanswered_only": unanswered_only, }, - knowledge_list_params.KnowledgeListParams, + entry_list_params.EntryListParams, ), ), - cast_to=ListKnowledgeResponse, + model=Entry, ) async def delete( @@ -548,7 +550,7 @@ async def delete( raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( - f"/api/projects/{project_id}/knowledge/{entry_id}", + f"/api/projects/{project_id}/entries/{entry_id}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -583,10 +585,8 @@ async def add_question( timeout: Override the client-level default timeout for this request, in seconds """ return await self._post( - f"/api/projects/{project_id}/knowledge/add_question", - body=await async_maybe_transform( - {"question": question}, knowledge_add_question_params.KnowledgeAddQuestionParams - ), + f"/api/projects/{project_id}/entries/add_question", + body=await async_maybe_transform({"question": question}, entry_add_question_params.EntryAddQuestionParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -623,8 +623,8 @@ async def query( timeout: Override the client-level default timeout for this request, in seconds """ return await self._post( - f"/api/projects/{project_id}/knowledge/query", - body=await async_maybe_transform({"question": question}, knowledge_query_params.KnowledgeQueryParams), + f"/api/projects/{project_id}/entries/query", + body=await async_maybe_transform({"question": question}, entry_query_params.EntryQueryParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -632,109 +632,109 @@ async def query( ) -class KnowledgeResourceWithRawResponse: - def __init__(self, knowledge: KnowledgeResource) -> None: - self._knowledge = knowledge +class EntriesResourceWithRawResponse: + def __init__(self, entries: EntriesResource) -> None: + self._entries = entries self.create = to_raw_response_wrapper( - knowledge.create, + entries.create, ) self.retrieve = to_raw_response_wrapper( - knowledge.retrieve, + entries.retrieve, ) self.update = to_raw_response_wrapper( - knowledge.update, + entries.update, ) self.list = to_raw_response_wrapper( - knowledge.list, + entries.list, ) self.delete = to_raw_response_wrapper( - knowledge.delete, + entries.delete, ) self.add_question = to_raw_response_wrapper( - knowledge.add_question, + entries.add_question, ) self.query = to_raw_response_wrapper( - knowledge.query, + entries.query, ) -class AsyncKnowledgeResourceWithRawResponse: - def __init__(self, knowledge: AsyncKnowledgeResource) -> None: - self._knowledge = knowledge +class AsyncEntriesResourceWithRawResponse: + def __init__(self, entries: AsyncEntriesResource) -> None: + self._entries = entries self.create = async_to_raw_response_wrapper( - knowledge.create, + entries.create, ) self.retrieve = async_to_raw_response_wrapper( - knowledge.retrieve, + entries.retrieve, ) self.update = async_to_raw_response_wrapper( - knowledge.update, + entries.update, ) self.list = async_to_raw_response_wrapper( - knowledge.list, + entries.list, ) self.delete = async_to_raw_response_wrapper( - knowledge.delete, + entries.delete, ) self.add_question = async_to_raw_response_wrapper( - knowledge.add_question, + entries.add_question, ) self.query = async_to_raw_response_wrapper( - knowledge.query, + entries.query, ) -class KnowledgeResourceWithStreamingResponse: - def __init__(self, knowledge: KnowledgeResource) -> None: - self._knowledge = knowledge +class EntriesResourceWithStreamingResponse: + def __init__(self, entries: EntriesResource) -> None: + self._entries = entries self.create = to_streamed_response_wrapper( - knowledge.create, + entries.create, ) self.retrieve = to_streamed_response_wrapper( - knowledge.retrieve, + entries.retrieve, ) self.update = to_streamed_response_wrapper( - knowledge.update, + entries.update, ) self.list = to_streamed_response_wrapper( - knowledge.list, + entries.list, ) self.delete = to_streamed_response_wrapper( - knowledge.delete, + entries.delete, ) self.add_question = to_streamed_response_wrapper( - knowledge.add_question, + entries.add_question, ) self.query = to_streamed_response_wrapper( - knowledge.query, + entries.query, ) -class AsyncKnowledgeResourceWithStreamingResponse: - def __init__(self, knowledge: AsyncKnowledgeResource) -> None: - self._knowledge = knowledge +class AsyncEntriesResourceWithStreamingResponse: + def __init__(self, entries: AsyncEntriesResource) -> None: + self._entries = entries self.create = async_to_streamed_response_wrapper( - knowledge.create, + entries.create, ) self.retrieve = async_to_streamed_response_wrapper( - knowledge.retrieve, + entries.retrieve, ) self.update = async_to_streamed_response_wrapper( - knowledge.update, + entries.update, ) self.list = async_to_streamed_response_wrapper( - knowledge.list, + entries.list, ) self.delete = async_to_streamed_response_wrapper( - knowledge.delete, + entries.delete, ) self.add_question = async_to_streamed_response_wrapper( - knowledge.add_question, + entries.add_question, ) self.query = async_to_streamed_response_wrapper( - knowledge.query, + entries.query, ) diff --git a/src/codex/resources/projects/projects.py b/src/codex/resources/projects/projects.py index 20e95366..d77e63a1 100644 --- a/src/codex/resources/projects/projects.py +++ b/src/codex/resources/projects/projects.py @@ -7,20 +7,20 @@ import httpx from ...types import project_list_params, project_create_params, project_update_params +from .entries import ( + EntriesResource, + AsyncEntriesResource, + EntriesResourceWithRawResponse, + AsyncEntriesResourceWithRawResponse, + EntriesResourceWithStreamingResponse, + AsyncEntriesResourceWithStreamingResponse, +) from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven from ..._utils import ( maybe_transform, async_maybe_transform, ) from ..._compat import cached_property -from .knowledge import ( - KnowledgeResource, - AsyncKnowledgeResource, - KnowledgeResourceWithRawResponse, - AsyncKnowledgeResourceWithRawResponse, - KnowledgeResourceWithStreamingResponse, - AsyncKnowledgeResourceWithStreamingResponse, -) from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( to_raw_response_wrapper, @@ -49,8 +49,8 @@ def access_keys(self) -> AccessKeysResource: return AccessKeysResource(self._client) @cached_property - def knowledge(self) -> KnowledgeResource: - return KnowledgeResource(self._client) + def entries(self) -> EntriesResource: + return EntriesResource(self._client) @cached_property def with_raw_response(self) -> ProjectsResourceWithRawResponse: @@ -58,7 +58,7 @@ def with_raw_response(self) -> ProjectsResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return ProjectsResourceWithRawResponse(self) @@ -67,7 +67,7 @@ def with_streaming_response(self) -> ProjectsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return ProjectsResourceWithStreamingResponse(self) @@ -292,8 +292,8 @@ def access_keys(self) -> AsyncAccessKeysResource: return AsyncAccessKeysResource(self._client) @cached_property - def knowledge(self) -> AsyncKnowledgeResource: - return AsyncKnowledgeResource(self._client) + def entries(self) -> AsyncEntriesResource: + return AsyncEntriesResource(self._client) @cached_property def with_raw_response(self) -> AsyncProjectsResourceWithRawResponse: @@ -301,7 +301,7 @@ def with_raw_response(self) -> AsyncProjectsResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return AsyncProjectsResourceWithRawResponse(self) @@ -310,7 +310,7 @@ def with_streaming_response(self) -> AsyncProjectsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return AsyncProjectsResourceWithStreamingResponse(self) @@ -559,8 +559,8 @@ def access_keys(self) -> AccessKeysResourceWithRawResponse: return AccessKeysResourceWithRawResponse(self._projects.access_keys) @cached_property - def knowledge(self) -> KnowledgeResourceWithRawResponse: - return KnowledgeResourceWithRawResponse(self._projects.knowledge) + def entries(self) -> EntriesResourceWithRawResponse: + return EntriesResourceWithRawResponse(self._projects.entries) class AsyncProjectsResourceWithRawResponse: @@ -591,8 +591,8 @@ def access_keys(self) -> AsyncAccessKeysResourceWithRawResponse: return AsyncAccessKeysResourceWithRawResponse(self._projects.access_keys) @cached_property - def knowledge(self) -> AsyncKnowledgeResourceWithRawResponse: - return AsyncKnowledgeResourceWithRawResponse(self._projects.knowledge) + def entries(self) -> AsyncEntriesResourceWithRawResponse: + return AsyncEntriesResourceWithRawResponse(self._projects.entries) class ProjectsResourceWithStreamingResponse: @@ -623,8 +623,8 @@ def access_keys(self) -> AccessKeysResourceWithStreamingResponse: return AccessKeysResourceWithStreamingResponse(self._projects.access_keys) @cached_property - def knowledge(self) -> KnowledgeResourceWithStreamingResponse: - return KnowledgeResourceWithStreamingResponse(self._projects.knowledge) + def entries(self) -> EntriesResourceWithStreamingResponse: + return EntriesResourceWithStreamingResponse(self._projects.entries) class AsyncProjectsResourceWithStreamingResponse: @@ -655,5 +655,5 @@ def access_keys(self) -> AsyncAccessKeysResourceWithStreamingResponse: return AsyncAccessKeysResourceWithStreamingResponse(self._projects.access_keys) @cached_property - def knowledge(self) -> AsyncKnowledgeResourceWithStreamingResponse: - return AsyncKnowledgeResourceWithStreamingResponse(self._projects.knowledge) + def entries(self) -> AsyncEntriesResourceWithStreamingResponse: + return AsyncEntriesResourceWithStreamingResponse(self._projects.entries) diff --git a/src/codex/resources/users/myself/api_key.py b/src/codex/resources/users/myself/api_key.py index f4108375..c2784b81 100644 --- a/src/codex/resources/users/myself/api_key.py +++ b/src/codex/resources/users/myself/api_key.py @@ -26,7 +26,7 @@ def with_raw_response(self) -> APIKeyResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return APIKeyResourceWithRawResponse(self) @@ -35,7 +35,7 @@ def with_streaming_response(self) -> APIKeyResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return APIKeyResourceWithStreamingResponse(self) @@ -66,7 +66,7 @@ def with_raw_response(self) -> AsyncAPIKeyResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return AsyncAPIKeyResourceWithRawResponse(self) @@ -75,7 +75,7 @@ def with_streaming_response(self) -> AsyncAPIKeyResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return AsyncAPIKeyResourceWithStreamingResponse(self) diff --git a/src/codex/resources/users/myself/myself.py b/src/codex/resources/users/myself/myself.py index 51d0b16b..ba4548e5 100644 --- a/src/codex/resources/users/myself/myself.py +++ b/src/codex/resources/users/myself/myself.py @@ -50,7 +50,7 @@ def with_raw_response(self) -> MyselfResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return MyselfResourceWithRawResponse(self) @@ -59,7 +59,7 @@ def with_streaming_response(self) -> MyselfResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return MyselfResourceWithStreamingResponse(self) @@ -98,7 +98,7 @@ def with_raw_response(self) -> AsyncMyselfResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return AsyncMyselfResourceWithRawResponse(self) @@ -107,7 +107,7 @@ def with_streaming_response(self) -> AsyncMyselfResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return AsyncMyselfResourceWithStreamingResponse(self) diff --git a/src/codex/resources/users/myself/organizations.py b/src/codex/resources/users/myself/organizations.py index 5c37dd69..12e799aa 100644 --- a/src/codex/resources/users/myself/organizations.py +++ b/src/codex/resources/users/myself/organizations.py @@ -26,7 +26,7 @@ def with_raw_response(self) -> OrganizationsResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return OrganizationsResourceWithRawResponse(self) @@ -35,7 +35,7 @@ def with_streaming_response(self) -> OrganizationsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return OrganizationsResourceWithStreamingResponse(self) @@ -66,7 +66,7 @@ def with_raw_response(self) -> AsyncOrganizationsResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return AsyncOrganizationsResourceWithRawResponse(self) @@ -75,7 +75,7 @@ def with_streaming_response(self) -> AsyncOrganizationsResourceWithStreamingResp """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return AsyncOrganizationsResourceWithStreamingResponse(self) diff --git a/src/codex/resources/users/users.py b/src/codex/resources/users/users.py index 4d229677..ea5019c2 100644 --- a/src/codex/resources/users/users.py +++ b/src/codex/resources/users/users.py @@ -27,7 +27,7 @@ def with_raw_response(self) -> UsersResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return UsersResourceWithRawResponse(self) @@ -36,7 +36,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/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return UsersResourceWithStreamingResponse(self) @@ -52,7 +52,7 @@ def with_raw_response(self) -> AsyncUsersResourceWithRawResponse: 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/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers """ return AsyncUsersResourceWithRawResponse(self) @@ -61,7 +61,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/codex-python#with_streaming_response + For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response """ return AsyncUsersResourceWithStreamingResponse(self) diff --git a/src/codex/types/projects/__init__.py b/src/codex/types/projects/__init__.py index 9813f780..44c304f5 100644 --- a/src/codex/types/projects/__init__.py +++ b/src/codex/types/projects/__init__.py @@ -4,15 +4,14 @@ from .entry import Entry as Entry from .access_key_schema import AccessKeySchema as AccessKeySchema -from .knowledge_list_params import KnowledgeListParams as KnowledgeListParams -from .knowledge_query_params import KnowledgeQueryParams as KnowledgeQueryParams -from .knowledge_create_params import KnowledgeCreateParams as KnowledgeCreateParams -from .knowledge_update_params import KnowledgeUpdateParams as KnowledgeUpdateParams -from .list_knowledge_response import ListKnowledgeResponse as ListKnowledgeResponse +from .entry_list_params import EntryListParams as EntryListParams +from .entry_query_params import EntryQueryParams as EntryQueryParams +from .entry_create_params import EntryCreateParams as EntryCreateParams +from .entry_update_params import EntryUpdateParams as EntryUpdateParams from .access_key_create_params import AccessKeyCreateParams as AccessKeyCreateParams from .access_key_list_response import AccessKeyListResponse as AccessKeyListResponse from .access_key_update_params import AccessKeyUpdateParams as AccessKeyUpdateParams -from .knowledge_add_question_params import KnowledgeAddQuestionParams as KnowledgeAddQuestionParams +from .entry_add_question_params import EntryAddQuestionParams as EntryAddQuestionParams from .access_key_retrieve_project_id_response import ( AccessKeyRetrieveProjectIDResponse as AccessKeyRetrieveProjectIDResponse, ) diff --git a/src/codex/types/projects/knowledge_add_question_params.py b/src/codex/types/projects/entry_add_question_params.py similarity index 67% rename from src/codex/types/projects/knowledge_add_question_params.py rename to src/codex/types/projects/entry_add_question_params.py index 97115554..e2d009b4 100644 --- a/src/codex/types/projects/knowledge_add_question_params.py +++ b/src/codex/types/projects/entry_add_question_params.py @@ -4,8 +4,8 @@ from typing_extensions import Required, TypedDict -__all__ = ["KnowledgeAddQuestionParams"] +__all__ = ["EntryAddQuestionParams"] -class KnowledgeAddQuestionParams(TypedDict, total=False): +class EntryAddQuestionParams(TypedDict, total=False): question: Required[str] diff --git a/src/codex/types/projects/knowledge_create_params.py b/src/codex/types/projects/entry_create_params.py similarity index 74% rename from src/codex/types/projects/knowledge_create_params.py rename to src/codex/types/projects/entry_create_params.py index 9c544e6e..1ac23dd4 100644 --- a/src/codex/types/projects/knowledge_create_params.py +++ b/src/codex/types/projects/entry_create_params.py @@ -5,10 +5,10 @@ from typing import Optional from typing_extensions import Required, TypedDict -__all__ = ["KnowledgeCreateParams"] +__all__ = ["EntryCreateParams"] -class KnowledgeCreateParams(TypedDict, total=False): +class EntryCreateParams(TypedDict, total=False): question: Required[str] answer: Optional[str] diff --git a/src/codex/types/projects/knowledge_list_params.py b/src/codex/types/projects/entry_list_params.py similarity index 80% rename from src/codex/types/projects/knowledge_list_params.py rename to src/codex/types/projects/entry_list_params.py index 45aee13e..b50181f7 100644 --- a/src/codex/types/projects/knowledge_list_params.py +++ b/src/codex/types/projects/entry_list_params.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, TypedDict -__all__ = ["KnowledgeListParams"] +__all__ = ["EntryListParams"] -class KnowledgeListParams(TypedDict, total=False): +class EntryListParams(TypedDict, total=False): answered_only: bool limit: int diff --git a/src/codex/types/projects/knowledge_query_params.py b/src/codex/types/projects/entry_query_params.py similarity index 70% rename from src/codex/types/projects/knowledge_query_params.py rename to src/codex/types/projects/entry_query_params.py index 2c8097af..b6fbc437 100644 --- a/src/codex/types/projects/knowledge_query_params.py +++ b/src/codex/types/projects/entry_query_params.py @@ -4,8 +4,8 @@ from typing_extensions import Required, TypedDict -__all__ = ["KnowledgeQueryParams"] +__all__ = ["EntryQueryParams"] -class KnowledgeQueryParams(TypedDict, total=False): +class EntryQueryParams(TypedDict, total=False): question: Required[str] diff --git a/src/codex/types/projects/knowledge_update_params.py b/src/codex/types/projects/entry_update_params.py similarity index 76% rename from src/codex/types/projects/knowledge_update_params.py rename to src/codex/types/projects/entry_update_params.py index b5e22269..4a7c6527 100644 --- a/src/codex/types/projects/knowledge_update_params.py +++ b/src/codex/types/projects/entry_update_params.py @@ -5,10 +5,10 @@ from typing import Optional from typing_extensions import Required, TypedDict -__all__ = ["KnowledgeUpdateParams"] +__all__ = ["EntryUpdateParams"] -class KnowledgeUpdateParams(TypedDict, total=False): +class EntryUpdateParams(TypedDict, total=False): project_id: Required[int] answer: Optional[str] diff --git a/src/codex/types/projects/list_knowledge_response.py b/src/codex/types/projects/list_knowledge_response.py deleted file mode 100644 index d32f4e38..00000000 --- a/src/codex/types/projects/list_knowledge_response.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .entry import Entry -from ..._models import BaseModel - -__all__ = ["ListKnowledgeResponse"] - - -class ListKnowledgeResponse(BaseModel): - entries: List[Entry] - - total_count: int diff --git a/tests/api_resources/organizations/test_billing.py b/tests/api_resources/organizations/test_billing.py index ccb7dc8a..e3bb1d1d 100644 --- a/tests/api_resources/organizations/test_billing.py +++ b/tests/api_resources/organizations/test_billing.py @@ -17,6 +17,7 @@ class TestBilling: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize def test_method_invoices(self, client: Codex) -> None: billing = client.organizations.billing.invoices( @@ -24,6 +25,7 @@ def test_method_invoices(self, client: Codex) -> None: ) assert_matches_type(OrganizationBillingInvoicesSchema, billing, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_invoices(self, client: Codex) -> None: response = client.organizations.billing.with_raw_response.invoices( @@ -35,6 +37,7 @@ def test_raw_response_invoices(self, client: Codex) -> None: billing = response.parse() assert_matches_type(OrganizationBillingInvoicesSchema, billing, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_invoices(self, client: Codex) -> None: with client.organizations.billing.with_streaming_response.invoices( @@ -48,6 +51,7 @@ def test_streaming_response_invoices(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_path_params_invoices(self, client: Codex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"): @@ -55,6 +59,7 @@ def test_path_params_invoices(self, client: Codex) -> None: "", ) + @pytest.mark.skip() @parametrize def test_method_usage(self, client: Codex) -> None: billing = client.organizations.billing.usage( @@ -62,6 +67,7 @@ def test_method_usage(self, client: Codex) -> None: ) assert_matches_type(OrganizationBillingUsageSchema, billing, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_usage(self, client: Codex) -> None: response = client.organizations.billing.with_raw_response.usage( @@ -73,6 +79,7 @@ def test_raw_response_usage(self, client: Codex) -> None: billing = response.parse() assert_matches_type(OrganizationBillingUsageSchema, billing, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_usage(self, client: Codex) -> None: with client.organizations.billing.with_streaming_response.usage( @@ -86,6 +93,7 @@ def test_streaming_response_usage(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_path_params_usage(self, client: Codex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"): @@ -97,6 +105,7 @@ def test_path_params_usage(self, client: Codex) -> None: class TestAsyncBilling: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize async def test_method_invoices(self, async_client: AsyncCodex) -> None: billing = await async_client.organizations.billing.invoices( @@ -104,6 +113,7 @@ async def test_method_invoices(self, async_client: AsyncCodex) -> None: ) assert_matches_type(OrganizationBillingInvoicesSchema, billing, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_invoices(self, async_client: AsyncCodex) -> None: response = await async_client.organizations.billing.with_raw_response.invoices( @@ -115,6 +125,7 @@ async def test_raw_response_invoices(self, async_client: AsyncCodex) -> None: billing = await response.parse() assert_matches_type(OrganizationBillingInvoicesSchema, billing, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_invoices(self, async_client: AsyncCodex) -> None: async with async_client.organizations.billing.with_streaming_response.invoices( @@ -128,6 +139,7 @@ async def test_streaming_response_invoices(self, async_client: AsyncCodex) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_path_params_invoices(self, async_client: AsyncCodex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"): @@ -135,6 +147,7 @@ async def test_path_params_invoices(self, async_client: AsyncCodex) -> None: "", ) + @pytest.mark.skip() @parametrize async def test_method_usage(self, async_client: AsyncCodex) -> None: billing = await async_client.organizations.billing.usage( @@ -142,6 +155,7 @@ async def test_method_usage(self, async_client: AsyncCodex) -> None: ) assert_matches_type(OrganizationBillingUsageSchema, billing, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_usage(self, async_client: AsyncCodex) -> None: response = await async_client.organizations.billing.with_raw_response.usage( @@ -153,6 +167,7 @@ async def test_raw_response_usage(self, async_client: AsyncCodex) -> None: billing = await response.parse() assert_matches_type(OrganizationBillingUsageSchema, billing, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_usage(self, async_client: AsyncCodex) -> None: async with async_client.organizations.billing.with_streaming_response.usage( @@ -166,6 +181,7 @@ async def test_streaming_response_usage(self, async_client: AsyncCodex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_path_params_usage(self, async_client: AsyncCodex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"): diff --git a/tests/api_resources/projects/test_access_keys.py b/tests/api_resources/projects/test_access_keys.py index eab961cc..cdb893e6 100644 --- a/tests/api_resources/projects/test_access_keys.py +++ b/tests/api_resources/projects/test_access_keys.py @@ -22,6 +22,7 @@ class TestAccessKeys: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize def test_method_create(self, client: Codex) -> None: access_key = client.projects.access_keys.create( @@ -30,6 +31,7 @@ def test_method_create(self, client: Codex) -> None: ) assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Codex) -> None: access_key = client.projects.access_keys.create( @@ -40,6 +42,7 @@ def test_method_create_with_all_params(self, client: Codex) -> None: ) assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Codex) -> None: response = client.projects.access_keys.with_raw_response.create( @@ -52,6 +55,7 @@ def test_raw_response_create(self, client: Codex) -> None: access_key = response.parse() assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Codex) -> None: with client.projects.access_keys.with_streaming_response.create( @@ -66,6 +70,7 @@ def test_streaming_response_create(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Codex) -> None: access_key = client.projects.access_keys.retrieve( @@ -74,6 +79,7 @@ def test_method_retrieve(self, client: Codex) -> None: ) assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Codex) -> None: response = client.projects.access_keys.with_raw_response.retrieve( @@ -86,6 +92,7 @@ def test_raw_response_retrieve(self, client: Codex) -> None: access_key = response.parse() assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Codex) -> None: with client.projects.access_keys.with_streaming_response.retrieve( @@ -100,6 +107,7 @@ def test_streaming_response_retrieve(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_update(self, client: Codex) -> None: access_key = client.projects.access_keys.update( @@ -109,6 +117,7 @@ def test_method_update(self, client: Codex) -> None: ) assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Codex) -> None: access_key = client.projects.access_keys.update( @@ -120,6 +129,7 @@ def test_method_update_with_all_params(self, client: Codex) -> None: ) assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Codex) -> None: response = client.projects.access_keys.with_raw_response.update( @@ -133,6 +143,7 @@ def test_raw_response_update(self, client: Codex) -> None: access_key = response.parse() assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Codex) -> None: with client.projects.access_keys.with_streaming_response.update( @@ -148,6 +159,7 @@ def test_streaming_response_update(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_list(self, client: Codex) -> None: access_key = client.projects.access_keys.list( @@ -155,6 +167,7 @@ def test_method_list(self, client: Codex) -> None: ) assert_matches_type(AccessKeyListResponse, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Codex) -> None: response = client.projects.access_keys.with_raw_response.list( @@ -166,6 +179,7 @@ def test_raw_response_list(self, client: Codex) -> None: access_key = response.parse() assert_matches_type(AccessKeyListResponse, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Codex) -> None: with client.projects.access_keys.with_streaming_response.list( @@ -179,6 +193,7 @@ def test_streaming_response_list(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_delete(self, client: Codex) -> None: access_key = client.projects.access_keys.delete( @@ -187,6 +202,7 @@ def test_method_delete(self, client: Codex) -> None: ) assert access_key is None + @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Codex) -> None: response = client.projects.access_keys.with_raw_response.delete( @@ -199,6 +215,7 @@ def test_raw_response_delete(self, client: Codex) -> None: access_key = response.parse() assert access_key is None + @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Codex) -> None: with client.projects.access_keys.with_streaming_response.delete( @@ -213,11 +230,13 @@ def test_streaming_response_delete(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_retrieve_project_id(self, client: Codex) -> None: access_key = client.projects.access_keys.retrieve_project_id() assert_matches_type(AccessKeyRetrieveProjectIDResponse, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_retrieve_project_id(self, client: Codex) -> None: response = client.projects.access_keys.with_raw_response.retrieve_project_id() @@ -227,6 +246,7 @@ def test_raw_response_retrieve_project_id(self, client: Codex) -> None: access_key = response.parse() assert_matches_type(AccessKeyRetrieveProjectIDResponse, access_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_retrieve_project_id(self, client: Codex) -> None: with client.projects.access_keys.with_streaming_response.retrieve_project_id() as response: @@ -238,6 +258,7 @@ def test_streaming_response_retrieve_project_id(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_revoke(self, client: Codex) -> None: access_key = client.projects.access_keys.revoke( @@ -246,6 +267,7 @@ def test_method_revoke(self, client: Codex) -> None: ) assert access_key is None + @pytest.mark.skip() @parametrize def test_raw_response_revoke(self, client: Codex) -> None: response = client.projects.access_keys.with_raw_response.revoke( @@ -258,6 +280,7 @@ def test_raw_response_revoke(self, client: Codex) -> None: access_key = response.parse() assert access_key is None + @pytest.mark.skip() @parametrize def test_streaming_response_revoke(self, client: Codex) -> None: with client.projects.access_keys.with_streaming_response.revoke( @@ -276,6 +299,7 @@ def test_streaming_response_revoke(self, client: Codex) -> None: class TestAsyncAccessKeys: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCodex) -> None: access_key = await async_client.projects.access_keys.create( @@ -284,6 +308,7 @@ async def test_method_create(self, async_client: AsyncCodex) -> None: ) assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCodex) -> None: access_key = await async_client.projects.access_keys.create( @@ -294,6 +319,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCodex) -> ) assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCodex) -> None: response = await async_client.projects.access_keys.with_raw_response.create( @@ -306,6 +332,7 @@ async def test_raw_response_create(self, async_client: AsyncCodex) -> None: access_key = await response.parse() assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCodex) -> None: async with async_client.projects.access_keys.with_streaming_response.create( @@ -320,6 +347,7 @@ async def test_streaming_response_create(self, async_client: AsyncCodex) -> None assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncCodex) -> None: access_key = await async_client.projects.access_keys.retrieve( @@ -328,6 +356,7 @@ async def test_method_retrieve(self, async_client: AsyncCodex) -> None: ) assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncCodex) -> None: response = await async_client.projects.access_keys.with_raw_response.retrieve( @@ -340,6 +369,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncCodex) -> None: access_key = await response.parse() assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncCodex) -> None: async with async_client.projects.access_keys.with_streaming_response.retrieve( @@ -354,6 +384,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncCodex) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCodex) -> None: access_key = await async_client.projects.access_keys.update( @@ -363,6 +394,7 @@ async def test_method_update(self, async_client: AsyncCodex) -> None: ) assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCodex) -> None: access_key = await async_client.projects.access_keys.update( @@ -374,6 +406,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCodex) -> ) assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCodex) -> None: response = await async_client.projects.access_keys.with_raw_response.update( @@ -387,6 +420,7 @@ async def test_raw_response_update(self, async_client: AsyncCodex) -> None: access_key = await response.parse() assert_matches_type(AccessKeySchema, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCodex) -> None: async with async_client.projects.access_keys.with_streaming_response.update( @@ -402,6 +436,7 @@ async def test_streaming_response_update(self, async_client: AsyncCodex) -> None assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCodex) -> None: access_key = await async_client.projects.access_keys.list( @@ -409,6 +444,7 @@ async def test_method_list(self, async_client: AsyncCodex) -> None: ) assert_matches_type(AccessKeyListResponse, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCodex) -> None: response = await async_client.projects.access_keys.with_raw_response.list( @@ -420,6 +456,7 @@ async def test_raw_response_list(self, async_client: AsyncCodex) -> None: access_key = await response.parse() assert_matches_type(AccessKeyListResponse, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCodex) -> None: async with async_client.projects.access_keys.with_streaming_response.list( @@ -433,6 +470,7 @@ async def test_streaming_response_list(self, async_client: AsyncCodex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCodex) -> None: access_key = await async_client.projects.access_keys.delete( @@ -441,6 +479,7 @@ async def test_method_delete(self, async_client: AsyncCodex) -> None: ) assert access_key is None + @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCodex) -> None: response = await async_client.projects.access_keys.with_raw_response.delete( @@ -453,6 +492,7 @@ async def test_raw_response_delete(self, async_client: AsyncCodex) -> None: access_key = await response.parse() assert access_key is None + @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCodex) -> None: async with async_client.projects.access_keys.with_streaming_response.delete( @@ -467,11 +507,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCodex) -> None assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_retrieve_project_id(self, async_client: AsyncCodex) -> None: access_key = await async_client.projects.access_keys.retrieve_project_id() assert_matches_type(AccessKeyRetrieveProjectIDResponse, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_retrieve_project_id(self, async_client: AsyncCodex) -> None: response = await async_client.projects.access_keys.with_raw_response.retrieve_project_id() @@ -481,6 +523,7 @@ async def test_raw_response_retrieve_project_id(self, async_client: AsyncCodex) access_key = await response.parse() assert_matches_type(AccessKeyRetrieveProjectIDResponse, access_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve_project_id(self, async_client: AsyncCodex) -> None: async with async_client.projects.access_keys.with_streaming_response.retrieve_project_id() as response: @@ -492,6 +535,7 @@ async def test_streaming_response_retrieve_project_id(self, async_client: AsyncC assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_revoke(self, async_client: AsyncCodex) -> None: access_key = await async_client.projects.access_keys.revoke( @@ -500,6 +544,7 @@ async def test_method_revoke(self, async_client: AsyncCodex) -> None: ) assert access_key is None + @pytest.mark.skip() @parametrize async def test_raw_response_revoke(self, async_client: AsyncCodex) -> None: response = await async_client.projects.access_keys.with_raw_response.revoke( @@ -512,6 +557,7 @@ async def test_raw_response_revoke(self, async_client: AsyncCodex) -> None: access_key = await response.parse() assert access_key is None + @pytest.mark.skip() @parametrize async def test_streaming_response_revoke(self, async_client: AsyncCodex) -> None: async with async_client.projects.access_keys.with_streaming_response.revoke( diff --git a/tests/api_resources/projects/test_knowledge.py b/tests/api_resources/projects/test_entries.py similarity index 62% rename from tests/api_resources/projects/test_knowledge.py rename to tests/api_resources/projects/test_entries.py index 9052b62d..e1c36e3b 100644 --- a/tests/api_resources/projects/test_knowledge.py +++ b/tests/api_resources/projects/test_entries.py @@ -9,164 +9,179 @@ from codex import Codex, AsyncCodex from tests.utils import assert_matches_type +from codex.pagination import SyncOffsetPageEntries, AsyncOffsetPageEntries from codex.types.projects import ( Entry, - ListKnowledgeResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestKnowledge: +class TestEntries: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize def test_method_create(self, client: Codex) -> None: - knowledge = client.projects.knowledge.create( + entry = client.projects.entries.create( project_id=0, question="question", ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Codex) -> None: - knowledge = client.projects.knowledge.create( + entry = client.projects.entries.create( project_id=0, question="question", answer="answer", ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Codex) -> None: - response = client.projects.knowledge.with_raw_response.create( + response = client.projects.entries.with_raw_response.create( project_id=0, question="question", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Codex) -> None: - with client.projects.knowledge.with_streaming_response.create( + with client.projects.entries.with_streaming_response.create( project_id=0, question="question", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(Entry, entry, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Codex) -> None: - knowledge = client.projects.knowledge.retrieve( + entry = client.projects.entries.retrieve( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Codex) -> None: - response = client.projects.knowledge.with_raw_response.retrieve( + response = client.projects.entries.with_raw_response.retrieve( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Codex) -> None: - with client.projects.knowledge.with_streaming_response.retrieve( + with client.projects.entries.with_streaming_response.retrieve( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(Entry, entry, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_path_params_retrieve(self, client: Codex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): - client.projects.knowledge.with_raw_response.retrieve( + client.projects.entries.with_raw_response.retrieve( entry_id="", project_id=0, ) + @pytest.mark.skip() @parametrize def test_method_update(self, client: Codex) -> None: - knowledge = client.projects.knowledge.update( + entry = client.projects.entries.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Codex) -> None: - knowledge = client.projects.knowledge.update( + entry = client.projects.entries.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, answer="answer", question="question", ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Codex) -> None: - response = client.projects.knowledge.with_raw_response.update( + response = client.projects.entries.with_raw_response.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Codex) -> None: - with client.projects.knowledge.with_streaming_response.update( + with client.projects.entries.with_streaming_response.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(Entry, entry, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Codex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): - client.projects.knowledge.with_raw_response.update( + client.projects.entries.with_raw_response.update( entry_id="", project_id=0, ) + @pytest.mark.skip() @parametrize def test_method_list(self, client: Codex) -> None: - knowledge = client.projects.knowledge.list( + entry = client.projects.entries.list( project_id=0, ) - assert_matches_type(ListKnowledgeResponse, knowledge, path=["response"]) + assert_matches_type(SyncOffsetPageEntries[Entry], entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Codex) -> None: - knowledge = client.projects.knowledge.list( + entry = client.projects.entries.list( project_id=0, answered_only=True, limit=1, @@ -175,293 +190,320 @@ def test_method_list_with_all_params(self, client: Codex) -> None: sort="created_at", unanswered_only=True, ) - assert_matches_type(ListKnowledgeResponse, knowledge, path=["response"]) + assert_matches_type(SyncOffsetPageEntries[Entry], entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Codex) -> None: - response = client.projects.knowledge.with_raw_response.list( + response = client.projects.entries.with_raw_response.list( project_id=0, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(ListKnowledgeResponse, knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(SyncOffsetPageEntries[Entry], entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Codex) -> None: - with client.projects.knowledge.with_streaming_response.list( + with client.projects.entries.with_streaming_response.list( project_id=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(ListKnowledgeResponse, knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(SyncOffsetPageEntries[Entry], entry, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_delete(self, client: Codex) -> None: - knowledge = client.projects.knowledge.delete( + entry = client.projects.entries.delete( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) - assert knowledge is None + assert entry is None + @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Codex) -> None: - response = client.projects.knowledge.with_raw_response.delete( + response = client.projects.entries.with_raw_response.delete( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert knowledge is None + entry = response.parse() + assert entry is None + @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Codex) -> None: - with client.projects.knowledge.with_streaming_response.delete( + with client.projects.entries.with_streaming_response.delete( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert knowledge is None + entry = response.parse() + assert entry is None assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Codex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): - client.projects.knowledge.with_raw_response.delete( + client.projects.entries.with_raw_response.delete( entry_id="", project_id=0, ) + @pytest.mark.skip() @parametrize def test_method_add_question(self, client: Codex) -> None: - knowledge = client.projects.knowledge.add_question( + entry = client.projects.entries.add_question( project_id=0, question="question", ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_add_question(self, client: Codex) -> None: - response = client.projects.knowledge.with_raw_response.add_question( + response = client.projects.entries.with_raw_response.add_question( project_id=0, question="question", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_add_question(self, client: Codex) -> None: - with client.projects.knowledge.with_streaming_response.add_question( + with client.projects.entries.with_streaming_response.add_question( project_id=0, question="question", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(Entry, entry, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_query(self, client: Codex) -> None: - knowledge = client.projects.knowledge.query( + entry = client.projects.entries.query( project_id=0, question="question", ) - assert_matches_type(Optional[Entry], knowledge, path=["response"]) + assert_matches_type(Optional[Entry], entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_query(self, client: Codex) -> None: - response = client.projects.knowledge.with_raw_response.query( + response = client.projects.entries.with_raw_response.query( project_id=0, question="question", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(Optional[Entry], knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(Optional[Entry], entry, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_query(self, client: Codex) -> None: - with client.projects.knowledge.with_streaming_response.query( + with client.projects.entries.with_streaming_response.query( project_id=0, question="question", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = response.parse() - assert_matches_type(Optional[Entry], knowledge, path=["response"]) + entry = response.parse() + assert_matches_type(Optional[Entry], entry, path=["response"]) assert cast(Any, response.is_closed) is True -class TestAsyncKnowledge: +class TestAsyncEntries: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCodex) -> None: - knowledge = await async_client.projects.knowledge.create( + entry = await async_client.projects.entries.create( project_id=0, question="question", ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCodex) -> None: - knowledge = await async_client.projects.knowledge.create( + entry = await async_client.projects.entries.create( project_id=0, question="question", answer="answer", ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCodex) -> None: - response = await async_client.projects.knowledge.with_raw_response.create( + response = await async_client.projects.entries.with_raw_response.create( project_id=0, question="question", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCodex) -> None: - async with async_client.projects.knowledge.with_streaming_response.create( + async with async_client.projects.entries.with_streaming_response.create( project_id=0, question="question", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(Entry, entry, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncCodex) -> None: - knowledge = await async_client.projects.knowledge.retrieve( + entry = await async_client.projects.entries.retrieve( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncCodex) -> None: - response = await async_client.projects.knowledge.with_raw_response.retrieve( + response = await async_client.projects.entries.with_raw_response.retrieve( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncCodex) -> None: - async with async_client.projects.knowledge.with_streaming_response.retrieve( + async with async_client.projects.entries.with_streaming_response.retrieve( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(Entry, entry, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_path_params_retrieve(self, async_client: AsyncCodex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): - await async_client.projects.knowledge.with_raw_response.retrieve( + await async_client.projects.entries.with_raw_response.retrieve( entry_id="", project_id=0, ) + @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCodex) -> None: - knowledge = await async_client.projects.knowledge.update( + entry = await async_client.projects.entries.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCodex) -> None: - knowledge = await async_client.projects.knowledge.update( + entry = await async_client.projects.entries.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, answer="answer", question="question", ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCodex) -> None: - response = await async_client.projects.knowledge.with_raw_response.update( + response = await async_client.projects.entries.with_raw_response.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCodex) -> None: - async with async_client.projects.knowledge.with_streaming_response.update( + async with async_client.projects.entries.with_streaming_response.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(Entry, entry, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCodex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): - await async_client.projects.knowledge.with_raw_response.update( + await async_client.projects.entries.with_raw_response.update( entry_id="", project_id=0, ) + @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCodex) -> None: - knowledge = await async_client.projects.knowledge.list( + entry = await async_client.projects.entries.list( project_id=0, ) - assert_matches_type(ListKnowledgeResponse, knowledge, path=["response"]) + assert_matches_type(AsyncOffsetPageEntries[Entry], entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCodex) -> None: - knowledge = await async_client.projects.knowledge.list( + entry = await async_client.projects.entries.list( project_id=0, answered_only=True, limit=1, @@ -470,138 +512,150 @@ async def test_method_list_with_all_params(self, async_client: AsyncCodex) -> No sort="created_at", unanswered_only=True, ) - assert_matches_type(ListKnowledgeResponse, knowledge, path=["response"]) + assert_matches_type(AsyncOffsetPageEntries[Entry], entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCodex) -> None: - response = await async_client.projects.knowledge.with_raw_response.list( + response = await async_client.projects.entries.with_raw_response.list( project_id=0, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(ListKnowledgeResponse, knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(AsyncOffsetPageEntries[Entry], entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCodex) -> None: - async with async_client.projects.knowledge.with_streaming_response.list( + async with async_client.projects.entries.with_streaming_response.list( project_id=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(ListKnowledgeResponse, knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(AsyncOffsetPageEntries[Entry], entry, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCodex) -> None: - knowledge = await async_client.projects.knowledge.delete( + entry = await async_client.projects.entries.delete( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) - assert knowledge is None + assert entry is None + @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCodex) -> None: - response = await async_client.projects.knowledge.with_raw_response.delete( + response = await async_client.projects.entries.with_raw_response.delete( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert knowledge is None + entry = await response.parse() + assert entry is None + @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCodex) -> None: - async with async_client.projects.knowledge.with_streaming_response.delete( + async with async_client.projects.entries.with_streaming_response.delete( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", project_id=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert knowledge is None + entry = await response.parse() + assert entry is None assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCodex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): - await async_client.projects.knowledge.with_raw_response.delete( + await async_client.projects.entries.with_raw_response.delete( entry_id="", project_id=0, ) + @pytest.mark.skip() @parametrize async def test_method_add_question(self, async_client: AsyncCodex) -> None: - knowledge = await async_client.projects.knowledge.add_question( + entry = await async_client.projects.entries.add_question( project_id=0, question="question", ) - assert_matches_type(Entry, knowledge, path=["response"]) + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_add_question(self, async_client: AsyncCodex) -> None: - response = await async_client.projects.knowledge.with_raw_response.add_question( + response = await async_client.projects.entries.with_raw_response.add_question( project_id=0, question="question", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(Entry, entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_add_question(self, async_client: AsyncCodex) -> None: - async with async_client.projects.knowledge.with_streaming_response.add_question( + async with async_client.projects.entries.with_streaming_response.add_question( project_id=0, question="question", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(Entry, knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(Entry, entry, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_query(self, async_client: AsyncCodex) -> None: - knowledge = await async_client.projects.knowledge.query( + entry = await async_client.projects.entries.query( project_id=0, question="question", ) - assert_matches_type(Optional[Entry], knowledge, path=["response"]) + assert_matches_type(Optional[Entry], entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_query(self, async_client: AsyncCodex) -> None: - response = await async_client.projects.knowledge.with_raw_response.query( + response = await async_client.projects.entries.with_raw_response.query( project_id=0, question="question", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(Optional[Entry], knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(Optional[Entry], entry, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_query(self, async_client: AsyncCodex) -> None: - async with async_client.projects.knowledge.with_streaming_response.query( + async with async_client.projects.entries.with_streaming_response.query( project_id=0, question="question", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - knowledge = await response.parse() - assert_matches_type(Optional[Entry], knowledge, path=["response"]) + entry = await response.parse() + assert_matches_type(Optional[Entry], entry, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_health.py b/tests/api_resources/test_health.py index be4729ab..09700120 100644 --- a/tests/api_resources/test_health.py +++ b/tests/api_resources/test_health.py @@ -17,11 +17,13 @@ class TestHealth: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize def test_method_check(self, client: Codex) -> None: health = client.health.check() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_check(self, client: Codex) -> None: response = client.health.with_raw_response.check() @@ -31,6 +33,7 @@ def test_raw_response_check(self, client: Codex) -> None: health = response.parse() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_check(self, client: Codex) -> None: with client.health.with_streaming_response.check() as response: @@ -42,11 +45,13 @@ def test_streaming_response_check(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_db(self, client: Codex) -> None: health = client.health.db() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_db(self, client: Codex) -> None: response = client.health.with_raw_response.db() @@ -56,6 +61,7 @@ def test_raw_response_db(self, client: Codex) -> None: health = response.parse() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_db(self, client: Codex) -> None: with client.health.with_streaming_response.db() as response: @@ -67,11 +73,13 @@ def test_streaming_response_db(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_weaviate(self, client: Codex) -> None: health = client.health.weaviate() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_weaviate(self, client: Codex) -> None: response = client.health.with_raw_response.weaviate() @@ -81,6 +89,7 @@ def test_raw_response_weaviate(self, client: Codex) -> None: health = response.parse() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_weaviate(self, client: Codex) -> None: with client.health.with_streaming_response.weaviate() as response: @@ -96,11 +105,13 @@ def test_streaming_response_weaviate(self, client: Codex) -> None: class TestAsyncHealth: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize async def test_method_check(self, async_client: AsyncCodex) -> None: health = await async_client.health.check() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_check(self, async_client: AsyncCodex) -> None: response = await async_client.health.with_raw_response.check() @@ -110,6 +121,7 @@ async def test_raw_response_check(self, async_client: AsyncCodex) -> None: health = await response.parse() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_check(self, async_client: AsyncCodex) -> None: async with async_client.health.with_streaming_response.check() as response: @@ -121,11 +133,13 @@ async def test_streaming_response_check(self, async_client: AsyncCodex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_db(self, async_client: AsyncCodex) -> None: health = await async_client.health.db() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_db(self, async_client: AsyncCodex) -> None: response = await async_client.health.with_raw_response.db() @@ -135,6 +149,7 @@ async def test_raw_response_db(self, async_client: AsyncCodex) -> None: health = await response.parse() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_db(self, async_client: AsyncCodex) -> None: async with async_client.health.with_streaming_response.db() as response: @@ -146,11 +161,13 @@ async def test_streaming_response_db(self, async_client: AsyncCodex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_weaviate(self, async_client: AsyncCodex) -> None: health = await async_client.health.weaviate() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_weaviate(self, async_client: AsyncCodex) -> None: response = await async_client.health.with_raw_response.weaviate() @@ -160,6 +177,7 @@ async def test_raw_response_weaviate(self, async_client: AsyncCodex) -> None: health = await response.parse() assert_matches_type(HealthCheckResponse, health, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_weaviate(self, async_client: AsyncCodex) -> None: async with async_client.health.with_streaming_response.weaviate() as response: diff --git a/tests/api_resources/test_organizations.py b/tests/api_resources/test_organizations.py index 2d627c70..1a13f77a 100644 --- a/tests/api_resources/test_organizations.py +++ b/tests/api_resources/test_organizations.py @@ -17,6 +17,7 @@ class TestOrganizations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Codex) -> None: organization = client.organizations.retrieve( @@ -24,6 +25,7 @@ def test_method_retrieve(self, client: Codex) -> None: ) assert_matches_type(OrganizationSchemaPublic, organization, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Codex) -> None: response = client.organizations.with_raw_response.retrieve( @@ -35,6 +37,7 @@ def test_raw_response_retrieve(self, client: Codex) -> None: organization = response.parse() assert_matches_type(OrganizationSchemaPublic, organization, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Codex) -> None: with client.organizations.with_streaming_response.retrieve( @@ -48,6 +51,7 @@ def test_streaming_response_retrieve(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_path_params_retrieve(self, client: Codex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"): @@ -59,6 +63,7 @@ def test_path_params_retrieve(self, client: Codex) -> None: class TestAsyncOrganizations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncCodex) -> None: organization = await async_client.organizations.retrieve( @@ -66,6 +71,7 @@ async def test_method_retrieve(self, async_client: AsyncCodex) -> None: ) assert_matches_type(OrganizationSchemaPublic, organization, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncCodex) -> None: response = await async_client.organizations.with_raw_response.retrieve( @@ -77,6 +83,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncCodex) -> None: organization = await response.parse() assert_matches_type(OrganizationSchemaPublic, organization, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncCodex) -> None: async with async_client.organizations.with_streaming_response.retrieve( @@ -90,6 +97,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncCodex) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_path_params_retrieve(self, async_client: AsyncCodex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"): diff --git a/tests/api_resources/test_projects.py b/tests/api_resources/test_projects.py index 7e79d8e8..388601d2 100644 --- a/tests/api_resources/test_projects.py +++ b/tests/api_resources/test_projects.py @@ -20,6 +20,7 @@ class TestProjects: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize def test_method_create(self, client: Codex) -> None: project = client.projects.create( @@ -29,6 +30,7 @@ def test_method_create(self, client: Codex) -> None: ) assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Codex) -> None: project = client.projects.create( @@ -39,6 +41,7 @@ def test_method_create_with_all_params(self, client: Codex) -> None: ) assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Codex) -> None: response = client.projects.with_raw_response.create( @@ -52,6 +55,7 @@ def test_raw_response_create(self, client: Codex) -> None: project = response.parse() assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Codex) -> None: with client.projects.with_streaming_response.create( @@ -67,6 +71,7 @@ def test_streaming_response_create(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Codex) -> None: project = client.projects.retrieve( @@ -74,6 +79,7 @@ def test_method_retrieve(self, client: Codex) -> None: ) assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Codex) -> None: response = client.projects.with_raw_response.retrieve( @@ -85,6 +91,7 @@ def test_raw_response_retrieve(self, client: Codex) -> None: project = response.parse() assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Codex) -> None: with client.projects.with_streaming_response.retrieve( @@ -98,6 +105,7 @@ def test_streaming_response_retrieve(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_update(self, client: Codex) -> None: project = client.projects.update( @@ -107,6 +115,7 @@ def test_method_update(self, client: Codex) -> None: ) assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Codex) -> None: project = client.projects.update( @@ -117,6 +126,7 @@ def test_method_update_with_all_params(self, client: Codex) -> None: ) assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Codex) -> None: response = client.projects.with_raw_response.update( @@ -130,6 +140,7 @@ def test_raw_response_update(self, client: Codex) -> None: project = response.parse() assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Codex) -> None: with client.projects.with_streaming_response.update( @@ -145,6 +156,7 @@ def test_streaming_response_update(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_list(self, client: Codex) -> None: project = client.projects.list( @@ -152,6 +164,7 @@ def test_method_list(self, client: Codex) -> None: ) assert_matches_type(ProjectListResponse, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Codex) -> None: response = client.projects.with_raw_response.list( @@ -163,6 +176,7 @@ def test_raw_response_list(self, client: Codex) -> None: project = response.parse() assert_matches_type(ProjectListResponse, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Codex) -> None: with client.projects.with_streaming_response.list( @@ -176,6 +190,7 @@ def test_streaming_response_list(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_delete(self, client: Codex) -> None: project = client.projects.delete( @@ -183,6 +198,7 @@ def test_method_delete(self, client: Codex) -> None: ) assert project is None + @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Codex) -> None: response = client.projects.with_raw_response.delete( @@ -194,6 +210,7 @@ def test_raw_response_delete(self, client: Codex) -> None: project = response.parse() assert project is None + @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Codex) -> None: with client.projects.with_streaming_response.delete( @@ -207,6 +224,7 @@ def test_streaming_response_delete(self, client: Codex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize def test_method_export(self, client: Codex) -> None: project = client.projects.export( @@ -214,6 +232,7 @@ def test_method_export(self, client: Codex) -> None: ) assert_matches_type(object, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_export(self, client: Codex) -> None: response = client.projects.with_raw_response.export( @@ -225,6 +244,7 @@ def test_raw_response_export(self, client: Codex) -> None: project = response.parse() assert_matches_type(object, project, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_export(self, client: Codex) -> None: with client.projects.with_streaming_response.export( @@ -242,6 +262,7 @@ def test_streaming_response_export(self, client: Codex) -> None: class TestAsyncProjects: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCodex) -> None: project = await async_client.projects.create( @@ -251,6 +272,7 @@ async def test_method_create(self, async_client: AsyncCodex) -> None: ) assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCodex) -> None: project = await async_client.projects.create( @@ -261,6 +283,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCodex) -> ) assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCodex) -> None: response = await async_client.projects.with_raw_response.create( @@ -274,6 +297,7 @@ async def test_raw_response_create(self, async_client: AsyncCodex) -> None: project = await response.parse() assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCodex) -> None: async with async_client.projects.with_streaming_response.create( @@ -289,6 +313,7 @@ async def test_streaming_response_create(self, async_client: AsyncCodex) -> None assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncCodex) -> None: project = await async_client.projects.retrieve( @@ -296,6 +321,7 @@ async def test_method_retrieve(self, async_client: AsyncCodex) -> None: ) assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncCodex) -> None: response = await async_client.projects.with_raw_response.retrieve( @@ -307,6 +333,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncCodex) -> None: project = await response.parse() assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncCodex) -> None: async with async_client.projects.with_streaming_response.retrieve( @@ -320,6 +347,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncCodex) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCodex) -> None: project = await async_client.projects.update( @@ -329,6 +357,7 @@ async def test_method_update(self, async_client: AsyncCodex) -> None: ) assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCodex) -> None: project = await async_client.projects.update( @@ -339,6 +368,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCodex) -> ) assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCodex) -> None: response = await async_client.projects.with_raw_response.update( @@ -352,6 +382,7 @@ async def test_raw_response_update(self, async_client: AsyncCodex) -> None: project = await response.parse() assert_matches_type(ProjectReturnSchema, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCodex) -> None: async with async_client.projects.with_streaming_response.update( @@ -367,6 +398,7 @@ async def test_streaming_response_update(self, async_client: AsyncCodex) -> None assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCodex) -> None: project = await async_client.projects.list( @@ -374,6 +406,7 @@ async def test_method_list(self, async_client: AsyncCodex) -> None: ) assert_matches_type(ProjectListResponse, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCodex) -> None: response = await async_client.projects.with_raw_response.list( @@ -385,6 +418,7 @@ async def test_raw_response_list(self, async_client: AsyncCodex) -> None: project = await response.parse() assert_matches_type(ProjectListResponse, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCodex) -> None: async with async_client.projects.with_streaming_response.list( @@ -398,6 +432,7 @@ async def test_streaming_response_list(self, async_client: AsyncCodex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCodex) -> None: project = await async_client.projects.delete( @@ -405,6 +440,7 @@ async def test_method_delete(self, async_client: AsyncCodex) -> None: ) assert project is None + @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCodex) -> None: response = await async_client.projects.with_raw_response.delete( @@ -416,6 +452,7 @@ async def test_raw_response_delete(self, async_client: AsyncCodex) -> None: project = await response.parse() assert project is None + @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCodex) -> None: async with async_client.projects.with_streaming_response.delete( @@ -429,6 +466,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCodex) -> None assert cast(Any, response.is_closed) is True + @pytest.mark.skip() @parametrize async def test_method_export(self, async_client: AsyncCodex) -> None: project = await async_client.projects.export( @@ -436,6 +474,7 @@ async def test_method_export(self, async_client: AsyncCodex) -> None: ) assert_matches_type(object, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_export(self, async_client: AsyncCodex) -> None: response = await async_client.projects.with_raw_response.export( @@ -447,6 +486,7 @@ async def test_raw_response_export(self, async_client: AsyncCodex) -> None: project = await response.parse() assert_matches_type(object, project, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_export(self, async_client: AsyncCodex) -> None: async with async_client.projects.with_streaming_response.export( diff --git a/tests/api_resources/users/myself/test_api_key.py b/tests/api_resources/users/myself/test_api_key.py index 55bba35f..68996997 100644 --- a/tests/api_resources/users/myself/test_api_key.py +++ b/tests/api_resources/users/myself/test_api_key.py @@ -17,11 +17,13 @@ class TestAPIKey: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize def test_method_refresh(self, client: Codex) -> None: api_key = client.users.myself.api_key.refresh() assert_matches_type(UserSchema, api_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_refresh(self, client: Codex) -> None: response = client.users.myself.api_key.with_raw_response.refresh() @@ -31,6 +33,7 @@ def test_raw_response_refresh(self, client: Codex) -> None: api_key = response.parse() assert_matches_type(UserSchema, api_key, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_refresh(self, client: Codex) -> None: with client.users.myself.api_key.with_streaming_response.refresh() as response: @@ -46,11 +49,13 @@ def test_streaming_response_refresh(self, client: Codex) -> None: class TestAsyncAPIKey: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize async def test_method_refresh(self, async_client: AsyncCodex) -> None: api_key = await async_client.users.myself.api_key.refresh() assert_matches_type(UserSchema, api_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_refresh(self, async_client: AsyncCodex) -> None: response = await async_client.users.myself.api_key.with_raw_response.refresh() @@ -60,6 +65,7 @@ async def test_raw_response_refresh(self, async_client: AsyncCodex) -> None: api_key = await response.parse() assert_matches_type(UserSchema, api_key, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_refresh(self, async_client: AsyncCodex) -> None: async with async_client.users.myself.api_key.with_streaming_response.refresh() as response: diff --git a/tests/api_resources/users/myself/test_organizations.py b/tests/api_resources/users/myself/test_organizations.py index da485882..9f35f7c6 100644 --- a/tests/api_resources/users/myself/test_organizations.py +++ b/tests/api_resources/users/myself/test_organizations.py @@ -17,11 +17,13 @@ class TestOrganizations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize def test_method_list(self, client: Codex) -> None: organization = client.users.myself.organizations.list() assert_matches_type(UserOrganizationsSchema, organization, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Codex) -> None: response = client.users.myself.organizations.with_raw_response.list() @@ -31,6 +33,7 @@ def test_raw_response_list(self, client: Codex) -> None: organization = response.parse() assert_matches_type(UserOrganizationsSchema, organization, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Codex) -> None: with client.users.myself.organizations.with_streaming_response.list() as response: @@ -46,11 +49,13 @@ def test_streaming_response_list(self, client: Codex) -> None: class TestAsyncOrganizations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCodex) -> None: organization = await async_client.users.myself.organizations.list() assert_matches_type(UserOrganizationsSchema, organization, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCodex) -> None: response = await async_client.users.myself.organizations.with_raw_response.list() @@ -60,6 +65,7 @@ async def test_raw_response_list(self, async_client: AsyncCodex) -> None: organization = await response.parse() assert_matches_type(UserOrganizationsSchema, organization, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCodex) -> None: async with async_client.users.myself.organizations.with_streaming_response.list() as response: diff --git a/tests/api_resources/users/test_myself.py b/tests/api_resources/users/test_myself.py index a206d1f9..63123275 100644 --- a/tests/api_resources/users/test_myself.py +++ b/tests/api_resources/users/test_myself.py @@ -17,11 +17,13 @@ class TestMyself: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Codex) -> None: myself = client.users.myself.retrieve() assert_matches_type(UserSchemaPublic, myself, path=["response"]) + @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Codex) -> None: response = client.users.myself.with_raw_response.retrieve() @@ -31,6 +33,7 @@ def test_raw_response_retrieve(self, client: Codex) -> None: myself = response.parse() assert_matches_type(UserSchemaPublic, myself, path=["response"]) + @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Codex) -> None: with client.users.myself.with_streaming_response.retrieve() as response: @@ -46,11 +49,13 @@ def test_streaming_response_retrieve(self, client: Codex) -> None: class TestAsyncMyself: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncCodex) -> None: myself = await async_client.users.myself.retrieve() assert_matches_type(UserSchemaPublic, myself, path=["response"]) + @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncCodex) -> None: response = await async_client.users.myself.with_raw_response.retrieve() @@ -60,6 +65,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncCodex) -> None: myself = await response.parse() assert_matches_type(UserSchemaPublic, myself, path=["response"]) + @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncCodex) -> None: async with async_client.users.myself.with_streaming_response.retrieve() as response: