File size: 4,569 Bytes
7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 7b52500 2b1ff82 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# Contributing to FinEE
Thank you for your interest in contributing! Here's how to get started.
## π¨ Golden Rules
1. **NEVER push directly to `main`** - All changes go through PRs
2. **All features branch from `develop`** - Not from main
3. **Tests MUST pass before merging** - No exceptions
4. **Update CHANGELOG.md** - Every PR should update it
## πΏ Branching Strategy (Git Flow)
```
main ββββββββββββββββββββββββββββββββββββ (releases only)
β β β
v1.0.3 v1.0.4 v1.1.0
β β β
develop ββββββββββββββββββββββββββββββββββββ (integration)
β β β β
feature/a βββββββββββββ β β
feature/b βββββββββββββββββββββββββββββ
```
### Branch Types
| Branch | Source | Merges To | Naming |
|--------|--------|-----------|--------|
| `main` | - | - | Protected, releases only |
| `develop` | `main` | `main` | Integration branch |
| `feature/*` | `develop` | `develop` | `feature/add-kotak-support` |
| `fix/*` | `develop` | `develop` | `fix/unicode-amount-parsing` |
| `hotfix/*` | `main` | `main` + `develop` | `hotfix/critical-regex-bug` |
## π Development Workflow
### 1. Start a New Feature
```bash
# Always start from develop
git checkout develop
git pull origin develop
# Create feature branch
git checkout -b feature/my-awesome-feature
# Make changes...
# Write tests...
# Update CHANGELOG.md under [Unreleased]
# Commit with conventional messages
git commit -m "feat: add support for Paytm VPA patterns"
# Push and create PR
git push -u origin feature/my-awesome-feature
# Create PR: feature/my-awesome-feature β develop
```
### 2. Fix a Bug
```bash
git checkout develop
git pull origin develop
git checkout -b fix/issue-123-unicode-error
# Fix the bug...
# Add test to prevent regression...
git commit -m "fix: handle βΉ symbol in amount parsing"
git push -u origin fix/issue-123-unicode-error
# Create PR: fix/issue-123-unicode-error β develop
```
### 3. Create a Release
**Use the release script:**
```bash
# Preview what will happen
python scripts/release.py 1.0.4 --dry-run
# Execute release
python scripts/release.py 1.0.4
```
The script will:
1. β
Verify you're on `develop`
2. β
Run all tests
3. β
Run benchmark suite
4. β
Update version in `pyproject.toml`
5. β
Update `CHANGELOG.md`
6. β
Merge to `main`
7. β
Create git tag `v1.0.4`
8. β
Build and upload to PyPI
9. β
Return to `develop`
## π§ͺ Pre-Merge Checklist
Before your PR can be merged:
- [ ] All tests pass: `pytest tests/ -v`
- [ ] Benchmark runs: `python benchmark.py --all`
- [ ] CHANGELOG.md updated under `[Unreleased]`
- [ ] Code formatted: `black src/ tests/`
- [ ] Linting passes: `ruff check src/ tests/`
- [ ] New features have tests
- [ ] Documentation updated if needed
## π Commit Message Format
Use [Conventional Commits](https://www.conventionalcommits.org/):
```
<type>(<scope>): <description>
[optional body]
[optional footer]
```
### Types
| Type | Description |
|------|-------------|
| `feat` | New feature |
| `fix` | Bug fix |
| `docs` | Documentation only |
| `test` | Adding tests |
| `refactor` | Code refactoring |
| `perf` | Performance improvement |
| `chore` | Maintenance tasks |
### Examples
```
feat(regex): add Lakhs notation support
fix(parser): handle missing spaces in SMS
docs: update README with torture tests
test: add edge cases for Unicode symbols
chore: move notebooks to experiments/
```
## π Changelog Guidelines
Update `CHANGELOG.md` in every PR under `[Unreleased]`:
```markdown
## [Unreleased]
### Added
- New feature you added
### Changed
- Behavior you modified
### Fixed
- Bug you fixed
```
**Categories:**
- **Added** - New features
- **Changed** - Changes to existing features
- **Deprecated** - Features to be removed
- **Removed** - Removed features
- **Fixed** - Bug fixes
- **Security** - Security fixes
## π‘οΈ Protected Branches
| Branch | Direct Push | Force Push | PR Required |
|--------|-------------|------------|-------------|
| `main` | β | β | β
(from develop only) |
| `develop` | β | β | β
(from feature/fix) |
## π Thank You!
Every contribution makes FinEE better for the Indian fintech community!
|