Thank you for considering contributing to HIA! This document provides guidelines and instructions to help you get started.
- Code of Conduct
- Getting Started
- Development Environment Setup
- Development Workflow
- Coding Standards
- Testing Guidelines
- Documentation
- Security
Please read and follow our Code of Conduct. We aim to foster an inclusive and respectful community.
- Python 3.8+
- Streamlit 1.30.0+
- Supabase account
- Groq API key
- PDFPlumber
- Python-magic-bin (Windows) or Python-magic (Linux/Mac)
-
Fork and clone the repository:
git clone https://github.com/harshhh28/hia.git cd hia -
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables: Create
.streamlit/secrets.toml:SUPABASE_URL = "your-supabase-url" SUPABASE_KEY = "your-supabase-key" GROQ_API_KEY = "your-groq-api-key"
-
Set up database: Execute the SQL script in public/db/script.sql
-
Run the application:
streamlit run src/main.py
main: Production-ready codefeature/*: New featuresfix/*: Bug fixesdocs/*: Documentation updates
-
Create a branch:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes
-
Write commit messages:
feat: Add new blood analysis component - Implement report analysis visualization - Add validation for blood test values - Update documentation -
Push changes:
git push origin feature/your-feature-name
-
Create a Pull Request
- Fill out the PR template completely
- Reference any related issues
- Include screenshots for UI changes
- Update documentation if needed
- Add tests for new functionality
- Follow PEP 8
- Use type hints for function parameters
- Maximum line length: 88 characters
- Use docstrings for classes and functions
# Imports
from typing import Optional
import streamlit as st
# Constants
MAX_UPLOAD_SIZE = 20
# Classes/Functions
class AnalysisAgent:
"""Agent for analyzing medical reports."""
def __init__(self) -> None:
"""Initialize the analysis agent."""
self.model = None-
Test Coverage
- Unit tests for utilities and services
- Integration tests for major features
- UI component tests
-
Running Tests
python -m pytest tests/
- Update README.md for new features
- Add docstrings to new functions/classes
- Include example usage where appropriate
- Document environment variables
- Keep API documentation current
- Never commit sensitive data
- Follow secure coding practices
- Validate all user inputs
- Report security issues privately
- Follow the Security Policy
We appreciate your contributions to making HIA better! If you have questions, feel free to open an issue or contact the maintainers.