rmtoo

Development Guide

This guide covers setting up a development environment for rmToo and contributing to the project.

Development Environment Setup

Prerequisites

System Dependencies

# Debian/Ubuntu
sudo apt install -y make graphviz texlive-latex-extra
sudo apt install -y python3-dev python3-venv

# CentOS/RHEL
sudo yum install -y make graphviz texlive python3-devel

# Fedora
sudo dnf install -y make graphviz texlive python3-devel

Python Environment

# Clone the repository
git clone https://github.com/florath/rmtoo.git
cd rmtoo

# Create virtual environment
python3 -m venv dev-env
source dev-env/bin/activate

# Install in development mode
pip install -e .

Environment Variables

export PYTHONPATH=${PWD}

Testing

Running Tests Locally

Full Test Suite

cd rmtoo
pytest --junit-xml=result.xml --cov-report term --cov-report xml --cov=lib --cov=inputs --cov=outputs tests

Specific Test Categories

# Unit tests only
pytest tests/RMTTest-Unit/

# Blackbox tests only
pytest tests/RMTTest-Blackbox/

# Output tests only
pytest tests/RMTTest-Output/

# Syntax tests only
pytest tests/RMTTest-Syntax/
# Run tests for all supported Python versions
tox

# Run specific environment
tox -e py39
tox -e py310
tox -e py311

# Run linting
tox -e pep8
tox -e pylint

Test Structure

rmToo uses pytest with specific naming conventions:

Test Categories

XML Comparison Testing

For output modules that generate XML, rmToo includes custom XML comparison utilities:

Background

Requirements

Code Quality

Linting

# Run flake8
flake8

# Run pylint
pylint rmtoo

# Using tox
tox -e pep8
tox -e pylint

Code Coverage

# Generate coverage report
pytest --cov=lib --cov=inputs --cov=outputs --cov-report=html tests

# View coverage report
open htmlcov/index.html

Contributing

Development Workflow

  1. Fork the repository on GitHub
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and add tests
  4. Run the test suite: tox
  5. Submit a pull request

Code Style

Testing Requirements

Architecture Overview

Core Components

Plugin Development

See the setuptools entry points in setup.py for examples of creating new input and output plugins.

Release Process

Building Packages

# Build source distribution
python setup.py sdist

# Build wheel
python setup.py bdist_wheel --universal

Testing with TestPyPI

# Upload to TestPyPI
python setup.py sdist upload -r testpypi
python setup.py bdist_wheel --universal upload -r testpypi

# Install from TestPyPI
pip install -i https://testpypi.python.org/pypi rmtoo

Community and Forks

Notable Forks

Several forks have been created over the years. Some interesting ones to review:

Contributing Back

When reviewing forks, consider:

  1. Cherry-picking useful features
  2. Contacting fork maintainers
  3. Coordinating integration efforts

Getting Help

Development Questions

Documentation

Tools and Resources

Required Tools

Optional Tools