Skip to main content

No project description provided

Project description

REErelease

Coverage Tests

A modern Python tool for managing release contexts and templates with automated quality assurance.

Quick Start

Installation

pip install reerelease

NOTE: Not yet published on pypi

Basic Usage

# Display available contexts
reerelease contexts

# Generate new release files from templates
reerelease new

Development

Setup

  1. Install hatch
  2. Clone and setup:
    git clone git@gitlab.com:real-ee/tool/reerelease.git
    cd reerelease
    hatch run setup
    

Git Hooks Setup

Automated quality assurance is enforced through Git hooks:

python tools/setup_hooks.py

NOTE: this is automatically run during setup

This configures:

  • ๐ŸŽจ Code formatting (ruff format)
  • ๐Ÿ” Linting (ruff check)
  • ๐Ÿท๏ธ Type checking (mypy)
  • ๐Ÿงช Testing (pytest)
  • ๐Ÿ“Š Badge generation (coverage + test badges)
  • ๐Ÿ”’ Push validation (ensures quality gates passed)

Development Workflow

Normal Development

git add .
git commit -m "Your changes"  # Runs full validation pipeline
git push                      # Validates commit has passed checks

The pre-commit hook automatically:

  1. Formats code with ruff
  2. Runs linting checks
  3. Validates type annotations
  4. Executes test suite
  5. Updates coverage/test badges
  6. Adds validation marker to commit

Emergency Bypass

git commit --no-verify -m "Emergency fix [skip-hooks]"
git push --no-verify

Testing

# Run tests
hatch run test

# Run tests with detailed output
hatch run pytest -- --show-fail-details tests

# Generate coverage report
hatch run cov

# Generate all reports
hatch run reports

VS Code Integration

The project includes VS Code settings for:

  • Ruff integration with auto-fix on save
  • MyPy type checking in Problems Panel
  • Pytest test discovery and execution
  • Task runners for common operations

Setup: After opening the project, VS Code should automatically detect the hatch environment. If not, use Ctrl+Shift+P โ†’ "Python: Select Interpreter" and choose the hatch virtual environment (usually shows as reerelease with the hatch path).

Available Tasks

Open the project in VS Code and use Ctrl+Shift+P โ†’ "Tasks: Run Task":

  • pytest - Run test suite
  • pytest (show CLI output on fail) - Run tests with detailed failure output
  • Fix All Ruff Issues - Auto-fix linting issues
  • Format Code - Format code with ruff
  • Quality Check (All) - Run complete quality pipeline

Debug/Launch Configurations

Use F5 or "Run and Debug" panel:

  • Hatch: Show Help - Display reerelease CLI help
  • Hatch: New Context (demo) - Create demo context in /tmp
  • Hatch: List Contexts - List contexts in demo directory
  • Hatch: Emit Test Logs - Generate test log output

Quick Commands

  • Ctrl+Shift+P โ†’ "Python: Configure Tests" (pytest)
  • Ctrl+Shift+P โ†’ "Python: Run All Tests"
  • Ctrl+Shift+P โ†’ "Tasks: Run Task" โ†’ Choose from available tasks

Project Structure

๐Ÿ“ View complete project structure
reerelease/
โ”œโ”€โ”€ src/reerelease/          # Main package
โ”‚   โ”œโ”€โ”€ __about__.py         # Package version and metadata
โ”‚   โ”œโ”€โ”€ __init__.py          # Package initialization
โ”‚   โ”œโ”€โ”€ reerelease.py        # CLI and core logic
โ”‚   โ””โ”€โ”€ templates/           # Jinja2 templates
โ”‚       โ”œโ”€โ”€ readme.md.j2     # README template
โ”‚       โ”œโ”€โ”€ release.md.j2    # Release notes template
โ”‚       โ””โ”€โ”€ roadmap.md.j2    # Roadmap template
โ”œโ”€โ”€ tests/                   # Test suite
โ”‚   โ”œโ”€โ”€ __init__.py          # Test package init
โ”‚   โ”œโ”€โ”€ conftest.py          # Pytest configuration
โ”‚   โ”œโ”€โ”€ test_contexts.py     # Context discovery tests
โ”‚   โ”œโ”€โ”€ test_logging.py      # Logging functionality tests
โ”‚   โ”œโ”€โ”€ test_reerelease.py   # Main CLI tests
โ”‚   โ”œโ”€โ”€ test_templates.py    # Template processing tests
โ”‚   โ””โ”€โ”€ utils.py             # Test utilities
โ”œโ”€โ”€ tools/                   # Development tools
โ”‚   โ”œโ”€โ”€ setup_hooks.py       # Git hooks installer
โ”‚   โ””โ”€โ”€ update_badge.py      # Badge generation script
โ”œโ”€โ”€ .vscode/                 # VS Code configuration
โ”‚   โ”œโ”€โ”€ settings.json        # Editor settings
โ”‚   โ”œโ”€โ”€ tasks.json           # Task definitions
โ”‚   โ””โ”€โ”€ launch.json          # Debug configurations
โ”œโ”€โ”€ docs/                    # Generated badges and reports
โ”‚   โ”œโ”€โ”€ coverage.svg         # Coverage badge
โ”‚   โ””โ”€โ”€ tests.svg            # Tests badge
โ”œโ”€โ”€ pyproject.toml           # Project configuration
โ”œโ”€โ”€ README.md                # This file
โ””โ”€โ”€ license.txt              # MIT license

Quality Assurance

This project maintains 100% test coverage and strict code quality through:

  • Modern Python tooling: Ruff (linting/formatting), MyPy (type checking)
  • Comprehensive testing: pytest with full coverage reporting
  • Automated validation: Git hooks ensure all changes pass quality gates
  • VS Code integration: Real-time feedback and auto-fixing
  • Badge tracking: Visual indicators of test and coverage status

License

Released under MIT open-source license

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

reerelease-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

reerelease-0.1.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file reerelease-0.1.1.tar.gz.

File metadata

  • Download URL: reerelease-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for reerelease-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1b22c5edbfbd9db0c636fb5b01febf944d08277fc1abc2b7fd25bba34de50376
MD5 93ee4bec666bd6c5af79fb55c53f4629
BLAKE2b-256 ea01e397ee98c582f1cb3670c16e46db6e28d9fd4458f1eeb323e3d578025758

See more details on using hashes here.

File details

Details for the file reerelease-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: reerelease-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for reerelease-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82e3e75cf39ee0c61332fada4aba02de99794a9f914b36245830dba59f674085
MD5 3408d2b8c8b295ad505f6f238e1dc2cc
BLAKE2b-256 5b607f662a1776432e7555fd05774b9756b00dce0869e58d0cc8369c7d8f9a70

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