gen3utils
Utils for Gen3 commons management. Gen3utils includes a CLI and is intended to be used as an external facing tool for validating configuration, generating release notes, posting deployment changes, logging parser information, and more.
Install with pip
pip install gen3utils
manifest.json validation
Validate one or more manifest.json files:
gen3utils validate_manifest cdis-manifest/*/manifest.json
The validation settings can be updated by modifying this file.
etlMapping.yaml validation
Validate an etlMapping.yaml file against the dictionary URL specified in a manifest.json file:
gen3utils validate_etl_mapping etlMapping.yaml manifest.json
Portal Configuration (gitops.json) validation
Validate a gitops.json file against the dictionary URL specified in a manifest.json file and an etlMapping.yaml file. Adds a comment to a pull request listing all the errors encountered when validating against etlMapping.yaml
gen3utils validate_portal_config etlMapping.yaml manifest.json gitops.json <username>/<repository> <pull request number>
To run without making a pull request comment
gen3utils validate_portal_config etlMapping.yaml manifest.json gitops.json
Comment on a PR with any deployment changes when updating manifest services
The command requires the name of the repository, the pull request number and a GITHUB_TOKEN environment variable containing a token with read and write access to the repository. It also comments a warning if a service is pinned on a branch.
pip install gen3utils
gen3utils post-deployment-changes <username>/<repository> <pull request number>
Log parser for CTDS log pipeline
pip install gen3utils
gen3utils s3log --help
gen3utils s3log [OPTIONS] BUCKET PREFIX SCRIPT
Run SCRIPT in Gen3 logs under S3 BUCKET:PREFIX. The SCRIPT should be importable defining a method like this:
def handle_row(obj, line):
if 1 + 1 == 2:
return line
For example, to process logs in bucket my-commons-logs at prefix my-logs with a gen3utils/script.py file:
pip install gen3utils
gen3utils s3log my-commons-logs my-logs gen3utils.script
Running tests locally
poetry install -vv
poetry run pytest -vv ./tests
Metadata
Release files for gen3utils 1.0.0
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 |
|---|---|---|---|---|
| gen3utils-1.0.0.tar.gz | 25.7 kB | Without provenance | Details for gen3utils-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gen3utils-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for gen3utils-1.0.0-py3-none-any.whl |
Total release size: 57.0 kB
Release files / gen3utils-1.0.0.tar.gz
| Download URL | gen3utils-1.0.0.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bde8185e0a1b413fd2ca4e4dc3350169edd43ac1d08400af2a25357208af64d
|
|
BLAKE2b-256 checksum How to use checksums |
cc9d74f3bd362ecc52e53f323b8e81ea4f6468303d854e5f3402bd7945a13160
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.11 Linux/6.11.0-1018-azure
|
Release files / gen3utils-1.0.0-py3-none-any.whl
| Download URL | gen3utils-1.0.0-py3-none-any.whl |
|---|---|
| Size | 31.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93a7031000c22383f90889a64802688445227dd46bb2563acf2a9eb41cd2b502
|
|
BLAKE2b-256 checksum How to use checksums |
e4b46f08bb6d80349da4f8b5beda2c8952c387ebe6c0d25fe7a7aea494e8d9a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.11 Linux/6.11.0-1018-azure
|
Security for gen3utils 1.0.0
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.