Skip to main content

Prudentia CLI - Development tools for Prudentia internal developers

Project description

Prudentia CLI (pevx)

A development CLI tool for Prudentia internal developers.

Installation

From PyPI (when published)

pip install pevx

Development Mode

Clone the repository and install in development mode using Poetry:

git clone [repository-url]
cd pevx
poetry install

Usage

After installation, you can use the CLI with the pevx command:

# Show help
pevx --help

# Authenticate poetry with AWS CodeArtifact
pevx auth-poetry

Available Commands

  • auth-poetry: Authenticate poetry with AWS CodeArtifact
    • Configures poetry to use Prudentia's private Python package repository
    • Uses AWS credentials to obtain authentication token

Command Options

auth-poetry

# Customize CodeArtifact settings
pevx auth-poetry --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

Development

Project Structure

pevx/
├── pevx/                     # Python package
│   ├── __init__.py           # Package init with version
│   ├── cli.py                # Entry point for CLI
│   ├── commands/             # Subcommands organized here
│   │   ├── __init__.py
│   │   └── auth.py           # Authentication commands
│   ├── utils/                # Utility functions
│   │   ├── __init__.py
│   │   └── config.py         # Configuration utilities
│   └── core/                 # Business logic
│       ├── __init__.py
│       └── engine.py         # Core functionality
├── tests/
│   ├── __init__.py
│   └── test_cli.py
├── pyproject.toml            # Poetry configuration
└── README.md

Adding New Commands

  1. Create a new file in the pevx/commands/ directory for your command group
  2. Implement your command using Click
  3. Import and register your command in pevx/cli.py

Example:

# In pevx/commands/my_command.py
import click

@click.command()
def my_command():
    """Command description."""
    click.echo("Running my command")

# In pevx/cli.py, add:
from pevx.commands.my_command import my_command
cli.add_command(my_command)

CI/CD and Versioning

This project uses a comprehensive CI/CD pipeline with semantic-release:

  1. Automated Testing

    • Runs tests on multiple Python versions (3.9, 3.10, 3.11, 3.12)
    • Generates code coverage reports
  2. Semantic Versioning

    • Automatically determines the next version number based on commit messages
    • Creates GitHub releases with generated changelogs
  3. Automated Publishing to PyPI

    • When a new version is detected, automatically builds and publishes to PyPI

Required Secrets

To use the CI/CD pipeline, add this secret to your GitHub repository:

  • PYPI_API_TOKEN: API token for PyPI

Commit Message Format

For semantic-release to work properly, use conventional commit messages:

<type>(<scope>): <description>

[optional body]

[optional footer]

Common types:

  • fix: Bug fixes (triggers PATCH version bump)
  • feat: New features (triggers MINOR version bump)
  • feat!, fix!, refactor!, etc.: Breaking changes (triggers MAJOR version bump)

Once published to PyPI, team members can install the CLI tool with:

pip install pevx

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pevx-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pevx-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file pevx-0.1.0.tar.gz.

File metadata

  • Download URL: pevx-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pevx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0c3046c2d9d74aa2a4ff932f6c8c9fbf40bdd3984a4fa433add26b1c1e4e42c2
MD5 f6eb3a16cbba0124948fe5fb2b28b634
BLAKE2b-256 74f29cd6207155c1d9c9642428f36cdd68ab8ae875ade35a71610642d5ffbe8d

See more details on using hashes here.

File details

Details for the file pevx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pevx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pevx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d008622b8a984d2fee71672f818e41f4cbb19db6b563c72f0609a470eb452b0
MD5 9047943d92461a23f603f6f9358171a6
BLAKE2b-256 eacb96f06f9a67b7a990b9adc3078ef4356c7108f70a6b92e1e8f2dfc7b94326

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page