No project description provided
Project description
sample-git-diffs
Sample git diffs uniformly wrt. number of changes per file. The output is formatted as a .diff file.
optional arguments:
-h, --help show this help message and exit
--n N Total number of diffs to be sampled
--diffstat DIFFSTAT Custom git diff command for the sampling probabilities
--diffcommand DIFFCOMMAND
Custom git diff command for the actual diff
For example, if you want to draw a sample of 25 diffs from the folder data/, you run
sample-git-diffs --diffstat "git diff --stat data/" --n 25
To save this to changes.diff, you run
sample-git-diffs --diffstat "git diff --stat data/" --n 25 > changes.diff
There's also a script that converts the generated .diff / .patch files into markdown.
usage: diff2markdown [-h] --path PATH [--username USERNAME] [--reponame REPONAME] [--branch BRANCH]
optional arguments:
-h, --help show this help message and exit
--path PATH
--username USERNAME
--reponame REPONAME
--branch BRANCH
For example, if you want to convert the changes.diff file into markdown, assuming that the repo is called 'sample-git-diffs', you're on branch 'main' and the github username is 'testuser', you run
diff2markdown --path changes.diff --username testuser --reponame sample-git-diffs --branch main
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sample-git-diffs-0.3.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for sample_git_diffs-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 155a0a9a03c6012e215ba06893ba54bb4a6bbfae8fe5707a91f91db1531d1399 |
|
MD5 | 1bc7f6626e3ae4235c680d59b83ceaea |
|
BLAKE2b-256 | ad37b050f52a2a41c51a86c0b5263f86962bb53a6039262b2fee1d7dc5e95e65 |