Thank you for your interest in contributing to the Expense Tracker project! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Environment
- Workflow
- Security Considerations
- Testing
- Submitting Changes
- Style Guidelines
Please be respectful and considerate of others when contributing to this project. We aim to foster an inclusive and welcoming community.
- Fork the repository on GitHub
- Clone your fork locally
- Set up your development environment
- Create a feature branch
- Make your changes
- Test your changes
- Submit a pull request
-
Create a virtual environment:
python -m venv env source env/bin/activate # On Windows: env\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Copy the environment variables template:
cp .env.example .env
-
Reset the application data to start fresh:
python reset_data.py
-
Run the application:
streamlit run app.py
-
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
-
Make your changes, following the style guidelines
-
Run the pre-commit checks:
python pre_commit_check.py
-
Run tests:
pytest
-
Commit your changes with a descriptive message:
git commit -m "Feature: Add description of your changes" -
Push your branch to your fork:
git push origin feature/your-feature-name
-
Create a pull request on GitHub
- NEVER commit real user data, passwords, API keys, or other sensitive information
- Use the provided
.env.examplefile as a template and.envfor actual values (which is git-ignored) - Always run
python pre_commit_check.pybefore committing to catch any unintended sensitive data
- Use the provided sample data in the
sample_datadirectory for testing - For more complex test scenarios, create your own test data but ensure it doesn't contain sensitive information
If you discover a security vulnerability, please do NOT open an issue. Email us directly at security@example.com.
- Write tests for all new features
- Tests should be placed in the
testsdirectory - Run tests with
pytest - Ensure that all tests pass before submitting a pull request
- Ensure all tests pass
- Ensure the pre-commit check passes
- Update documentation if needed
- Create a pull request with a clear description of the changes
- Follow PEP 8 for Python code
- Use meaningful variable and function names
- Write docstrings for all functions, classes, and modules
- Keep functions small and focused on a single task
- Use type hints where appropriate