gitprovenance
Keep track of git repository commits, which correspond to figures generated via matplotlib. This is a pedestrian approach, for cases where a full provenance tracking system is overkill.
Usage
Use gitprovance.savefig instead of plt.savefig:
>>> import matplotlib.pyplot as plt, gitprovenance
>>> plt.plot([1,2,3,4])
>>> gitprovenance.savefig("foo.pdf")
This adds a commit to a hidden branch in the current git repository, which contains the current state of the tree:
$ git log refs/provenance/main def11c6 (refs/provenance/main) Provenance commit cd66bed (HEAD -> master, origin/master, origin/HEAD) Add files
The saved figure contains an embedded stamp that refers to the provenance commit, and the head of the current branch at the time, plus a diff between the provenance commit and the branch head:
$ grep PROVENANCE-STAMP foo.pdf %% @@PROVENANCE-STAMP:commit:def11c6410e78925eaef7feceaadf07fffcbc4f8:head:cd66beda90ddb285d7140cabb4a2a4e504980897:diff:diff --git a/gitprovenance.py b/gitprovenance.py %% index 011c5f8..a566740 100644 %% --- a/gitprovenance.py %% +++ b/gitprovenance.py ...
Metadata
Release files for gitprovenance 0.0.2
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 |
|---|---|---|---|---|
| gitprovenance-0.0.2.tar.gz | 3.6 kB | Without provenance | Details for gitprovenance-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gitprovenance-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for gitprovenance-0.0.2-py3-none-any.whl |
Total release size: 7.7 kB
Release files / gitprovenance-0.0.2.tar.gz
| Download URL | gitprovenance-0.0.2.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b30b41df8a6f6fece37fef8535fb634cb5974779bfc21a069aa0323917fa3479
|
|
BLAKE2b-256 checksum How to use checksums |
b0fb14dbee826ba6f56acba3edcaacf1e4246226bc4af5ec80c3cbe0e3823f17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.24.0
|
Release files / gitprovenance-0.0.2-py3-none-any.whl
| Download URL | gitprovenance-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d7d7f96a07a70fbe101a3f66423699728c03d67ba6784e0198cd9e136c10a6e
|
|
BLAKE2b-256 checksum How to use checksums |
fe968ff0415cb5bb33d9faeb3f69c42a52310a4e123c339a621dd4d847257104
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.24.0
|
Security for gitprovenance 0.0.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.