Skip to main content

Manage decision records with mkdocs in a customizable and minimal fashion.

Project description

mkdocs-decision-records

PyPI version PyPI - Downloads LICENSE CircleCI codecov Quality Gate Status Code Smells Maintainability Rating Security Rating Renovate


Manage decision records with mkdocs in a customizable and minimal fashion.

Features

  • Customizable status colors and lifecycle
  • Enforces information to be present for ADRs
  • Allows description being kept as markdown

Demo

You can find a Demo on GitHub Pages

Installation

  1. Install mkdocs-decision-records from the PyPi registry using your favorite package manager
  2. Configure your mkdocs.yml
    plugins:
    - decision-records:
        # Folder where your decision records are located, defaults to adr
        decisions_folder: adr
        # Optional prefix to prepend to ticket numbers
        ticket_url_prefix: https://ticket.example.com/
        # Configure amount of required deciders
        required_deciders_count: 1
        # Configure available stages and the badge colors
        lifecycle_stages:
          {status}: {color}
    
  3. Create your ADRs ensuring to add the frontmatter meta data:
    ---
    id: 000
    status: proposed | rejected | accepted | deprecated | … | superseded
    [superseded_by: <id it has been replaced with>]
    date: YYYY-MM-DD
    deciders:
       - decider 1
       - decider 2
    # Optional ticket
    ticket: FOO-1
    ---
    
    ## Context and Problem Statement
    
    [Describe the context and problem statement, e.g., in free form using two to three sentences. You may want to articulate the problem in form of a question.]
    
    ## Decision Drivers <!-- optional -->
    
    * [driver 1, e.g., a force, facing concern, …]
    * [driver 2, e.g., a force, facing concern, …]
    * … <!-- numbers of drivers can vary -->
    
    ## Considered Options
    
    * [option 1]
    * [option 2]
    * [option 3]
    
    ## Decision Outcome
    
    Chosen option: "[option 1]",
    because [justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force force | … | comes out best (see below)].
    
    ## Pros and Cons of the Options <!-- optional -->
    
    ### [option 1]
    
    [example | description | pointer to more information | …] <!-- optional -->
    
    * Good, because [argument a]
    * Good, because [argument b]
    * Bad, because [argument c]
    * … <!-- numbers of pros and cons can vary -->
    
    ### [option 2]
    
    [example | description | pointer to more information | …] <!-- optional -->
    
    * Good, because [argument a]
    * Good, because [argument b]
    * Bad, because [argument c]
    * … <!-- numbers of pros and cons can vary -->
    
    ### [option 3]
    
    [example | description | pointer to more information | …] <!-- optional -->
    
    * Good, because [argument a]
    * Good, because [argument b]
    * Bad, because [argument c]
    * … <!-- numbers of pros and cons can vary -->
    
    ## Links <!-- optional -->
    
    * [Link type] [Link to ADR] <!-- example: Refined by [ADR-0005](0005-example.md) -->
    * … <!-- numbers of links can vary -->
    

Superseding ADRs

This plugin is opinionated about using superseded status.

When setting the status to superseded, make to sure also set superseded_by to the ADR id it has been replaced with.

---
# adr details
status: superseded
superseded_by: 123
---
<!-- Deprecated ADR -->

Motivation

I love ADRs and documenting decisions in general. This plugin makes it a bit easier, enforcing basic meta information while keeping the format open enough so you can do your thing.

Contributing

I love your input! I want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the configuration
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

To get started please read the Contribution Guidelines.

Development

Requirements

  • Python 3.12+
  • Poetry

Build

poetry install

Alternatives

Project details


Download files

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

Source Distribution

mkdocs_decision_records-2.1.2.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

mkdocs_decision_records-2.1.2-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_decision_records-2.1.2.tar.gz.

File metadata

  • Download URL: mkdocs_decision_records-2.1.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Linux/6.8.0-1040-aws

File hashes

Hashes for mkdocs_decision_records-2.1.2.tar.gz
Algorithm Hash digest
SHA256 68c6c14721c82523fa3ad40a248dc75594c0fab8f3881c161956a27ac835263e
MD5 ba08bfeac59935bacc0c244f401cfa81
BLAKE2b-256 cb4318efb9ae7cab9653a07b425b8f682e11773d53c047579cc5972a5f896b4d

See more details on using hashes here.

File details

Details for the file mkdocs_decision_records-2.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_decision_records-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 240aaa8910596ad1dd63947cd8db042f97d09bdee2389cb5489dd2b4a147c1a7
MD5 349b55353a91db149d73c36d0a998771
BLAKE2b-256 206f9389a86d06abea07d492644d79f5387a1a2faf55b8e8e763014f3223c39a

See more details on using hashes here.

Supported by

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