An open API service indexing awesome lists of open source software.

https://github.com/opinionated-digital-center/pyadr

CLI to help with an ADR lifecycle process (proposal|acceptance|rejection|deprecation|superseding) based on Markdown files and git.
https://github.com/opinionated-digital-center/pyadr

Last synced: 4 months ago
JSON representation

CLI to help with an ADR lifecycle process (proposal|acceptance|rejection|deprecation|superseding) based on Markdown files and git.

Awesome Lists containing this project

README

        

================
ADR Process Tool
================

.. image:: https://github.com/opinionated-digital-center/pyadr/workflows/Test%20and%20make%20release/badge.svg
:target: https://github.com/opinionated-digital-center/pyadr/actions

.. image:: https://github.com/opinionated-digital-center/pyadr/workflows/Publish%20Python%20package%20to%20Pypi/badge.svg
:target: https://github.com/opinionated-digital-center/pyadr/actions

.. image:: https://img.shields.io/pypi/v/pyadr.svg
:target: https://pypi.org/project/pyadr/

.. image:: https://img.shields.io/pypi/status/pyadr.svg
:target: https://pypi.org/project/pyadr/

.. image:: https://img.shields.io/pypi/pyversions/pyadr.svg
:target: https://pypi.org/project/pyadr/

.. image:: https://img.shields.io/pypi/l/pyadr.svg
:target: https://pypi.org/project/pyadr/

CLI to help with an ADR process lifecycle (``proposal``/``acceptance``/``rejection``/
``deprecation``/``superseding``) based on ``markdown`` files and ``git``.

*This tools is in pre-alpha state. Sphinx doc to be updated.*

Features
--------

``pyadr``
+++++++++

* ``pyadr init``: initialise an ADR repository
(`corresponding BDD tests `_).
* ``pyadr new|propose Title of your ADR``: propose a new ADR
(`corresponding BDD tests `_).
* ``pyadr accept []``: accept a proposed ADR
(`corresponding BDD tests `_).
* ``pyadr reject []``: reject a proposed ADR (see ``accept`` above for BDD
tests).
* ``pyadr deprecate ``: (not yet implemented) deprecate an ADR.
* ``pyadr supersede ``: (not yet implemented) supersede an ADR with another ADR.
* ``pyadr toc``: generate a table of content (in format ``index.md``)
(`corresponding BDD tests `_).
* ``pyadr helper``: generate and syncs various useful things
(`corresponding BDD tests `_):

* print title slug.
* print title in lowercase.
* synch filename with ADR title.

* ``pyadr check-adr-repo``: performs sanity checks on the ADR repo
(`corresponding BDD tests `_).
* ``pyadr config [] []``: configure a setting
(`corresponding BDD tests `_).

Help for all commands is available through ``pyadr help``.

Help for individual commands is available through ``pyadr help ``.

``git adr``
+++++++++++

The ``git`` extension to ``pyadr`` does the following additional actions:

* ``git adr init``
(`corresponding BDD tests `_):

* initialise a git repository for the ADRs.

* ``git adr new|propose Title of your ADR``
(`corresponding BDD tests `_):

* create a new branch from ``main``.
* stage the new ADR in that branch.

* ``git adr accept []``
(`corresponding BDD tests `_):

* stage ADR to current branch.
* optionally commit ADR.
* optionally squash commits. (not yet implemented)

* ``git adr reject []``:
(`corresponding BDD tests `_):

* stage ADR to current branch.
* optionally commit ADR.
* optionally squash commits. (not yet implemented)

* ``git adr deprecate ``: (not yet implemented)

* create a new branch from ``main``.
* stage the deprecated ADR in that branch.
* optionally commit.
* optionally squash commits.

* ``git adr supersede ``: (not yet implemented)

* create a new branch from ``main``.
* stage the superseded and superseding ADRs in that branch.
* optionally commit both ADRs.
* optionally squash commits.

* ``git adr commit []``: (not yet implemented)

* optionally stage ADR(s) to current branch.
* commit ADR(s).
* optionally squash commits.

* ``git adr helper``: generate and syncs various useful things
(`corresponding BDD tests `_):

* print title slug.
* print title in lowercase.
* synch filename with ADR title and staged renamed file.
* print expected commit message for ADR.
* print expected review request branch for ADR.

* ``git adr pre-merge-checks``
(`corresponding BDD tests `_):

* Performs sanity checks typically required on ADR files before merging a
Pull Request.

* ``git adr config [] []``
(`corresponding BDD tests one `_ and
`two `_):

* configure also settings specific to ``git adr``.

Help for all commands is available through ``git adr help``.

Help for individual commands is available through ``git adr help ``.

Process Details
---------------

(Needs rewriting)

Once a proposed ADR placed in the ``docs/adr`` directory has been reviewed by peers, you can either action the decision
to accept it (``pyadr accept``) or to reject it (``pyadr reject``), which will:

* Update the ADR content by:

* Changing the ADR status (``accepted`` or ``rejected``)
* Changing the ADR date to current date

* Change the ADR file name from ``XXXX-`` to
``-`` (follows
`MADR-0005-format `_)

Various safety checks are performed before these actions take place. See BDD tests
in the ``features`` directory.

Installation
------------

To install ADR Process Tool, run:

.. code-block:: console

$ pip install pyadr

Credits
-------

This package was created with Cookiecutter_ and the
`opinionated-digital-center/python-library-project-generator`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`opinionated-digital-center/python-library-project-generator`: https://github.com/opinionated-digital-center/python-library-project-generator