Prudentia CLI - Development tools for Prudentia internal developers
Project description
Prudentia CLI (pevx)
A development CLI tool for Prudentia internal developers.
Git Hooks
This project uses pre-commit to enforce code quality and commit standards.
Configured Hooks
- pre-push: Validates that branch names contain a JIRA link for the PRVS project
- commit-msg: Ensures commit messages contain a JIRA link for the PRVS project
Setup
-
Install dependencies (including pre-commit):
uv sync --all-groups
-
Install hooks:
uv run pre-commit install --install-hooks
Manual Hook Management
- Run hooks manually:
uv run pre-commit run --all-files - Update hooks:
uv run pre-commit autoupdate
Installation
From PyPI (when published)
pip install pevx
Development Mode
Clone the repository and install in development mode using uv:
git clone https://github.com/Prudentia-Sciences/pevx
cd pevx
uv sync
Usage
After installation, you can use the CLI with the pevx command:
# Show help
pevx --help
# Show version
pevx --version
Available Commands
uv [args]
Proxy to uv with AWS CodeArtifact authentication.
pevx uv add [package] --domain custom-domain --domain-owner 123456789 --repo custom-repo --region us-west-2
Default values:
- Domain: prudentia-sciences
- Domain Owner: 728222516696
- Repository: pypi-store
- Region: us-east-1
docker [args]
Proxy to docker with AWS ECR authentication.
aws-each [args]
Assume a role in each target AWS account using OIDC and run an AWS CLI command.
pevx aws-each --accounts '["111111111111","222222222222"]' s3 ls
Options:
--accounts: JSON list of AWS account IDs (required, or setTARGET_ACCOUNTSenv var)--role-name: IAM Role name to assume (default:github-actions-backend-role)--continue-on-error/--fail-fast: Continue with remaining accounts on failure
pyclient
Generate a Python client from a FastAPI OpenAPI spec.
pevx pyclient --app-path app.main:app
Options:
--pyproject: Path to pyproject.toml (default:pyproject.toml)--app-path: Python path to FastAPI app (default:app.main:app)
Development
Adding New Commands
- Create a new file in the
src/pevx/commands/directory for your command - Implement your command using Click
- Import and register your command in
src/pevx/cli.py
Example:
# In src/pevx/commands/my_command.py
import click
@click.command()
def my_command():
"""Command description."""
click.echo("Running my command")
# In src/pevx/cli.py, add:
from pevx.commands.my_command import my_command
cli.add_command(my_command)
CI/CD and Versioning
This project uses semantic-release for automated versioning:
- Automated Testing: Runs tests on Python 3.12
- Semantic Versioning: Automatically determines version from commit messages
- Automated Publishing: Builds and publishes to PyPI on new versions
Commit Message Format
Use conventional commit messages:
<type>(<scope>): <description>
Common types:
fix: Bug fixes (PATCH bump)feat: New features (MINOR bump)feat!,fix!: Breaking changes (MAJOR bump)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pevx-1.6.0.tar.gz.
File metadata
- Download URL: pevx-1.6.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
701507e70d59cb55d634f8d056e850660282751d5eaec07e35e630d395637a8c
|
|
| MD5 |
133d602f80adf1b2179bc3da0c0ed497
|
|
| BLAKE2b-256 |
d7dd4c96bd7365472325ccd86a290d41aa64ea69b7bb4b4b5712453ffeb3eccb
|
File details
Details for the file pevx-1.6.0-py3-none-any.whl.
File metadata
- Download URL: pevx-1.6.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bb06a5a1b76d9db47686dc3ccd929a34ed1d88f4d3c9922f63e5e8f70b5f857
|
|
| MD5 |
b177b7a55f25a4aa0efe92bd3e375f66
|
|
| BLAKE2b-256 |
3d5a6c33b05df1e0ef77a6ca0bb07f08baf52a6688605d1aaaff7e8489d7d92c
|