Skip to main content

Quillstack Standards

Tests Latest Version Downloads Python Version CodeFactor Quality Gate Coverage Maintainability Reliability Security License

Checks a Quillstack package against the shape every one of them takes: the README, the badges, the repository, the release.

Why this exists

Quillstack is the same way of working in more than one language. What a package looks like — the README sections and their order, the badges, where the homepage points, how a release is verified and tagged — is meant to be the same whether the package is installed with pip or with composer.

Which raises the obvious question: how does it stay the same?

The rules are one file. rules.json is shared with the PHP checker, so a rule cannot mean one thing here and another there. Seven of its nine sections belong to no language in particular; the rest name the ecosystem they are for.

The checkers are not shared, and that is the point. This is a thing you pip install. A Python developer should not have to install PHP to check a Python package — that would make Python the guest in its own ecosystem, which is the opposite of what the whole idea is for.

And two implementations of one rule book drift, which is the part that needs solving rather than promising. See Conformance.

Requirements

  • Python 3.11 or newer

Installation

pip install quillstack-standards

Or, without installing it anywhere:

uvx quillstack-standards

Usage

Point it at a package:

$ quillstack-standards .
Checking quillstack-dotenv against the Quillstack standard

  ok   readme sections 8 sections, in the order the standard sets
  ok   badges          11 badges
  ok   rendering       nothing that reads correctly and renders wrongly

  3 passed, 0 to look at, 0 failed

It exits 1 where anything failed, so CI can use it without reading the output.

What it checks

Check What it is about
readme sections the sections the standard sets, present and in order
badges the badge block, all of it
rendering markdown which reads correctly and renders wrongly
manifest the homepage, the classifiers, and the files a distribution ships

Fewer than the PHP checker has, because this one is new. The rules for the rest are already in rules.json — what is missing is the reading of them here, and a case in conformance will not let that be forgotten quietly.

A rule which bends for a skeleton

A starter project merges Installation and Usage into one Getting started, because there is nothing to add to a project which already is the project. A pyproject.toml has no type field the way a composer.json does, so a skeleton says so itself:

[tool.quillstack]
type = "project"

Conformance

The rules cannot disagree — they are one file. The readings of them can. One checker decides a section is missing where the other decides it is at the wrong level, and nobody notices until the two disagree about somebody's package.

conformance/ is what stops that: small packages, each with an expected.json saying which checks must fail on it and how many times. Both checkers run all of them and must agree.

{
    "about": "A required README section written at three hashes instead of two.",
    "scope": "universal",
    "checks": {"readme sections": {"failures": 1}}
}

The count is the contract and the wording is not, because the wording is each checker's own business and what it objects to is the rule.

Two things were wrong with those cases until this package existed to run them. They carried only composer.json, so nothing here could open them; and the badge list included StyleCI, which checks PHP style and has nothing to say about Python. Neither would have been found by reading.

Benchmark

Not measured. This reads a handful of files in a directory and runs some regular expressions over them; it is quick enough that timing it would be measuring the process starting. Where a package is slow to check, the checking is not why.

Tests

uv run pytest

One of them fetches the canonical rules.json and compares it against the copy here, so the two cannot part company quietly.

Static analysis

uv run ruff check --no-cache
uv run mypy

--no-cache on purpose. A cached ruff result once said this package was clean while CI said it was not, which is the same trick a stale PHPStan cache played on the PHP side the same week. A local check that agrees with you may not have looked.

The rest of Quillstack

This is one component of Quillstack, the same way of building APIs in more than one language.

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quillstack_standards-0.1.1.tar.gz (61.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quillstack_standards-0.1.1-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file quillstack_standards-0.1.1.tar.gz.

File metadata

  • Download URL: quillstack_standards-0.1.1.tar.gz
  • Upload date:
  • Size: 61.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for quillstack_standards-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e308941263aad4f8efde56895590a0a17ec7fd6a21a4a5419d8b5956c13975e5
MD5 b4d0afb5de23cabe3fc569744370db05
BLAKE2b-256 141443e3bd0a57f951c120549d1b5fa05821eb607124b712a7de8ab317d922d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillstack_standards-0.1.1.tar.gz:

Publisher: release.yml on quillstack-py/standards

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quillstack_standards-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for quillstack_standards-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7dab41fc6721492c89f5b6decdda7be6fdc42d66179ee49203bafe3e804c273a
MD5 5d05be940f3215db964445f6f975fd1d
BLAKE2b-256 caed8049e8073497bb800f9f22b15d85850064973fc78001bfdde6b3d6b36f18

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillstack_standards-0.1.1-py3-none-any.whl:

Publisher: release.yml on quillstack-py/standards

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page