rulebearing-rules
Rulebearing's framework presets as a versioned library, published with every Rulebearing release at the release version to npm (rulebearing-rules), NuGet (Rulebearing.Rules) and PyPI (rulebearing-rules). Install it from whichever registry your repository already uses, then extend a preset by the same name everywhere. Source, documentation and releases: https://github.com/benbahrenburg/rulebearing
npm install --save-dev rulebearing-rules # node_modules/rulebearing-rules/
dotnet add package Rulebearing.Rules # the NuGet global packages folder, after restore
pip install rulebearing-rules # site-packages/rulebearing_rules/
extends: [rulebearing:typescript, rulebearing:recommended, rulebearing-rules/nextjs]
Rulebearing looks for the package in node_modules/, then the NuGet global packages folder, then a Python environment's site-packages (docs/config.md). The binary bundles the same files as rulebearing:<preset>; the package lets a repository pin the rules' version through its package manager.
| Preset | What it is |
|---|---|
nextjs |
The boundaries a Next.js application's folders imply, for the App Router and the Pages Router |
clean-architecture |
Clean architecture's dependency rule, Domain <- Application <- Infrastructure and Presentation, read from paths so it holds for a .NET solution and for a source tree |
django |
The layering a Django project's file names imply: models innermost, views reached through URL configurations |
fastapi |
The layering most FastAPI services are written in: routers call services, which hold the logic |
vertical-slices |
A feature never imports another feature, and the shared kernel never imports a feature back |
recommended |
Rulebearing's rulebearing:recommended: the three language presets and the rules every language shares |
Each framework preset is an opinion, not a default. Nothing extends one unless a configuration names it (design § The developer relations hat: "off by default, each a documented opinion"). Every rule's comment carries a decision token, and every rule's examples pass rulebearing test, which this repository's CI runs on each preset. What each preset forbids, and what it leaves out on purpose, is in presets/frameworks/README.md.
MIT licence.
How the packages are built
The presets live once, in presets/frameworks/ and presets/rulebearing/recommended.yaml; this folder holds the three package definitions and no copy of them (ADR-0071, FR-REACH-04, plan 0003 Step 23). pack.sh packs them at one version; the committed metadata carries none, and nothing in the source tree is edited.
| Registry | Definition | Version | Layout installed |
|---|---|---|---|
| npm | package.json, staged with the presets, README.md and LICENSE in a temporary folder |
npm pkg set version= on the staged copy |
node_modules/rulebearing-rules/<preset>.yaml |
| NuGet | Rulebearing.Rules.csproj, a content package with no assembly |
-p:Version, else the workspace version (eng/Rulebearing.Packages.props) |
<global packages>/rulebearing.rules/<version>/rulebearing-rules/<preset>.yaml |
| PyPI | pyproject.toml and the hatchling hook hatch_rules.py, a wheel and a source distribution |
RULEBEARING_VERSION, else the workspace version; a pre-release as PEP 440 |
site-packages/rulebearing_rules/<preset>.yaml |
wrappers/rules/pack.sh <version> <out-dir> [npm] [nuget] [pypi] # none named: all three
The release workflow calls it from its existing packing jobs, install-checks each package on macOS, Linux and Windows by resolving extends: rulebearing-rules/nextjs from it, and publishes it beside the other packages (docs/release.md). pytest wrappers/rules --cov=wrappers/rules tests the hook and packs all three packages, then resolves the preset from each installed layout with the binary built from this checkout.
Metadata
Release files for rulebearing-rules 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rulebearing_rules-0.1.3.tar.gz | 13.4 kB | Without provenance | Details for rulebearing_rules-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rulebearing_rules-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for rulebearing_rules-0.1.3-py3-none-any.whl |
Total release size: 26.8 kB
Release files / rulebearing_rules-0.1.3.tar.gz
| Download URL | rulebearing_rules-0.1.3.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3639610bbbf3f9416f2f4c19afb8853421a8cc43c93a055e767c133fce3b3dd
|
|
BLAKE2b-256 checksum How to use checksums |
8477da076d59a0e0ea977e439ac5fc450d93faba3198e67689d49b45b7f1fbce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / rulebearing_rules-0.1.3-py3-none-any.whl
| Download URL | rulebearing_rules-0.1.3-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4be7ac09a01624a2d8a26e41f8a8ed5bb559aa534d201de7aa194fffe7c72df9
|
|
BLAKE2b-256 checksum How to use checksums |
e7b4d4e7bab2bd9f943817959adf0cd25a6998c0be999b89cee239126152abde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Security for rulebearing-rules 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.