Metadata-Version: 2.4
Name: reerelease
Version: 0.2.0
Project-URL: Documentation, https://gitlab.com/real-ee/tool/reerelease#readme
Project-URL: Issues, https://gitlab.com/real-ee/tool/reerelease/-/issues
Project-URL: Source, https://gitlab.com/real-ee/tool/reerelease#
Author-email: Laurence DV <laurencedv@realee.tech>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Markup :: Markdown
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Requires-Dist: jinja2>=3.1.6
Requires-Dist: rich>=14.1.0
Requires-Dist: typer>=0.16.1
Description-Content-Type: text/markdown

# REErelease

![Coverage](docs/coverage.svg)
![Tests](docs/tests.svg)

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 project  
So you have time and mental space to write your ***tasks***, ***milestone*** and architect your project in a simple way  
This is what [REErelease][repo_link] aims to enable, simple markdown project management, automatized  
It does support monorepo environment as the managed *contexts* are automatically discovered and can be nested  

## Quick Start

### Installation

```sh
pip install reerelease
```
> NOTE: published on [pypi][pypi_reerelease_link]

### Basic Usage

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

# Discover existing contexts in current directory
reerelease context list
```

> 📖 **Complete command reference**: See [docs/commands.md](docs/commands.md) for detailed usage and options.

## Development

### Setup

1. Install [hatch](https://hatch.pypa.io/1.12/install/)
2. Clone and setup:
   ```sh
   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:

```sh
python tools/setup_hooks.py
```

> NOTE: this is automatically run during [setup](#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
```sh
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
```sh
git commit --no-verify -m "Emergency fix [skip-hooks]"
git push --no-verify
```

### Testing

```sh
# 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][vscode_install_link] 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][vscode_install_link] 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
- **MyPy Type Check** - Run MyPy type checking
- **pytest: run test under cursor** - Run the test at cursor using helper script

#### 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. Test release (optional but recommended)
   ```sh
   hatch run release-test    
   ```
4. Production release
   ```sh
   hatch run release-auto    
   ```

**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 PyPI

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



## Project Structure

<details>
<summary>📁 View complete project structure</summary>

```
reerelease/
├── src/reerelease/            # Main package
│   ├── __about__.py           # Package version and metadata
│   ├── __init__.py            # Package initialization
│   ├── reerelease.py          # CLI and core logic
│   ├── commands/              # CLI command modules
│   │   ├── context.py
│   │   ├── contexts.py
│   │   ├── milestone.py
│   │   ├── new.py
│   │   ├── problem.py
│   │   └── task.py
│   ├── core/                  # Core utilities
│   │   ├── console.py
│   │   ├── context.py
│   │   ├── logging.py
│   │   └── templates.py
│   └── templates/             # Jinja2 templates
│       ├── common/            # Shared template fragments
│       ├── context/           # Context templates
│       ├── domain/            # Domain templates
│       ├── milestone/         # Milestone templates
│       └── task/              # Task templates
├── tests/                     # Test suite
│   ├── __init__.py            # Test package init
│   ├── conftest.py            # Pytest configuration
│   ├── test_cmd_context.py    # Context command tests
│   ├── test_cmd_contexts.py   # Contexts command tests
│   ├── test_cmd_milestone.py  # Milestone command tests
│   ├── test_cmd_new.py        # New command tests
│   ├── test_cmd_task.py       # Task command tests
│   ├── test_core_context.py   # Core context tests
│   ├── test_core_logging.py   # Core logging tests
│   ├── test_core_templates.py # Core templates tests
│   ├── test_reerelease.py     # Main CLI tests
│   └── utils.py               # Test utilities
├── 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
│   ├── commands.md            # Command reference
│   ├── coverage.svg           # Coverage badge
│   └── tests.svg              # Tests badge
├── pyproject.toml             # Project configuration
├── README.md                  # This file
└── license.txt                # MIT license
```

</details>

## 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](/license.txt) open-source license

<!-- links -->

[vscode_install_link]: https://code.visualstudio.com/download
[repo_link]: https://gitlab.com/real-ee/tool/reerelease
[hatch_install_link]: https://hatch.pypa.io/1.12/install/
[pypi_reerelease_link]: https://pypi.org/project/reerelease/# Test trigger functionality
# Test trigger functionality 2
# Test successful trigger
# Test env trigger
# Test env trigger fixed
