From 0034597f29edfa9aa1c047a9b0df20bbf84723c9 Mon Sep 17 00:00:00 2001 From: mayank-dev-15 <0mayankbasena@gmail.com> Date: Wed, 10 Jun 2026 14:30:38 +0530 Subject: [PATCH 1/2] docs: add MIT License --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 69de780..11f82da 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 SwiftPay Project +Copyright (c) 2026 SwiftPay Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 044acf409813036c72921d58d18e7fe98ecdc2d7 Mon Sep 17 00:00:00 2001 From: mayank-dev-15 <0mayankbasena@gmail.com> Date: Wed, 10 Jun 2026 14:34:44 +0530 Subject: [PATCH 2/2] docs: add CONTRIBUTING.md --- CONTRIBUTING.md | 118 +++++++++--------------------------------------- 1 file changed, 21 insertions(+), 97 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1560483..a2dbe4a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,106 +1,30 @@ -# CONTRIBUTING.md — SwiftPay Contribution Guide +# Contributing to SwiftPay -Welcome to SwiftPay! We're glad you want to contribute. This guide covers everything you need to get started. +Thanks for contributing. ---- +## Getting Started -## Prerequisites +1. Fork the repository +2. Clone your fork: git clone https://github.com/YOUR_USERNAME/SwiftPay.git +3. Create a branch: git checkout -b feature/your-feature +4. Make your changes +5. Run tests: pytest +6. Push and open a pull request -- Python 3.10 or higher -- Git -- A GitHub account +## Code Style ---- +- Follow PEP 8 for Python code +- Use type hints where possible +- Keep functions small and focused +- Add docstrings for public functions -## Setup Instructions +## Pull Request Guidelines -```bash -# 1. Fork this repository on GitHub, then clone your fork -git clone https://github.com/YOUR_USERNAME/SwiftPay.git -cd SwiftPay +- Link your PR to an open issue +- Keep changes focused — one PR per feature/fix +- Update documentation if needed +- Ensure tests pass before submitting -# 2. Verify Python version -python3 --version # must be 3.10+ +## Questions -# 3. No pip install needed — SwiftPay uses stdlib only -# Optionally install pytest for enhanced test output: -pip install pytest pytest-cov - -# 4. Run all tests to verify your setup -python3 tests/run_all_tests.py -``` - -All **41 tests should pass** before you start making changes. - ---- - -## How to Pick an Issue - -1. Browse [open issues](../../issues) -2. Look for issues labelled: - - `good-first-issue` — small, well-scoped tasks perfect for new contributors - - `help-wanted` — larger tasks where input is welcome - - `feature-request` — new capabilities (higher impact, more complex) -3. Comment on the issue: *"I'd like to work on this!"* — wait for confirmation before starting to avoid duplicate work -4. Create a branch: `git checkout -b fix-issue-42` or `git checkout -b feature/redis-otp` - ---- - -## Coding Standards - -- **Language:** Python 3.10+ -- **Style:** Follow PEP 8. Function and variable names in `snake_case`, classes in `PascalCase` -- **Private fields:** Prefix with `_` (e.g. `self._balance`) -- **Type hints:** Use them on all public method signatures -- **Docstrings:** Required on all public classes and methods -- **No external dependencies** for core domain/service/repository code — stdlib only -- External dependencies for API framework (Flask/FastAPI) are acceptable; add to `requirements.txt` - ---- - -## Testing Requirements - -- Every new feature must include tests in the `/tests` directory -- Every bug fix must include a test that reproduces the bug before the fix -- Run `python3 tests/run_all_tests.py` — all tests must pass before submitting a PR -- Aim for coverage of happy path + at least 2 edge cases per function - ---- - -## Submitting a Pull Request - -1. Ensure all tests pass: `python3 tests/run_all_tests.py` -2. Write a clear PR title: `Fix: Rollback not triggered on gateway timeout` or `Feature: Add OTP expiry endpoint` -3. In the PR description: - - Link the issue: `Closes #42` - - Describe what changed and why - - List any edge cases you tested -4. CI will run automatically — the PR cannot be merged if CI fails -5. A maintainer will review within 2 business days - ---- - -## Project Structure - -``` -SwiftPay/ -├── src/ # Domain models (User, Wallet, Transaction...) -├── repositories/ # Repository interfaces + in-memory implementations -├── services/ # Business logic (UserService, TransactionService...) -├── api/ # REST API (app.py) -├── tests/ # All tests -│ ├── services/ -│ └── api/ -├── .github/workflows/ # CI/CD pipeline -└── docs/ # OpenAPI specification -``` - ---- - -## Code of Conduct - -Be respectful. Be constructive. If you disagree with a review comment, explain your reasoning — don't just revert it. - ---- - -*SwiftPay — CONTRIBUTING.md* +Open a discussion or issue for questions.