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
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: "3.13"
python-version: "3.12"
- name: Ruff Format Check
run: uv run ruff format --check .
- name: Ruff Lint Check
Expand All @@ -26,15 +26,20 @@ jobs:
run: uv run ty check .

test:
name: Run Tests
runs-on: ubuntu-latest
name: Test (${{ matrix.os }}, Python ${{ matrix.python-version }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.12", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: "3.13"
python-version: ${{ matrix.python-version }}
- name: Run tests with Pytest and 100% Coverage
run: uv run python -m pytest --cov=offline_debug --cov-report=term-missing --cov-fail-under=100

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ celerybeat.pid
.env
.envrc
.venv
.venv-*
env/
venv/
ENV/
Expand Down
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
repos:
- repo: local
hooks:
- id: ruff-check
name: ruff-check
entry: uv run ruff check --fix
language: system
types: [python]

- id: ruff-format
name: ruff-format
entry: uv run ruff format
language: system
types: [python]

- id: ty-check
name: ty-check
entry: uv run ty check
language: system
types: [python]
pass_filenames: false

- id: pytest-coverage
name: pytest-coverage
entry: >
powershell -Command "
$env:UV_PROJECT_ENVIRONMENT = '.venv-3.12';
uv run --python 3.12 pytest --cov=offline_debug;
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE };
$env:UV_PROJECT_ENVIRONMENT = '.venv-3.13';
uv run --python 3.13 pytest --cov=offline_debug --cov-append --cov-report=term --cov-fail-under=100
"
language: system
types: [python]
pass_filenames: false
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Traceback Serializer Project (`offline-debug`)

[![PyPI version](https://img.shields.io/pypi/v/offline-debug.svg)](https://pypi.org/project/offline-debug/)
[![Tests](https://github.com/INTODAN/offline-debug/actions/workflows/ci.yml/badge.svg)](https://github.com/INTODAN/offline-debug/actions)
[![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)](https://github.com/INTODAN/offline-debug)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Ty checked](https://img.shields.io/badge/ty-checked-blue.svg)](https://github.com/intodan/ty)

## Overview
A Python package for high-fidelity serialization and deserialization of exceptions and their complete tracebacks. Unlike other solutions, `offline-debug` reconstructs **actual** `types.FrameType` objects using the Python C API, ensuring that re-raised exceptions look and feel genuine to debuggers and introspection tools.

Expand Down
6 changes: 4 additions & 2 deletions offline_debug/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from .serializer import save_traceback, load_traceback
"""Tool for serializing and reconstructing Python exceptions with full stack traces."""

__all__ = ["save_traceback", "load_traceback"]
from .serializer import load_traceback, save_traceback

__all__ = ["load_traceback", "save_traceback"]
Loading
Loading