Skip to content

Commit

Permalink
release: 0.1.0-alpha.7 (#20)
Browse files Browse the repository at this point in the history
* feat(api): OpenAPI spec update via Stainless API (#19)

* feat(api): OpenAPI spec update via Stainless API (#21)

* release: 0.1.0-alpha.7

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
  • Loading branch information
stainless-app[bot] authored May 22, 2024
1 parent f2a6ef5 commit 736d048
Show file tree
Hide file tree
Showing 34 changed files with 321 additions and 179 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,28 @@ jobs:
RYE_INSTALL_OPTION: '--yes'

- name: Install dependencies
run: |
rye sync --all-features
run: rye sync --all-features

- name: Run ruff
run: |
rye run check:ruff
- name: Run lints
run: ./scripts/lint
test:
name: test
runs-on: ubuntu-latest

- name: Run type checking
run: |
rye run typecheck
steps:
- uses: actions/checkout@v4

- name: Ensure importable
- name: Install Rye
run: |
rye run python -c 'import rizaio'
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

2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: github.repository == 'riza-io/riza-api-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check release environment
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ dist
.env
.envrc
codegen.log
Brewfile.lock.json
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.6"
".": "0.1.0-alpha.7"
}
1 change: 1 addition & 0 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
configured_endpoints: 1
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-7e044297a8d3c5c64964532d19e0667b059ef5a121cf3c1e64b806eec55e0767.yml
2 changes: 2 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
brew "rye"

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.1.0-alpha.7 (2024-05-22)

Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/riza-io/riza-api-python/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)

### Features

* **api:** OpenAPI spec update via Stainless API ([#19](https://github.com/riza-io/riza-api-python/issues/19)) ([0264f17](https://github.com/riza-io/riza-api-python/commit/0264f1720a39108489060c2621c5d0f1eead298f))
* **api:** OpenAPI spec update via Stainless API ([#21](https://github.com/riza-io/riza-api-python/issues/21)) ([307af07](https://github.com/riza-io/riza-api-python/commit/307af072f1c6babe273f106e77487ab4be84f01d))

## 0.1.0-alpha.6 (2024-04-23)

Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/riza-io/riza-api-python/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ client = Riza(
)

# Override per-request:
client.with_options(timeout=5 * 1000).command.exec(
client.with_options(timeout=5.0).command.exec(
code='print("Hello world!")',
language="PYTHON",
)
Expand Down Expand Up @@ -246,7 +246,7 @@ The context manager is required so that the response will reliably be closed.

### Making custom/undocumented requests

This library is typed for convenient access the documented API.
This library is typed for convenient access to the documented API.

If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Expand Down
27 changes: 27 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Security Policy

## Reporting Security Issues

This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.

To report a security issue, please contact the Stainless team at [email protected].

## Responsible Disclosure

We appreciate the efforts of security researchers and individuals who help us maintain the security of
SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible
disclosure practices by allowing us a reasonable amount of time to investigate and address the issue
before making any information public.

## Reporting Non-SDK Related Security Issues

If you encounter security issues that are not directly related to SDKs but pertain to the services
or products provided by Riza please follow the respective company's security reporting guidelines.

### Riza Terms and Policies

Please contact [email protected] for any questions or concerns regarding security of our services.

---

Thank you for helping us keep the SDKs and systems they interact with secure.
40 changes: 0 additions & 40 deletions bin/check-env-state.py

This file was deleted.

50 changes: 0 additions & 50 deletions bin/check-test-server

This file was deleted.

3 changes: 0 additions & 3 deletions bin/test

This file was deleted.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "rizaio"
version = "0.1.0-alpha.6"
version = "0.1.0-alpha.7"
description = "The official Python library for the riza API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -68,7 +68,7 @@ format = { chain = [
"fix:ruff",
]}
"format:black" = "black ."
"format:docs" = "python bin/ruffen-docs.py README.md api.md"
"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
"format:ruff" = "ruff format"
"format:isort" = "isort ."

Expand Down Expand Up @@ -191,5 +191,6 @@ known-first-party = ["rizaio", "tests"]

[tool.ruff.per-file-ignores]
"bin/**.py" = ["T201", "T203"]
"scripts/**.py" = ["T201", "T203"]
"tests/**.py" = ["T201", "T203"]
"examples/**.py" = ["T201", "T203"]
4 changes: 2 additions & 2 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ pluggy==1.3.0
# via pytest
py==1.11.0
# via pytest
pydantic==2.4.2
pydantic==2.7.1
# via rizaio
pydantic-core==2.10.1
pydantic-core==2.18.2
# via pydantic
pyright==1.1.359
pytest==7.1.1
Expand Down
4 changes: 2 additions & 2 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ httpx==0.25.2
idna==3.4
# via anyio
# via httpx
pydantic==2.4.2
pydantic==2.7.1
# via rizaio
pydantic-core==2.10.1
pydantic-core==2.18.2
# via pydantic
sniffio==1.3.0
# via anyio
Expand Down
19 changes: 19 additions & 0 deletions scripts/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
brew bundle check >/dev/null 2>&1 || {
echo "==> Installing Homebrew dependencies…"
brew bundle
}
fi

echo "==> Installing Python dependencies…"

# experimental uv support makes installations significantly faster
rye config --set-bool behavior.use-uv=true

rye sync
8 changes: 8 additions & 0 deletions scripts/format
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

echo "==> Running formatters"
rye run format
12 changes: 12 additions & 0 deletions scripts/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

echo "==> Running lints"
rye run lint

echo "==> Making sure it imports"
rye run python -c 'import rizaio'

41 changes: 41 additions & 0 deletions scripts/mock
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

if [[ -n "$1" && "$1" != '--'* ]]; then
URL="$1"
shift
else
URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)"
fi

# Check if the URL is empty
if [ -z "$URL" ]; then
echo "Error: No OpenAPI spec path/url provided or found in .stats.yml"
exit 1
fi

echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
echo -n "Waiting for server"
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
echo -n "."
sleep 0.1
done

if grep -q "✖ fatal" ".prism.log"; then
cat .prism.log
exit 1
fi

echo
else
npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL"
fi
Loading

0 comments on commit 736d048

Please sign in to comment.