Skip to main content

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

diff2markdown

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

Metadata

Release files for sample-git-diffs 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sample-git-diffs 0.5.2
File Size Uploaded Provenance
sample_git_diffs-0.5.2.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sample-git-diffs 0.5.2
File Interpreter ABI Platform
sample_git_diffs-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / sample_git_diffs-0.5.2.tar.gz

Download URL sample_git_diffs-0.5.2.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0a7054b4cb67b3683ea4347134ea95a115788f2e6828c088ca98442e64ffa4ac
BLAKE2b-256 checksum
How to use checksums
55b4f00b90eea53a77f523651917159c844c23b4c90b3461a9cf47062f39f7f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.14.0 Darwin/25.3.0

Release files / sample_git_diffs-0.5.2-py3-none-any.whl

Download URL sample_git_diffs-0.5.2-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f6900102ba79047eac67b2e8e6480c7242cb679204cf3709d45cd4d624aa35e
BLAKE2b-256 checksum
How to use checksums
f1739647fbe4543bc03908a263824ffe423597eea28cd07e91357f4871ef568d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.14.0 Darwin/25.3.0

Security for sample-git-diffs 0.5.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page