MadForHooks
Random assorted pre-commit hooks.
Usage
Put this in the repos section of your .pre-commit-config.yaml file:
- repo: https://github.com/MarcoGorelli/madforhooks
rev: 0.4.1
hooks:
- id: conda-env-sorter
- id: no-print-statements
- id: check-execution-order
- id: check-test-naming
Or, from the commandline:
pip install madforhooks
python -m madforhooks.check_execution_order file1.ipynb file2.ipynb file3.ipynb
Example of how to run check-test-naming on your test directory:
git ls-files | xargs python -m madforhooks.check_test_naming
Hooks available
conda-env-sorter
Sort the dependencies in your conda environment file(s).
no-print-statements
Raise if print statements are found (unless they have file=).
check-execution-order
Raise if notebook cells were executed out-of-order. Use --strict to ensure
strict monotonicity.
check-test-naming
Check that test names start with test. This is useful for finding
tests which are meant to be running in CI, but which don't because they
are misnamed.
If there are any false positives, you prevent this tool from flagging them
by adding a # not a test comment one the line where the function/class is
defined.
Metadata
Release files for madforhooks 0.4.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 |
|---|---|---|---|---|
| madforhooks-0.4.1.tar.gz | 6.1 kB | Without provenance | Details for madforhooks-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| madforhooks-0.4.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for madforhooks-0.4.1-py2.py3-none-any.whl |
Total release size: 13.6 kB
Release files / madforhooks-0.4.1.tar.gz
| Download URL | madforhooks-0.4.1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13bf4b820789353bcdca9f36a9f7ca93cfb0f0312ad063fc3aa56b78c7dc3c0a
|
|
BLAKE2b-256 checksum How to use checksums |
0a533e7dc5320c8e130d03eaf8705ae4eca646e1432ebf50ab6af9f0109ff849
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.15
|
Release files / madforhooks-0.4.1-py2.py3-none-any.whl
| Download URL | madforhooks-0.4.1-py2.py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
02ccf844008544ff41d5b623a4d74e0a504d2b35e25404ca06fd6d72473f6c0f
|
|
BLAKE2b-256 checksum How to use checksums |
dde26d2eeb2852705350e17df298b68e0ed9f9fd5398cf1f56bf7fea35cf9dcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.15
|
Security for madforhooks 0.4.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.