Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
# Builds the wheel, installs it, byte-compiles the tree and imports every
# module. See scripts/verify_import.py.
- run: make verify
# Behavioural checks against a stub transport, so they need no API key.
# scripts/smoke_test.py covers the live API and is run by hand.
- run: uv run --group dev pytest tests/ -q

# Fail if the committed client is out of date with the committed schema — i.e.
# someone changed openapi.json without re-running the generator. Regenerates
Expand All @@ -26,7 +29,10 @@ jobs:
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
# The generator's post_hooks shell out to ruff. Without it on PATH they
# are skipped with a warning, and --fail-on-warning then fails the build.
- run: uv tool install ruff
# uv installs tools into ~/.local/bin, which isn't on a runner's PATH.
- run: |
uv tool install ruff
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- run: make generate
- name: Check for drift
run: |
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ __pycache__/
*.py[cod]
.venv/
.venv-verify/

# Dev-only lock. This is a library, so we resolve dependencies fresh rather
# than pinning what consumers get.
uv.lock
27 changes: 18 additions & 9 deletions incident_io/api/actions_v1/actions_v1_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,23 +277,32 @@ async def asyncio(
).parsed

# --- deprecation markers added by scripts/mark_deprecated.py ---
import functools as _functools
import warnings as _warnings
import functools as _functools # noqa: E402
import warnings as _warnings # noqa: E402

_DEPRECATION_MESSAGE = "GET /v1/actions is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement."


def _deprecated(_fn):
@_functools.wraps(_fn)
def _wrapper(*args, **kwargs):
_warnings.warn(
"GET /v1/actions is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement.",
DeprecationWarning,
stacklevel=2,
)
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return _fn(*args, **kwargs)

return _wrapper


def _deprecated_async(_fn):
# `async def`, so the result stays a coroutine function under
# inspect.iscoroutinefunction. See this module's docstring.
@_functools.wraps(_fn)
async def _wrapper(*args, **kwargs):
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return await _fn(*args, **kwargs)

return _wrapper

sync_detailed = _deprecated(sync_detailed)
sync = _deprecated(sync)
asyncio_detailed = _deprecated(asyncio_detailed)
asyncio = _deprecated(asyncio)
asyncio_detailed = _deprecated_async(asyncio_detailed)
asyncio = _deprecated_async(asyncio)
27 changes: 18 additions & 9 deletions incident_io/api/actions_v1/actions_v1_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,23 +229,32 @@ async def asyncio(
).parsed

# --- deprecation markers added by scripts/mark_deprecated.py ---
import functools as _functools
import warnings as _warnings
import functools as _functools # noqa: E402
import warnings as _warnings # noqa: E402

_DEPRECATION_MESSAGE = "GET /v1/actions/{id} is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement."


def _deprecated(_fn):
@_functools.wraps(_fn)
def _wrapper(*args, **kwargs):
_warnings.warn(
"GET /v1/actions/{id} is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement.",
DeprecationWarning,
stacklevel=2,
)
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return _fn(*args, **kwargs)

return _wrapper


def _deprecated_async(_fn):
# `async def`, so the result stays a coroutine function under
# inspect.iscoroutinefunction. See this module's docstring.
@_functools.wraps(_fn)
async def _wrapper(*args, **kwargs):
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return await _fn(*args, **kwargs)

return _wrapper

sync_detailed = _deprecated(sync_detailed)
sync = _deprecated(sync)
asyncio_detailed = _deprecated(asyncio_detailed)
asyncio = _deprecated(asyncio)
asyncio_detailed = _deprecated_async(asyncio_detailed)
asyncio = _deprecated_async(asyncio)
27 changes: 18 additions & 9 deletions incident_io/api/actions_v2/actions_v2_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,23 +250,32 @@ async def asyncio(
).parsed

# --- deprecation markers added by scripts/mark_deprecated.py ---
import functools as _functools
import warnings as _warnings
import functools as _functools # noqa: E402
import warnings as _warnings # noqa: E402

_DEPRECATION_MESSAGE = "POST /v2/actions is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement."


def _deprecated(_fn):
@_functools.wraps(_fn)
def _wrapper(*args, **kwargs):
_warnings.warn(
"POST /v2/actions is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement.",
DeprecationWarning,
stacklevel=2,
)
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return _fn(*args, **kwargs)

return _wrapper


def _deprecated_async(_fn):
# `async def`, so the result stays a coroutine function under
# inspect.iscoroutinefunction. See this module's docstring.
@_functools.wraps(_fn)
async def _wrapper(*args, **kwargs):
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return await _fn(*args, **kwargs)

return _wrapper

sync_detailed = _deprecated(sync_detailed)
sync = _deprecated(sync)
asyncio_detailed = _deprecated(asyncio_detailed)
asyncio = _deprecated(asyncio)
asyncio_detailed = _deprecated_async(asyncio_detailed)
asyncio = _deprecated_async(asyncio)
27 changes: 18 additions & 9 deletions incident_io/api/actions_v2/actions_v2_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,23 +239,32 @@ async def asyncio(
).parsed

# --- deprecation markers added by scripts/mark_deprecated.py ---
import functools as _functools
import warnings as _warnings
import functools as _functools # noqa: E402
import warnings as _warnings # noqa: E402

_DEPRECATION_MESSAGE = "DELETE /v2/actions/{id} is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement."


def _deprecated(_fn):
@_functools.wraps(_fn)
def _wrapper(*args, **kwargs):
_warnings.warn(
"DELETE /v2/actions/{id} is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement.",
DeprecationWarning,
stacklevel=2,
)
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return _fn(*args, **kwargs)

return _wrapper


def _deprecated_async(_fn):
# `async def`, so the result stays a coroutine function under
# inspect.iscoroutinefunction. See this module's docstring.
@_functools.wraps(_fn)
async def _wrapper(*args, **kwargs):
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return await _fn(*args, **kwargs)

return _wrapper

sync_detailed = _deprecated(sync_detailed)
sync = _deprecated(sync)
asyncio_detailed = _deprecated(asyncio_detailed)
asyncio = _deprecated(asyncio)
asyncio_detailed = _deprecated_async(asyncio_detailed)
asyncio = _deprecated_async(asyncio)
27 changes: 18 additions & 9 deletions incident_io/api/actions_v2/actions_v2_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,23 +274,32 @@ async def asyncio(
).parsed

# --- deprecation markers added by scripts/mark_deprecated.py ---
import functools as _functools
import warnings as _warnings
import functools as _functools # noqa: E402
import warnings as _warnings # noqa: E402

_DEPRECATION_MESSAGE = "GET /v2/actions is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement."


def _deprecated(_fn):
@_functools.wraps(_fn)
def _wrapper(*args, **kwargs):
_warnings.warn(
"GET /v2/actions is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement.",
DeprecationWarning,
stacklevel=2,
)
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return _fn(*args, **kwargs)

return _wrapper


def _deprecated_async(_fn):
# `async def`, so the result stays a coroutine function under
# inspect.iscoroutinefunction. See this module's docstring.
@_functools.wraps(_fn)
async def _wrapper(*args, **kwargs):
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return await _fn(*args, **kwargs)

return _wrapper

sync_detailed = _deprecated(sync_detailed)
sync = _deprecated(sync)
asyncio_detailed = _deprecated(asyncio_detailed)
asyncio = _deprecated(asyncio)
asyncio_detailed = _deprecated_async(asyncio_detailed)
asyncio = _deprecated_async(asyncio)
27 changes: 18 additions & 9 deletions incident_io/api/actions_v2/actions_v2_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,23 +241,32 @@ async def asyncio(
).parsed

# --- deprecation markers added by scripts/mark_deprecated.py ---
import functools as _functools
import warnings as _warnings
import functools as _functools # noqa: E402
import warnings as _warnings # noqa: E402

_DEPRECATION_MESSAGE = "GET /v2/actions/{id} is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement."


def _deprecated(_fn):
@_functools.wraps(_fn)
def _wrapper(*args, **kwargs):
_warnings.warn(
"GET /v2/actions/{id} is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement.",
DeprecationWarning,
stacklevel=2,
)
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return _fn(*args, **kwargs)

return _wrapper


def _deprecated_async(_fn):
# `async def`, so the result stays a coroutine function under
# inspect.iscoroutinefunction. See this module's docstring.
@_functools.wraps(_fn)
async def _wrapper(*args, **kwargs):
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return await _fn(*args, **kwargs)

return _wrapper

sync_detailed = _deprecated(sync_detailed)
sync = _deprecated(sync)
asyncio_detailed = _deprecated(asyncio_detailed)
asyncio = _deprecated(asyncio)
asyncio_detailed = _deprecated_async(asyncio_detailed)
asyncio = _deprecated_async(asyncio)
27 changes: 18 additions & 9 deletions incident_io/api/actions_v2/actions_v2_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,23 +266,32 @@ async def asyncio(
).parsed

# --- deprecation markers added by scripts/mark_deprecated.py ---
import functools as _functools
import warnings as _warnings
import functools as _functools # noqa: E402
import warnings as _warnings # noqa: E402

_DEPRECATION_MESSAGE = "PUT /v2/actions/{id} is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement."


def _deprecated(_fn):
@_functools.wraps(_fn)
def _wrapper(*args, **kwargs):
_warnings.warn(
"PUT /v2/actions/{id} is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement.",
DeprecationWarning,
stacklevel=2,
)
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return _fn(*args, **kwargs)

return _wrapper


def _deprecated_async(_fn):
# `async def`, so the result stays a coroutine function under
# inspect.iscoroutinefunction. See this module's docstring.
@_functools.wraps(_fn)
async def _wrapper(*args, **kwargs):
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return await _fn(*args, **kwargs)

return _wrapper

sync_detailed = _deprecated(sync_detailed)
sync = _deprecated(sync)
asyncio_detailed = _deprecated(asyncio_detailed)
asyncio = _deprecated(asyncio)
asyncio_detailed = _deprecated_async(asyncio_detailed)
asyncio = _deprecated_async(asyncio)
27 changes: 18 additions & 9 deletions incident_io/api/catalog_v2/catalog_v2_create_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,23 +262,32 @@ async def asyncio(
).parsed

# --- deprecation markers added by scripts/mark_deprecated.py ---
import functools as _functools
import warnings as _warnings
import functools as _functools # noqa: E402
import warnings as _warnings # noqa: E402

_DEPRECATION_MESSAGE = "POST /v2/catalog_entries is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement."


def _deprecated(_fn):
@_functools.wraps(_fn)
def _wrapper(*args, **kwargs):
_warnings.warn(
"POST /v2/catalog_entries is deprecated and will be removed. See https://api-docs.incident.io/ for the replacement.",
DeprecationWarning,
stacklevel=2,
)
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return _fn(*args, **kwargs)

return _wrapper


def _deprecated_async(_fn):
# `async def`, so the result stays a coroutine function under
# inspect.iscoroutinefunction. See this module's docstring.
@_functools.wraps(_fn)
async def _wrapper(*args, **kwargs):
_warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2)
return await _fn(*args, **kwargs)

return _wrapper

sync_detailed = _deprecated(sync_detailed)
sync = _deprecated(sync)
asyncio_detailed = _deprecated(asyncio_detailed)
asyncio = _deprecated(asyncio)
asyncio_detailed = _deprecated_async(asyncio_detailed)
asyncio = _deprecated_async(asyncio)
Loading
Loading