{"id":28719948,"url":"https://github.com/dingo-actual/failextract","last_synced_at":"2026-04-30T16:34:38.677Z","repository":{"id":297725010,"uuid":"997713815","full_name":"dingo-actual/failextract","owner":"dingo-actual","description":"FailExtract is a lightweight Python library that automatically captures detailed failure context from pytest test runs, including fixture dependencies, source code, and exception details to streamline debugging workflows.","archived":false,"fork":false,"pushed_at":"2025-06-09T08:29:10.000Z","size":758,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T16:34:36.139Z","etag":null,"topics":["cli-tool","debugging","decorator","developer-tools","json","pytest","pytest-plugin","python","test-analysis","test-failed","test-reporting","testing","thread-safe","xml","yaml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dingo-actual.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-07T02:57:17.000Z","updated_at":"2025-06-09T08:29:14.000Z","dependencies_parsed_at":"2025-06-07T04:23:27.171Z","dependency_job_id":"8a239734-b19d-4ce1-aab7-ff5010840ac4","html_url":"https://github.com/dingo-actual/failextract","commit_stats":null,"previous_names":["dingo-actual/failextract"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dingo-actual/failextract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingo-actual%2Ffailextract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingo-actual%2Ffailextract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingo-actual%2Ffailextract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingo-actual%2Ffailextract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dingo-actual","download_url":"https://codeload.github.com/dingo-actual/failextract/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingo-actual%2Ffailextract/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32470879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli-tool","debugging","decorator","developer-tools","json","pytest","pytest-plugin","python","test-analysis","test-failed","test-reporting","testing","thread-safe","xml","yaml"],"created_at":"2025-06-15T06:06:13.562Z","updated_at":"2026-04-30T16:34:38.659Z","avatar_url":"https://github.com/dingo-actual.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FailExtract: Test Failure Analysis Library\n\n\u003cimg src=\"images/failextract_logo.png\" alt=\"FailExtract Logo\" width=\"830\" height=\"415\"\u003e\n\u003cbr\u003e\n\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n[![PyPI version](https://badge.fury.io/py/failextract.svg)](https://badge.fury.io/py/failextract)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-blue.svg)](https://dingo-actual.github.io/failextract/index.html)\n\n**FailExtract** is a lightweight test failure extraction and reporting library for pytest environments. It automatically captures detailed failure context including fixture information, source code, and exception details to improve debugging efficiency.\n\n📖 **[Read the Full Documentation](https://dingo-actual.github.io/failextract/index.html)** for tutorials, guides, and API reference.\n\n## Key Features\n\n- **🎯 Simple Installation**: Easy to get started with minimal dependencies\n- **📊 Multiple Output Formats**: JSON (built-in), XML, CSV, YAML, and Markdown\n- **⚡ Lightweight Core**: Fast extraction with configurable output options\n- **🎨 Command-Line Interface**: Generate reports and analyze failures from CLI\n- **🧵 Thread-Safe**: Works with concurrent test execution\n- **⚙️ Decorator Support**: Simple `@extract_on_failure` decorator for any test\n- **🔧 Configurable**: Flexible output configuration and formatting options\n\n## Installation Options\n\n### Installation \n\n```bash\n# Standard installation - includes all core formatters\npip install failextract\n```\n\n**Includes**: Failure extraction, JSON/XML/CSV/Markdown formatters, and CLI commands. See the [installation guide](https://dingo-actual.github.io/failextract/how-to/install_failextract.html) for details.\n\n### Optional Features\n\n```bash\n# Add YAML output support\npip install failextract[formatters]\n\n# Enhanced configuration file support (pydantic)\npip install failextract[config]\n\n# Rich CLI output formatting\npip install failextract[cli]\n```\n\n### Development Installation\n\n```bash\n# All optional features for development\npip install failextract[development]\n\n# Install with all features\npip install failextract[all]\n```\n\n### Check Available Features\n\n```bash\n# See what features are installed\nfailextract features\n\n# Get installation suggestions for missing features\nfailextract --help\n```\n\n### Basic Usage\n\nTransform any test function into a failure-capturing test with a simple decorator:\n\n```python\nfrom failextract import extract_on_failure\n\n@extract_on_failure\ndef test_user_registration():\n    user = create_user(\"john@example.com\")\n    assert user.is_active == True, \"User should be active after registration\"\n```\n\nWhen this test fails, FailExtract automatically captures:\n- Complete fixture dependency chain\n- Source code context\n- Exception details with full traceback\n- Local variable states\n- Test execution metadata\n\nLearn more in the [getting started tutorial](https://dingo-actual.github.io/failextract/tutorials/getting_started.html).\n\n### Generate Reports (Core - Always Available)\n\n```python\nfrom failextract import FailureExtractor, OutputConfig\n\n# Extract failures and generate reports\nextractor = FailureExtractor()\n\n# Generate JSON report (always available)\njson_config = OutputConfig(\"failures.json\", format=\"json\")\nextractor.save_report(json_config)\n```\n\n### Multiple Output Formats\n\n```python\n# XML output (built-in)\nxml_config = OutputConfig(\"failures.xml\", format=\"xml\")\nextractor.save_report(xml_config)\n\n# Markdown output (built-in)\nmd_config = OutputConfig(\"failures.md\", format=\"markdown\")\nextractor.save_report(md_config)\n\n# YAML output (requires formatters extra)\nyaml_config = OutputConfig(\"failures.yaml\", format=\"yaml\")\nextractor.save_report(yaml_config)\n```\n\nSee the [multiple formats tutorial](https://dingo-actual.github.io/failextract/tutorials/multiple_formats.html) for examples with all supported formats.\n\n### Command-Line Interface\n\nFailExtract includes a feature-aware CLI that adapts to your installed extras:\n\n```bash\n# Check what features you have installed\nfailextract features\n\n# Generate JSON report (always available)\nfailextract report --format json --output failures.json\n\n# Show failure statistics\nfailextract stats\n\n# List all captured failures\nfailextract list --format table\n\n# Clear stored failure data\nfailextract clear --confirm\n```\n\nFor complete CLI documentation, see the [CLI reference](https://dingo-actual.github.io/failextract/reference/api.html#command-line-interface).\n\n### CI/CD Integration Examples\n\n**Basic CI/CD (Core Only):**\n```yaml\n# GitHub Actions example - basic JSON reporting\n- name: Generate failure report\n  if: always()\n  run: |\n    failextract report --format json --output test-failures.json\n    failextract stats\n```\n\n**Enhanced CI/CD (Multiple Formats):**\n```yaml\n# GitHub Actions with multiple formats\n- name: Generate comprehensive failure reports\n  if: always()\n  run: |\n    failextract report --format json --output test-failures.json\n    failextract report --format markdown --output test-failures.md\n    failextract report --format xml --output test-failures.xml\n```\n\nSee the [CI/CD setup guide](https://dingo-actual.github.io/failextract/how-to/setup_ci_cd.html) for complete integration examples.\n\n### Progressive Enhancement Examples\n\n**Start Simple:**\n```python\n# Just the basics - lightweight and fast\nfrom failextract import extract_on_failure\n\n@extract_on_failure  \ndef test_basic():\n    assert 1 == 2, \"This will capture failure details\"\n```\n\n**Add YAML Formatting:**\n```bash\npip install failextract[formatters]\n```\n```python\n# Now use YAML output format\nfrom failextract import FailureExtractor, OutputConfig\n\nextractor = FailureExtractor()\nconfig = OutputConfig(\"report.yaml\", format=\"yaml\", include_source=True)\nextractor.save_report(config)\n```\n\n**Add Rich CLI Output:**\n```bash\npip install failextract[cli]\n```\n```bash\n# Now get enhanced terminal output\nfailextract report --format json --output failures.json\nfailextract stats  # Enhanced with rich formatting\n```\n\nLearn about all configuration options in the [configuration tutorial](https://dingo-actual.github.io/failextract/tutorials/configuration.html).\n\n## Documentation\n\nComplete documentation is available at **[dingo-actual.github.io/failextract](https://dingo-actual.github.io/failextract/index.html)**:\n\n- **[Getting Started Tutorial](https://dingo-actual.github.io/failextract/tutorials/getting_started.html)** - 5-minute walkthrough\n- **[How-To Guides](https://dingo-actual.github.io/failextract/how-to/index.html)** - Practical solutions for common tasks\n- **[API Reference](https://dingo-actual.github.io/failextract/reference/api.html)** - Complete API documentation\n- **[Architecture Discussions](https://dingo-actual.github.io/failextract/discussions/index.html)** - Design patterns and philosophy\n\n## Contributing\n\nWe welcome contributions! Please see our [contributing guidelines](./CHANGELOG.md) for details on setting up the development environment and submitting pull requests.\n\n### Development Setup\n\n```bash\n# Clone the repository\ngit clone \u003crepository-url\u003e\ncd failextract\n\n# Create virtual environment\npython -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n\n# Install in development mode with all features\npip install -e .[development,docs,all]\n\n# Run tests\npytest\n\n# Run linting and formatting\nruff check src/ tests/\nruff format src/ tests/\n\n# Build documentation\ncd docs \u0026\u0026 make html\n```\n\n## Project Structure\n\n```\nfailextract/\n├── src/failextract/           # Main package source\n│   ├── __init__.py           # Public API exports\n│   ├── cli.py                # Command-line interface\n│   ├── configuration.py      # Configuration management\n│   ├── failextract.py        # Core extraction functionality\n│   ├── api/                  # API protocols and events\n│   ├── core/                 # Core functionality\n│   │   ├── analysis/         # Context analysis\n│   │   ├── extraction/       # Failure extraction\n│   │   └── formatters/       # Output formatters\n│   └── integrations/         # Framework integrations\n├── tests/                    # Comprehensive test suite\n│   ├── unit/                 # Unit tests\n│   ├── integration/          # Integration tests\n│   ├── performance/          # Performance tests\n│   └── property/             # Property-based tests\n├── examples/                 # Working examples\n├── docs/                     # Documentation source\n└── pyproject.toml           # Project configuration\n```\n\n## Features by Extra\n\n- **Core** (always available): JSON, XML, CSV, Markdown formatters, CLI, basic extraction\n- **`[formatters]`**: YAML output format (`pyyaml`)\n- **`[config]`**: Enhanced configuration with Pydantic validation\n- **`[cli]`**: Rich terminal output formatting (`rich`, `typer`)\n- **`[development]`**: All development tools (`pytest`, `ruff`, `mypy`, etc.)\n- **`[docs]`**: Documentation building tools (`sphinx`, themes, etc.)\n- **`[all]`**: All optional features combined\n\n## License\n\nFailExtract is released under the Apache 2.0 License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdingo-actual%2Ffailextract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdingo-actual%2Ffailextract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdingo-actual%2Ffailextract/lists"}