Thank you for your interest in contributing to AWS Integration! This guide will help you get started.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Code Style
- Commit Conventions
- Pull Request Process
- Reporting Issues
This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
- Fork the repository on GitHub
- Clone your fork locally
- Create a branch for your changes
- Make your changes with tests
- Submit a pull request
- Python 3.10+
- Node.js 18+
- MariaDB 10.6+
- Redis 6+
- A working Frappe Bench setup
# Clone your fork into the bench apps directory
cd $BENCH_PATH
bench get-app https://github.com/<your-username>/aws_integration.git --branch main
# Install the app on your development site
bench --site <your-site> install-app aws_integration
# Run migrations
bench --site <your-site> migrate
# Build frontend assets
bench build --app aws_integration
# Install pre-commit hooks
cd apps/aws_integration
pip install pre-commit
pre-commit installbench start# Run all tests for the app
bench --site <your-site> run-tests --app aws_integration
# Run tests for a specific DocType
bench --site <your-site> run-tests --doctype "AWS Settings"
# Run a specific test file
bench --site <your-site> run-tests --module aws_integration.aws_integration.doctype.aws_settings.test_aws_settingsUse descriptive branch names:
feat/s3-multipart-upload— New featuresfix/presigned-url-expiry— Bug fixesdocs/setup-guide— Documentationrefactor/client-error-handling— Code refactoring
- Check the open issues for things to work on
- Issues labeled
good first issueare great starting points - If you want to work on something not listed, open an issue first to discuss
- Keep changes focused — one feature or fix per PR
- Write tests for new functionality
- Update documentation if you change behavior
- Test with both public and private files when modifying S3 logic
- Test with
delete_local_after_uploadboth enabled and disabled
This project uses automated formatting and linting via pre-commit. The hooks run automatically on every commit.
- Formatter: Ruff (format)
- Linter: Ruff (lint)
- Line length: 110 characters
- Target: Python 3.10+
- Style: Tabs for indentation (Frappe convention)
- Follow existing patterns in the codebase
- Use
frappe.db.set_value()withupdate_modified=Falsefor internal state updates - Use
frappe.log_error()for error logging, notprint() - Use parameterized queries — never use f-strings in SQL
- Use
frappe.cache.set_value()/get_value()for Redis — not raw Redis methods - Always commit before deleting local files (crash safety pattern)
- Use row-level locks (
SELECT ... FOR UPDATE) when updating shared File records
cd apps/aws_integration
# Run all pre-commit hooks
pre-commit run --all-files
# Run only ruff
ruff check .
ruff format .
# Run only eslint
npx eslint aws_integration/public/js/We follow Conventional Commits:
<type>: <description>
[optional body]
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
refactor |
Code change that neither fixes a bug nor adds a feature |
perf |
Performance improvement |
test |
Adding or updating tests |
chore |
Build process, dependencies, or tooling |
feat: add multipart upload for files larger than 5 MB
fix: prevent double URL-encoding in S3 attachment links
docs: add architecture diagram to README
refactor: extract S3 key generation into dedicated method
- Rebase your branch on the latest
main - Run linters:
pre-commit run --all-files - Run tests:
bench --site <site> run-tests --app aws_integration - Test manually in a browser — verify the feature works end-to-end
- Update documentation if you changed behavior
- Fill out the PR template completely
- Link related issues using
Fixes #123orCloses #123 - Keep the diff small and focused — large PRs are hard to review
- Add screenshots for UI changes
- Respond to review feedback promptly
- A maintainer will review your PR
- They may request changes — this is normal and expected
- Once approved, a maintainer will merge your PR
- Your contribution will be included in the next release
When reporting a bug, include:
- Frappe version and Python version
- Steps to reproduce the issue
- Expected behavior vs. actual behavior
- Error logs (from browser console or
bench --site <site> console) - Screenshots if applicable
When requesting a feature:
- Describe the problem you're trying to solve
- Explain your proposed solution
- Consider if there are alternative approaches
- Note if you're willing to implement it yourself
Thank you for contributing!