jps-test-artifact-python-utils
Utilities for creating, verifying, and managing test artifact directories used to support functional testing of command-line executables. Includes CLI tools for setting up test directories, generating MD5 manifests, and validating test data integrity.
🧩 Installation
pip install jps-test-artifact-python-utils
or install in editable mode for local development:
git clone git@github.com:jai-python3/jps-test-artifact-python-utils.git
cd jps-test-artifact-python-utils
pip install -e .
🧩 setup-test-artifacts
Sets up a new test artifact instance directory by copying representative input, output, and script files into a new workspace.
Usage
setup-test-artifacts --indir <test-case-dir> [--script-dir <scripts-dir>]
Example
setup-test-artifacts --indir synthentic-genomics-pipeline/v1.2.0/comp_analysis/test-case-001/
This generates a fully configured test workspace with expected structure and a runnable shell script.
🧩 create-md5-manifest
Generates an md5_manifest.txt file listing all files under a given directory with their MD5 checksums, sizes, and timestamps.
Usage
create-md5-manifest --test-case-dir <path> --manifest-file <path>
Example Output
## method-created: /scripts/create_md5_manifest.py
## date-created: 2025-10-28 13:22:01
## created-by: jsundaram
## Columns:
## 1: relative file path
## 2: md5sum
## 3: number of bytes
## 4: date/time md5sum was derived
inputs/sample_input.vcf 3d883acf1a3db79c3390b8a96570a2ec 2145 2025-10-28-13:22:03
outputs/expected_output.tsv 53754d366f5676075a00e4c979f85cae 907 2025-10-28-13:22:04
🧩 verify-md5-manifest
Compares the current MD5 checksums of files in a test artifact directory with a saved manifest, reporting any mismatches or missing files.
Usage
verify-md5-manifest --test-case-dir <path> --manifest-file <path>
Example Output
✔ inputs/sample_input.vcf
✔ outputs/expected_output.tsv
✘ outputs/altered_output.tsv
2 of 3 files passed
Files with mismatched MD5 sums:
File: outputs/altered_output.tsv
Current MD5: 25a89f...
Previous MD5: 53754d...
🗂 Example Test Artifact Directory Layout
synthentic-genomics-pipeline/v1.2.0/comp_analysis/test-case-001/
├── inputs/
│ ├── sample_input.bam
│ ├── sample_input.vcf
│ └── genes.fasta
├── outputs/
│ └── expected_output.tsv
└── scripts/
├── requirements.txt
└── run_test_case.sh.tmpl
🧾 Logging
Logs follow this format:
LOG_FORMAT = "%(levelname)s : %(asctime)s : %(pathname)s : %(lineno)d : %(message)s"
- Only WARNING and above are printed to STDERR.
- INFO, WARNING, ERROR, and FATAL are all written to the log file.
🧪 Development and Testing
Install dependencies for linting, formatting, and testing:
pip install -e '.[dev]'
Run all lint and test checks:
make lint
make test
🧾 License
MIT License
© 2025 Jaideep Sundaram
Metadata
Release files for jps-test-artifact-python-utils 0.1.3
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 |
|---|---|---|---|---|
| jps_test_artifact_python_utils-0.1.3.tar.gz | 13.0 kB | Without provenance | Details for jps_test_artifact_python_utils-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jps_test_artifact_python_utils-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for jps_test_artifact_python_utils-0.1.3-py3-none-any.whl |
Total release size: 26.0 kB
Release files / jps_test_artifact_python_utils-0.1.3.tar.gz
| Download URL | jps_test_artifact_python_utils-0.1.3.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb6e860043edfcbf37fda8390ce50b797b245d52e3f274858bc931659eed89a7
|
|
BLAKE2b-256 checksum How to use checksums |
0ed9e1c6f0dcb84f2a6abd69f37d7bdab9646a50b51bb49bf1a1a6a17b761dbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / jps_test_artifact_python_utils-0.1.3-py3-none-any.whl
| Download URL | jps_test_artifact_python_utils-0.1.3-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53a3459dd474f47725ca008ab50703198b4501972748c26d8cc12f61fde875d6
|
|
BLAKE2b-256 checksum How to use checksums |
5e8de362f3016d1ef64ff92788ad2190725c2e8bda160a1fc0bfc7dd10017192
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for jps-test-artifact-python-utils 0.1.3
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.