Skip to content

docs: major documentation overhaul - #521

Merged
thomaspatzke merged 2 commits into
mainfrom
copilot/update-documentation-structure
Aug 3, 2026
Merged

docs: major documentation overhaul#521
thomaspatzke merged 2 commits into
mainfrom
copilot/update-documentation-structure

Conversation

Copilot AI commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The documentation was a mixed bag of incomplete class references and sparse descriptive content with many empty sections. This rewrites it from scratch with clear separation between introductory material, practical guides, and API reference.

New Structure

  • Introduction — Purpose, architecture, design principles, ecosystem overview
  • Getting Started — Installation, minimal conversion example, pointers to guides
  • User Guides:
    • Converting Sigma rules into queries (collections, pipelines, output formats, correlation rules)
    • Building a backend (TextQueryBackend class variables, output formats, finalize_query, testing)
    • Writing processing pipelines in Python and YAML (priorities, all transformations/conditions, post-processing, finalizers, custom transformations)
    • Validating rules (YAML config, built-in validators, writing custom validators)
    • Plugin system (namespace packages, backend/pipeline/validator plugin structure)
  • API Reference — Full autodoc coverage of all 12 module groups
  • TODO (docs/todo.rst) — Remaining work tracked (correlation guide, filters guide, migration guide, etc.)

Config & Code Changes

  • docs/conf.py: Added napoleon, viewcode, intersphinx extensions
  • sigma/processing/transformations/external.py: Reformatted 3 docstrings (FilePlaceholder, HTTPPlaceholder, CommandPlaceholder) from malformed bullet lists to NumPy-style params for clean Sphinx rendering

Example

from sigma.rule import SigmaRule
from sigma.collection import SigmaCollection
from sigma.backends.test import TextQueryTestBackend

rule = SigmaRule.from_yaml("""
    title: Test Rule
    status: test
    logsource:
        category: process_creation
        product: windows
    detection:
        selection:
            CommandLine|contains: mimikatz
        condition: selection
""")

backend = TextQueryTestBackend()
result = backend.convert(SigmaCollection(rules=[rule]))

Builds with 0 Sphinx errors. All 1511 tests pass. mypy/black clean.

… reference

Replace existing documentation with a comprehensive new structure:
- Introduction explaining pySigma's purpose and architecture
- Getting started guide with installation and quick examples
- Detailed guides for converting rules, building backends,
  writing processing pipelines, validating rules, and using plugins
- Complete API reference for all modules
- TODO list for remaining documentation work
- Updated Sphinx configuration with napoleon, viewcode, intersphinx
- Fixed docstrings in external.py for proper RST rendering

Co-authored-by: thomaspatzke <1845601+thomaspatzke@users.noreply.github.com>
@thomaspatzke
thomaspatzke merged commit ebc12ff into main Aug 3, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants