Special projects

CatalogLint

Checks a CommerceML export before it reaches an online store: prices with no product, duplicates, and a partial export that looks like a mass deletion.

Type
Catalog export checker
Stack
Python
Code
Open on GitHub
Year
2026

A gate before the warehouse

Products and offers ride in pairs. An offer with no product drops into a tray, and the shrink lever closes the barrier if more than 20% of the catalog vanished.

CATALOGLINT
The barrier arm and the knocked offer: the parts to watchA crate is a product, a tag is its offer: they ride in pairsThe racking is the previous full export; an empty bay is a vanished productA model of checking a CommerceML export before it reaches an online store. Products (crates) and their offers (price tags) ride through the gate in pairs. An offer whose product is missing is knocked by a pusher into a reject tray; a repeated id is rejected too. Beside it a shrink gauge compares the product count with the previous full export, a rack of 50 bays: while no more than 20% of the previously active products vanished the gate stays open, and exactly 20% still passes. Above that the barrier arm drops and the tool exits non-zero, which can stop the import. The threshold is configurable and defaults to 20%. In the model the previous export holds 50 products: 48 today is 4%, and a partial export of 38 gives 24%.

Why

When an exchange fails, prices arrive without products, an item is duplicated, and a partial export looks like a mass deletion. CatalogLint checks this before import and exits non-zero, which can stop the import.

Catalog shrink

With the previous full export at hand, it compares the two. If more than 20% of previously active products vanished or were marked for deletion, that is an error. The threshold is configurable, and partial exchanges are refused so a missing product isn’t mistaken for a deletion.

Under the hood

  • One catalog and one offer package with matching ids.
  • Repeated and missing product and offer ids.
  • Prices: empty, unknown types, repeated levels.
  • A catalog shrink threshold, 20% by default.
Code on GitHub

Shall we talk about your project?

Discuss your project