akaihola / darker

Apply black reformatting to Python files only in regions changed since a given commit. For a practical usage example, see the blog post at https://dev.to/akaihola/improving-python-code-incrementally-3f7a
https://pypi.org/project/darker/
Other
633 stars 55 forks source link

Illustrate `--revision` argument variations using Git diagrams #326

Open akaihola opened 2 years ago

akaihola commented 2 years ago

The -r/--revision argument has a number of features which are not intuitively easy to understand, including at least:

While the features are explained in the documentation, they would be much better communicated by using Git history diagrams along with the explanations – or perhaps common use cases and corresponding Git diagrams in a table.

GitHub supports Mermaid, and Mermaid does have experimental support for Git graphs: image image

Not sure if this particular Mermaid feature is supported in GitHub yet, though. It is. See comment below.

On the other hand, Mermaid doesn't probably render as easily on PyPI, or might turn out to generate less than satisfactory output. And we do have a plan to convert the README to proper Sphinx based documentation and publish it e.g. on Read the Docs (see #78), and for that there's sphinxcontrib-mermaid.

akaihola commented 2 years ago

Moving this later.

akaihola commented 1 year ago

Seems that gitGraph works in GitHub (see e.g. mermaid-js documentation) even though it is still experimental.

So we could in fact go forward with this.