Skip to main content
r/Python icon

r/Python pythonLogo pythonLogo

Pycon US 2025 starts next week!

members
online

A Python tool for review-driven regression testing of ML/LLM outputs A Python tool for review-driven regression testing of ML/LLM outputs
Showcase

What My Project Does

Booktest is a Python tool for review-driven regression testing of ML/NLP/LLM systems. Instead of relying only on assertion-based pass/fail tests, it captures outputs as readable artifacts and focuses on reviewable diffs between runs.

It also supports incremental pipelines and caching, so expensive steps don’t need to rerun unnecessarily, which makes it practical for CI workflows involving model inference.

Target Audience

This is intended for developers and ML engineers working with systems where outputs don’t have a single “correct” value (e.g., NLP pipelines, LLM-based systems, ranking/search models).

It’s designed for production workflows, but can also be useful in experimental or research settings.

Comparison

Traditional testing tools like pytest or snapshot-based tests work well when outputs are deterministic and correctness is objective.

Booktest complements those tools in cases where correctness is fuzzy and regressions need to be reviewed rather than strictly asserted.

It’s not meant to replace pytest, but to handle cases where binary assertions are insufficient.

Repo: https://github.com/lumoa-oss/booktest

I’m the author and I'd love to hear your thoughts and perspectives, especially around pytest/CI integration patterns. :-)


(Rant) AI is killing programming and the Python community (Rant) AI is killing programming and the Python community
Meta

I'm sorry but it has to come out.

We are experiencing an endless sleep paralysis and it is getting worse and worse.

Before, when we wanted to code in Python, it was simple: either we read the documentation and available resources, or we asked the community for help, roughly that was it.

The advantage was that stupidly copying/pasting code often led to errors, so you had to take the time to understand, review, modify and test your program.

Since the arrival of ChatGPT-type AI, programming has taken a completely different turn.

We see new coders appear with a few months of experience in programming with Python who give us projects of 2000 lines of code with an absent version manager (no rigor in the development and maintenance of the code), comments always boats that smell the AI from miles around, a .md boat also where we always find this logic specific to the AI and especially a program that is not understood by its own developer.

I have been coding in Python for 8 years, I am 100% self-taught and yet I am stunned by the deplorable quality of some AI-doped projects.

In fact, we are witnessing a massive arrival of new projects that are basically super cool and that are in the end absolutely null because we realize that the developer does not even master the subject he deals with in his program, he understands that 30% of his code, the code is not optimized at all and there are more "import" lines than algorithms thought and thought out for this project.

I see it and I see it personally in the science given in Python where the devs will design a project that by default is interesting, but by analyzing the repository we discover that the project is strongly inspired by another project which, by the way, was itself inspired by another project. I mean, being inspired is ok, but here we are more in cloning than in the creation of a project with real added value.

So in 2026 we find ourselves with posts from people with a super innovative and technical project that even a senior dev would have trouble developing alone and looking more closely it sounds hollow, the performance is chaotic, security on some projects has become optional. the program has a null optimization that uses multithreads without knowing what it is or why. At this point, reverse engineering will no longer even need specialized software as the errors will be aberrant. I'm not even talking about the optimization of SQL queries that makes you dizzy.

Finally, you will have understood, I am disgusted by this minority (I hope) of dev who are boosted with AI.

AI is good, but you have to know how to use it intelligently and with hindsight and a critical mind, but some take it for a senior Python dev.

Subreddits like this are essential, and I hope that devs will continue to take the time to inquire by exploring community posts instead of systematically choosing ease and giving blind trust to an AI chat.


[Project] fullbleed 0.1.12 — browserless HTML/CSS → PDF for Python (CLI + API, deterministic + JSON/ [Project] fullbleed 0.1.12 — browserless HTML/CSS → PDF for Python (CLI + API, deterministic + JSON/
Showcase

Hi r/Python,

Posting as an individual contributor (not a marketing post). Looking for technical feedback.

What My Project Does

fullbleed is a Rust PDF engine with Python bindings + a CLI. It converts HTML/CSS → PDF (optionally PNG page renders) without running a browser.

Automation/CI + tool/agent-friendly features:

  • machine-readable output: --json, --json-only, --schema

  • deterministic output: render hash + reproducibility record/check

  • optional PNG renders (useful for visual diffs/review loops)

  • debug artifacts (glyph coverage, page data, JIT/perf logs)

Component-style architecture (optional, not required)

One design path in the scaffold is component-driven Python that abstracts raw HTML construction in a familiar way. You can ignore this entirely and just pass your own HTML/CSS strings if you prefer.

Example shape (multiple files):

# components/header.py
from dataclasses import dataclass
from .fb_ui import component, el
from .primitives import Stack, Text

(frozen=True)
class HeaderData:
    title: str
    subtitle: str

@component
def Header(data: HeaderData):
    return Stack(
        Text(data.title, tag="h1", class_name="header-title"),
        Text(data.subtitle, tag="p", class_name="header-subtitle"),
        tag="header",
        class_name="doc-header",
    )

# report.py
import fullbleed
from components.fb_ui import render_component, el
from components.header import Header, HeaderData

def build_html():
    root = el("main", Header(HeaderData("Statement", "January 2026")))
    return render_component(root)

def render():
    engine = fullbleed.PdfEngine(page_width="8.5in", page_height="11in", margin="0.5in")
    html = build_html()
    css = "...component css + report css..."
    engine.render_pdf_to_file(html, css, "output/report.pdf")

Why this approach (when using Python for HTML composition):

  • encourages reusable, testable document components

  • gives a “render-safe selector” contract via scaffolded primitives/components

  • keeps styling modular and predictable

  • still allows raw HTML/CSS whenever users want direct control

Target Audience

Python developers building document pipelines such as:

  • invoices, statements, letters, reports

  • batch/templated PDF generation

  • CI workflows that need reproducibility + structured diagnostics

  • iterative HTML/CSS layout work where you want PDF + PNG from the same renderer (human or AI-assisted)

Comparison

  • Browser-based HTML→PDF (Playwright/Puppeteer, etc.): great if you need JS runtime / full browser behavior. fullbleed is intentionally browserless and aims for deterministic + inspectable outputs.

  • Other HTML→PDF tools: many generate PDFs, but fullbleed is specifically focused on a strong CLI/JSON contract + reproducibility records + debug artifacts for pipelines.

Quick Example

pip install fullbleed
fullbleed render --html report.html --css report.css --out report.pdf --json
fullbleed render --html report.html --css report.css --out report.pdf --emit-image out_images

Status / Feedback Requested

Early but usable. I’d love feedback on:

  • Python API ergonomics

  • CLI/JSON contract quality (what would you change?)

  • component/scaffold approach for real production document workflows

  • what would make it easier to integrate into CI and agent-driven pipelines

Repo: https://github.com/fullbleed-engine/fullbleed-official