Thank you for your interest in contributing to RushTI! This document provides guidelines and instructions for contributing.
-
Clone the repository
git clone https://github.com/cubewise-code/rushti.git cd rushti -
Create a virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
RushTI uses pytest for testing. Tests are organized into two categories:
- Unit tests (
tests/unit/): No TM1 connection required, fast execution - Integration tests (
tests/integration/): Require a TM1 server connection
tests/
├── conftest.py # Shared fixtures and configuration
├── config.ini.template # Template for TM1 test configuration
├── resources/ # Test resource files (taskfiles, etc.)
├── unit/ # Unit tests (408 tests, no TM1 required)
│ ├── test_checkpoint.py
│ ├── test_config_resolution.py
│ ├── test_dag.py
│ ├── test_dag_visualization.py
│ ├── test_exclusive.py
│ ├── test_logging.py
│ ├── test_run_modes.py
│ ├── test_settings.py
│ ├── test_taskfile.py
│ └── test_utils.py
└── integration/ # Integration tests (TM1 required)
├── test_checkpoint_resume.py
├── test_dag_execution.py
├── test_v11_v12_execution.py
└── test_v11_v12_features.py
# Run all unit tests
pytest tests/unit/ -v
# Run a specific unit test file
pytest tests/unit/test_dag.py -v
# Run tests matching a pattern
pytest tests/unit/ -k "checkpoint" -vIntegration tests require a TM1 server connection. Configure using a config.ini file.
Default: tests/config.ini
# Copy the template and fill in your TM1 credentials
cp tests/config.ini.template tests/config.ini
# Edit tests/config.ini with your TM1 server settings
pytest tests/integration/ -vAlternative: Custom config path
# Use RUSHTI_TEST_CONFIG to point to any config.ini file
export RUSHTI_TEST_CONFIG="/path/to/your/config.ini"
pytest tests/integration/ -vThe config.ini file uses the standard RushTI format with TM1 instance sections. See tests/config.ini.template for the expected format.
Integration tests are automatically skipped when no TM1 configuration is available.
# Run all tests (unit tests pass, integration tests skip if no TM1)
pytest tests/ -v
# Run only tests that don't require TM1
pytest -m "not requires_tm1" -v
# Run only tests that require TM1
pytest -m "requires_tm1" -v- Unit tests: Add to the appropriate file in
tests/unit/based on the module being tested - Integration tests: Add to
tests/integration/and decorate with@pytest.mark.requires_tm1
Example unit test:
# tests/unit/test_taskfile.py
class TestMyNewFeature(unittest.TestCase):
def test_something(self):
# Test implementation
passExample integration test:
# tests/integration/test_my_feature.py
import pytest
import unittest
@pytest.mark.requires_tm1
class TestMyFeatureIntegration(unittest.TestCase):
def test_with_tm1(self):
# Test implementation requiring TM1
passTests are automatically run on all pull requests via GitHub Actions. Unit tests run on every PR, while integration tests run when TM1 secrets are configured.
-
Create a branch for your changes:
git checkout -b feature/your-feature-name
-
Make your changes and ensure tests pass
-
Commit your changes with a clear commit message
-
Push and create a Pull Request
- Ensure your code follows the existing style
- Update documentation if needed
- Add tests for new functionality
- Fill out the PR template completely
Maintainers will apply one of these labels to trigger a release:
| Label | Version Bump | Example |
|---|---|---|
release:patch |
Patch | 1.5.0 → 1.5.1 |
release:minor |
Minor | 1.5.0 → 1.6.0 |
release:major |
Major | 1.5.0 → 2.0.0 |
No label = no release. This is used for documentation, CI changes, or batching multiple PRs before a release.
Releases are automated via GitHub Actions:
- PR is merged to
master - CI tests run automatically
- If tests pass and a release label is present:
- Version is bumped in code
- Git tag is created
- Windows executable is built
- GitHub Release is created with the executable attached
- Follow PEP 8 guidelines
- Use meaningful variable and function names
- Add docstrings to functions
- Keep functions focused and reasonably sized
If you have questions, feel free to:
- Open an issue with the "question" template
- Check existing issues and discussions
Thank you for contributing!