What is this?
This tool, mailmap-generator suggests a Git .mailmap file based on the commit history.
It is intended to support you when you have a repository for which you do not have a .mailmap file yet but want to create one.
Installation
pip install mailmap-generator
Requirements
The tool requires that git is installed and accessible on PATH.
How to use it?
You have to either point the tool to a directory containing a Git repository. From the terminal, the tool can be run as in the following:
Usage:
mailmap <repository>
mailmap -h | --help
mailmap --version
Options:
-h --help Show this screen.
--version Show version.
For example, if you wanted to create a .mailmap file for the psf/requests repository, it could be done as in the following:
$ git clone https://github.com/psf/requests
$ mailmap requests > requests/.mailmap
$ nano requests/.mailmap
The above shows, that the tool just prints a suggested .mailmap file to stdout. Be aware of that the tool only suggests a .mailmap file.
It might be wrong. Since the tool maps same author names, you have to inspect and double check if the suggested file is correct.
Calling it from code:
from mailmap_generator.mailmap import create_mailmap
mailmap_str = create_mailmap(["<path_to_repo>", ... ])
How does the tool create the .mailmap file?
Currently, the tool works in two stages. In the first stage, authors with the same email address are mapped to one author name. Secondly, all authors with the exact same name -- and potentially different email addresses -- are mapped to another. That second step might be wrong in case of authors with same names but different email addresses are actually two different persons.
Alternative tools
Via StackOverflow one finds genmailmap.sh and mailmap_update.py. The latter is removed from the project, i.e., not maintained anymore and inner workings of the former is not entirely clear to me :) Therefore, I created this tool.
Metadata
Release files for mailmap-generator 0.3.1
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 |
|---|---|---|---|---|
| mailmap_generator-0.3.1.tar.gz | 4.2 kB | Without provenance | Details for mailmap_generator-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mailmap_generator-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for mailmap_generator-0.3.1-py3-none-any.whl |
Total release size: 9.4 kB
Release files / mailmap_generator-0.3.1.tar.gz
| Download URL | mailmap_generator-0.3.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38c0e2aceb2e560663b905fde48c64d745a06eb22f4729b2a3f9348c9974ffa3
|
|
BLAKE2b-256 checksum How to use checksums |
12c62cbc3c7522f812c273db05ef6e5326aa6939595a955214ade86ca9551efd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.6 Linux/5.19.0-76051900-generic
|
Release files / mailmap_generator-0.3.1-py3-none-any.whl
| Download URL | mailmap_generator-0.3.1-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
abb250417484b68bbf2263776797bd4088738c653df3d233bd4a272be33e8a7a
|
|
BLAKE2b-256 checksum How to use checksums |
02a09023f03805b2688cc206185de5f180239b14028431d88b6d5faff734a982
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.6 Linux/5.19.0-76051900-generic
|
Security for mailmap-generator 0.3.1
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.