Skip to main content

No project description provided

Project description

REErelease

PyPI - Version Coverage Tests

Imagine you had only 3 file to manage and plan your projects: readme, roadmap and release
Now imagine a simple cli interface to release, update, document the lifecycle of those projects
So you have time and mental space to put on the actual work and architect your project in a simple straigth-forward way
This is what REErelease aims to enable, simple markdown project management, automated yet flexible
It does support monorepo environment and other nested contexts scenarios

Based on typer/click, jinja2 and questionary

Quick Start

Installation

pip install reerelease

Basic Usage

# Create new project context with templates
reerelease context new my-project

# Discover existing contexts in current directory
reerelease context list

๐Ÿ“– Complete command reference: See the commands reference for detailed usage and options.

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 hooks runs:

  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

NOTE: They are forced on the main/master branch or you can trigger them manually by adding [force-hooks] or [verify-hooks] to your commit message Alternatively than can be triggered by environment variable FORCE_HOOKS=1 git commit -m 'feature 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
  • pytest (debug logs) - Run tests with verbosity set to DEBUG
  • pytest run test under cursor - Run the test at cursor using helper script
  • pytest generate reports - Generate coverage and test reports in docs folder
  • Fix All Ruff Issues - Auto-fix linting issues
  • Format Code - Format code with ruff
  • Quality Check (All) - Run complete quality pipeline
  • MyPy Type Check - Run MyPy type checking

Debug/Launch Configurations

Use F5 or "Run and Debug" panel:

  • Show Help - Display reerelease CLI help
  • Quality Check - Run full quality pipeline
  • Setup: Demo Monorepo - Create demo monorepo
  • Test: List Demo Monorepo - List demo monorepo contexts
  • Add Context (demo) - Create demo context in /tmp
  • List Contexts (demo) - List contexts in demo directory
  • 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

Publishing workflow

  1. Bump version in src/reerelease/__about__.py

  2. Update release notes in release.md

  3. Release in 3 automatic steps:

    hatch run release-safe   
    

NOTE: you need an API key setuped for test.pypi.org AND pypi.org

Automated release process:

  • Version validation (checks git tags + PyPI)
  • Quality checks (format, lint, typecheck, tests)
  • Build package and validate distribution
  • Create git tag and push to origin
  • Publish to test-PyPI and then to PyPI if nothing failed

Manual alternative: python3 tools/release.py [--test-pypi]

Project Structure

๐Ÿ“ View complete project structure
reerelease/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€reerelease/                     # Main package
โ”‚      โ”œโ”€โ”€ __about__.py                # Package version and metadata
โ”‚      โ”œโ”€โ”€ __init__.py                 # Package initialization
โ”‚      โ”œโ”€โ”€ reerelease.py               # Main logic and CLI entry
โ”‚      โ”œโ”€โ”€ errors.py                   # Custom Exceptions and error types
โ”‚      โ”œโ”€โ”€ config.py                   # App global configuration and defaults value
โ”‚      โ”œโ”€โ”€ cli
โ”‚      โ”‚   โ”œโ”€โ”€ commands/               # CLI command modules
โ”‚      โ”‚   โ”‚   โ”œโ”€โ”€ context.py
โ”‚      โ”‚   โ”‚   โ”œโ”€โ”€ milestone.py
โ”‚      โ”‚   โ”‚   โ”œโ”€โ”€ problem.py
โ”‚      โ”‚   โ”‚   โ””โ”€โ”€ task.py
โ”‚      โ”‚   โ”œโ”€โ”€ console.py              # Console specific methods
โ”‚      โ”‚   โ””โ”€โ”€ error_codes.py          # CLI exit codes
โ”‚      โ”œโ”€โ”€ core/                       # Core dataclasses and functions
โ”‚      โ”‚   โ”œโ”€โ”€ context.py              # Memory representation of contextes
โ”‚      โ”‚   โ”œโ”€โ”€ logging.py              # Logging configuration
โ”‚      โ”‚   โ”œโ”€โ”€ milestone.py            # Memory representation of milestones
โ”‚      โ”‚   โ””โ”€โ”€ task.py                 # Memory represnetation of tasks
โ”‚      โ”œโ”€โ”€ service                     # Middle layer services, contain file io and other complex shared algo
โ”‚      โ”‚   โ”œโ”€โ”€ dsl                     # Custom DSL 
โ”‚      โ”‚   โ”‚   โ”œโ”€โ”€ inplace_edit.py     # Inplace edition (minimal-churn) functions
โ”‚      โ”‚   โ”‚   โ”œโ”€โ”€ memory_manager.py   # Parsed memory management
โ”‚      โ”‚   โ”‚   โ”œโ”€โ”€ phase1_specs.py     # Template annotation parsing phase
โ”‚      โ”‚   โ”‚   โ”œโ”€โ”€ phase2_parser.py    # Content input phase
โ”‚      โ”‚   โ”‚   โ”œโ”€โ”€ phase3_renderer.py  # Content output phase
โ”‚      โ”‚   โ”‚   โ”œโ”€โ”€ phase4_validator.py # Validation phase
โ”‚      โ”‚   โ”‚   โ””โ”€โ”€ pipeline.py         # Wrapping oject and simple-to-use API
โ”‚      โ”‚   โ”œโ”€โ”€ context_manager.py      # Context management service
โ”‚      โ”‚   โ”œโ”€โ”€ milestone_manager.py    # Milestone management service
โ”‚      โ”‚   โ””โ”€โ”€ template_manager.py     # Template management and rendering service
โ”‚      โ”œโ”€โ”€ validators                  # Static validators
โ”‚      โ”‚   โ”œโ”€โ”€ validate_context.py     # Context specific validation
โ”‚      โ”‚   โ”œโ”€โ”€ validate_dsl.py         # Validator for the DSL pipeline
โ”‚      โ”‚   โ””โ”€โ”€ validate_milestone.py   # Milestone specific validation
โ”‚      โ””โ”€โ”€ templates/                  # Jinja2 templates
โ”‚          โ”œโ”€โ”€ common/                 # Shared template fragments
โ”‚          โ”œโ”€โ”€ context/                # Context templates
โ”‚          โ”œโ”€โ”€ domain/                 # Domain templates
โ”‚          โ”œโ”€โ”€ milestone/              # Milestone templates
โ”‚          โ””โ”€โ”€ task/                   # Task templates
โ”œโ”€โ”€ tests/                             # Test suite
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ tools/                             # Development tools
โ”‚   โ”œโ”€โ”€ release.py                     # Automated release script
โ”‚   โ”œโ”€โ”€ run_pytest_node.py             # Helper to run pytest for editor integrations
โ”‚   โ”œโ”€โ”€ setup_demo_monorepo.sh         # Demo monorepo setup script
โ”‚   โ”œโ”€โ”€ 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/                              # Documentation and badges
โ”‚   โ”œโ”€โ”€ architecture.md                # Software architecture description
โ”‚   โ”œโ”€โ”€ commands.md                    # Command reference
โ”‚   โ”œโ”€โ”€ coverage.svg                   # Tests coverage badge
โ”‚   โ”œโ”€โ”€ dsl.md                         # Custom DSL specification and guideline
โ”‚   โ”œโ”€โ”€ metadata.md                    # Supported metadata specifications
โ”‚   โ”œโ”€โ”€ tests.svg                      # Tests number and success badge
โ”‚   โ””โ”€โ”€ user_guide.md                  # Top-level user guide for quick start and understanding
โ”œโ”€โ”€ pyproject.toml                     # Python project & tooling configuration
โ”œโ”€โ”€ README.md                          # This file
โ”œโ”€โ”€ release.md                         # Release log
โ”œโ”€โ”€ roadmap.md                         # Planned future version and functionnality
โ””โ”€โ”€ license.txt                        # License

Quality Assurance

This project aims to 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
  • 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.3.2.tar.gz (96.0 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.3.2-py3-none-any.whl (80.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for reerelease-0.3.2.tar.gz
Algorithm Hash digest
SHA256 2a5de189d089c685a8c11d7d2f28e8c85995fe6e52154faec120acf6f5b96dbc
MD5 54e8854329e409e7e2095597866c3fa1
BLAKE2b-256 d0f7f116e01707122b9820af77839afd3fb72516ad70d5910b05032e7815cbee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reerelease-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 80.9 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.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b27a8538f5a7faf3391b20a2dd38cdeae9c8e3a8e1b8d25d9df3f4c16f5d1bfe
MD5 1f08946da60740f3d5375900bba563d8
BLAKE2b-256 3253e6695c89ee5701b0b4b5ccfa6f9abcf1ea202ae0139edcf5e6165ab0bac8

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