diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53a56e8f..6fcd6aee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,5 +29,24 @@ 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-up.com/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: 0.24.0 + RYE_INSTALL_OPTION: '--yes' + + - name: Bootstrap + run: ./scripts/bootstrap + - name: Run tests + run: ./scripts/test diff --git a/.stats.yml b/.stats.yml index 2b7dbf39..dc4aadbb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1,2 @@ configured_endpoints: 6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openlayer%2Fopenlayer-7a4eecce275c87fdeff6194c1e6b1ccc1e703127193b0e6a381f73e358ea0bfb.yml diff --git a/README.md b/README.md index 6d7fd0d8..108252df 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Openlayer Python API library -[![PyPI version](https://img.shields.io/pypi/v/openlayer-test.svg)](https://pypi.org/project/openlayer-test/) +[![PyPI version](https://img.shields.io/pypi/v/openlayer.svg)](https://pypi.org/project/openlayer/) The Openlayer Python library provides convenient access to the Openlayer REST API from any Python 3.7+ application. The library includes type definitions for all request params and response fields, @@ -10,13 +10,13 @@ It is generated with [Stainless](https://www.stainlessapi.com/). ## Documentation -The REST API documentation can be found [on openlayer.com](https://openlayer.com/docs/api-reference/rest). The full API of this library can be found in [api.md](api.md). +The REST API documentation can be found [on openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). The full API of this library can be found in [api.md](api.md). ## Installation ```sh # install from PyPI -pip install --pre openlayer-test +pip install --pre openlayer ``` ## Usage diff --git a/pyproject.toml b/pyproject.toml index 9fab096e..317c1c39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "openlayer-test" +name = "openlayer" version = "0.1.0-alpha.2" description = "The official Python library for the openlayer API" dynamic = ["readme"] diff --git a/requirements-dev.lock b/requirements-dev.lock index 66ce6820..1bf683a9 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -12,7 +12,7 @@ annotated-types==0.6.0 # via pydantic anyio==4.1.0 # via httpx - # via openlayer-test + # via openlayer argcomplete==3.1.2 # via nox attrs==23.1.0 @@ -26,7 +26,7 @@ dirty-equals==0.6.0 distlib==0.3.7 # via virtualenv distro==1.8.0 - # via openlayer-test + # via openlayer exceptiongroup==1.1.3 # via anyio filelock==3.12.4 @@ -36,7 +36,7 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via openlayer-test + # via openlayer # via respx idna==3.4 # via anyio @@ -60,7 +60,7 @@ pluggy==1.3.0 py==1.11.0 # via pytest pydantic==2.7.1 - # via openlayer-test + # via openlayer pydantic-core==2.18.2 # via pydantic pyright==1.1.359 @@ -80,14 +80,14 @@ six==1.16.0 sniffio==1.3.0 # via anyio # via httpx - # via openlayer-test + # via openlayer time-machine==2.9.0 tomli==2.0.1 # via mypy # via pytest typing-extensions==4.8.0 # via mypy - # via openlayer-test + # via openlayer # via pydantic # via pydantic-core virtualenv==20.24.5 diff --git a/requirements.lock b/requirements.lock index 4e5a36e4..04f85d2e 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,12 +12,12 @@ annotated-types==0.6.0 # via pydantic anyio==4.1.0 # via httpx - # via openlayer-test + # via openlayer certifi==2023.7.22 # via httpcore # via httpx distro==1.8.0 - # via openlayer-test + # via openlayer exceptiongroup==1.1.3 # via anyio h11==0.14.0 @@ -25,19 +25,19 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via openlayer-test + # via openlayer idna==3.4 # via anyio # via httpx pydantic==2.7.1 - # via openlayer-test + # via openlayer pydantic-core==2.18.2 # via pydantic sniffio==1.3.0 # via anyio # via httpx - # via openlayer-test + # via openlayer typing-extensions==4.8.0 - # via openlayer-test + # via openlayer # via pydantic # via pydantic-core diff --git a/src/openlayer/_base_client.py b/src/openlayer/_base_client.py index 7cac0ba2..e56f38d8 100644 --- a/src/openlayer/_base_client.py +++ b/src/openlayer/_base_client.py @@ -361,7 +361,7 @@ def __init__( if max_retries is None: # pyright: ignore[reportUnnecessaryComparison] raise TypeError( - "max_retries cannot be None. If you want to disable retries, pass `0`; if you want unlimited retries, pass `math.inf` or a very high number; if you want the default behavior, pass `openlayer-test.DEFAULT_MAX_RETRIES`" + "max_retries cannot be None. If you want to disable retries, pass `0`; if you want unlimited retries, pass `math.inf` or a very high number; if you want the default behavior, pass `openlayer.DEFAULT_MAX_RETRIES`" ) def _enforce_trailing_slash(self, url: URL) -> URL: