Skip to content

Releases: ProudRykar/GUTARIK

Release 0.1.2 – Structured Route Parsing & Improved Class Rendering

Choose a tag to compare

@ProudRykar ProudRykar released this 22 Feb 01:30
bd0dd81

Overview

This release enhances the Gutarik documentation generator with structured HTTP route parsing, improved class rendering, and safer AST-based decorator analysis.
The generator now produces cleaner, more readable Markdown output for modern Python web frameworks.


What's New

Structured HTTP Route Extraction

  • AST-based parsing of HTTP decorators (e.g., @get, @post, etc.).

  • Extracts:

    • HTTP method
    • Route path
    • Summary
    • Description
    • Tags
    • Status code (defaults to 200 if not provided)
  • Ignores heavy nested arguments like responses, examples, and dependencies to keep documentation clean.

  • Renders route metadata in a structured Markdown format instead of raw decorator strings.

Example output:

#### Route:

- Decorator: @post
- Path: `/logout`
- Summary: Logout user
- Description: Endpoint for user logout.
- Tags: Authentication
- Status Code: 200

Improved Class Rendering

  • Extracts and renders the top section of a class:

    • Class decorators
    • Signature
    • Annotated attributes
  • Stops before the first method definition.

  • Displays the extracted fragment inside a dedicated Python code block.

  • Preserves formatting using AST line boundaries (no fragile string slicing).


Decorator Handling Refactor

  • Replaced string-based decorator parsing with AST-based analysis.
  • Removed truncation logic that caused decorator output to be cut off.
  • Eliminated regex-dependent formatting issues.
  • Ensures stable behavior for multi-line decorators.

Markdown Formatting Improvements

  • Better separation of routes, arguments, and code blocks.
  • Improved escaping logic.
  • Cleaner layout for class and method sections.

Technical Improvements

  • Safer AST traversal with proper scope handling.
  • Fixed UnboundLocalError related to decorator metadata extraction.
  • Improved internal data structure for storing route metadata.
  • Cleaner separation between extraction and rendering stages.

Installation

poetry add gutarik

Usage

Generate documentation:

poetry run gutarik

Push to GitHub Wiki:

poetry run gutarik --push

Notes

  • Focus remains on Python projects with Google-style docstrings.
  • Route parsing is optimized for modern decorator-based frameworks.
  • Complex decorator arguments are intentionally omitted from rendered route metadata for clarity.

v0.1.1

Choose a tag to compare

@ProudRykar ProudRykar released this 14 Oct 21:42

Full Changelog: v0.1.0...v0.1.1

v0.1.0

Choose a tag to compare

@ProudRykar ProudRykar released this 10 Oct 23:20

Release 0.1.0 – Initial Release

Release Date: 2025-10-11

Overview

This release introduces the initial version of the Gutarik documentation generator. It provides robust configuration handling, automatic Markdown documentation generation from Python source files, and seamless integration with GitHub Wiki repositories.

Features

  • Configuration Validation

    • Validate paths, project directories, documentation directories, supported extensions, and GitHub Wiki repository URLs.
    • Support for .yml, .yaml, .toml, and Python (.py) configuration files.
    • Automatic checks for mandatory configuration keys.
  • Markdown Documentation Generation

    • Extracts Google-style docstrings from Python modules, classes, and functions.
    • Parses arguments, return values, and exceptions into structured Markdown tables.
    • Supports async functions and HTTP route annotations.
    • Generates documentation for multiple project directories, respecting excluded directories.
  • Wiki Integration

    • Automatically renames Markdown files based on source file headers.
    • Pushes generated documentation to a local GitHub Wiki clone.
    • Supports incremental updates and commit detection to avoid redundant pushes.
  • Utility Functions

    • Safe path validation to prevent unsafe or invalid file paths.
    • Flexible configuration loader with automatic detection of gutarik.* or [tool.gutarik] in pyproject.toml.

Installation

poetry add gutarik

Usage

  1. Prepare a configuration file (gutarik.yml, gutarik.toml, or gutarik.py) or use pyproject.toml.
  2. Run the documentation generator:
poetry run gutarik
  1. Optionally, push documentation to GitHub Wiki:
poetry run gutarik --push

Notes

  • The project enforces safe file paths and validates all configuration values before generating documentation.
  • Initial version focuses on Python projects with Google-style docstrings. Other languages or docstring styles are not yet supported.
  • Wiki push functionality assumes valid GitHub Wiki repository access.