Skip to content

Commit

Permalink
chore(internal): codegen related update (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Sep 13, 2024
1 parent da968f6 commit 213c89e
Show file tree
Hide file tree
Showing 19 changed files with 213 additions and 151 deletions.
22 changes: 11 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies = [
"distro>=1.7.0, <2",
"sniffio",
"cached-property; python_version < '3.8'",

]
requires-python = ">= 3.7"
classifiers = [
Expand All @@ -36,8 +35,6 @@ classifiers = [
"License :: OSI Approved :: Apache Software License"
]



[project.urls]
Homepage = "https://github.com/riza-io/riza-api-python"
Repository = "https://github.com/riza-io/riza-api-python"
Expand All @@ -59,7 +56,6 @@ dev-dependencies = [
"dirty-equals>=0.6.0",
"importlib-metadata>=6.7.0",
"rich>=13.7.1",

]

[tool.rye.scripts]
Expand All @@ -76,9 +72,12 @@ format = { chain = [
"lint" = { chain = [
"check:ruff",
"typecheck",
"check:importable",
]}
"check:ruff" = "ruff ."
"fix:ruff" = "ruff --fix ."
"check:ruff" = "ruff check ."
"fix:ruff" = "ruff check --fix ."

"check:importable" = "python -c 'import rizaio'"

typecheck = { chain = [
"typecheck:pyright",
Expand Down Expand Up @@ -162,6 +161,11 @@ reportPrivateUsage = false
line-length = 120
output-format = "grouped"
target-version = "py37"

[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint]
select = [
# isort
"I",
Expand Down Expand Up @@ -190,10 +194,6 @@ unfixable = [
"T201",
"T203",
]
ignore-init-module-imports = true

[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
Expand All @@ -205,7 +205,7 @@ combine-as-imports = true
extra-standard-library = ["typing_extensions"]
known-first-party = ["rizaio", "tests"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"bin/**.py" = ["T201", "T203"]
"scripts/**.py" = ["T201", "T203"]
"tests/**.py" = ["T201", "T203"]
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pydantic-core==2.18.2
# via pydantic
pygments==2.18.0
# via rich
pyright==1.1.364
pyright==1.1.374
pytest==7.1.1
# via pytest-asyncio
pytest-asyncio==0.21.1
Expand All @@ -80,7 +80,7 @@ pytz==2023.3.post1
# via dirty-equals
respx==0.20.2
rich==13.7.1
ruff==0.1.9
ruff==0.5.6
setuptools==68.2.2
# via nodeenv
six==1.16.0
Expand Down
4 changes: 2 additions & 2 deletions scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
npm exec --package=@stainless-api/[email protected].4 -- prism mock "$URL" &> .prism.log &
npm exec --package=@stainless-api/[email protected].5 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
echo -n "Waiting for server"
Expand All @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then

echo
else
npm exec --package=@stainless-api/[email protected].4 -- prism mock "$URL"
npm exec --package=@stainless-api/[email protected].5 -- prism mock "$URL"
fi
3 changes: 3 additions & 0 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ fi

echo "==> Running tests"
rye run pytest "$@"

echo "==> Running Pydantic v1 tests"
rye run nox -s test-pydantic-v1 -- "$@"
Loading

0 comments on commit 213c89e

Please sign in to comment.