Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GingerlyData247/SOTeam4-P2/llms.txt
Use this file to discover all available pages before exploring further.
Overview
We welcome contributions to the Trustworthy Model Registry! This guide will help you get started with development setup, code conventions, and the contribution process.How to Contribute
Contributions can take many forms:- Bug fixes - Fix issues in existing functionality
- New features - Add new metrics, API endpoints, or capabilities
- Documentation - Improve or expand documentation
- Tests - Add test coverage for untested code
- Performance improvements - Optimize existing code
- Code quality - Refactor code for better maintainability
Development Setup
Prerequisites
- Python 3.11 or 3.12 - The project uses Python 3.11 for CI and 3.12 for Lambda deployment
- Git - For version control
- AWS account (optional) - For testing cloud deployments (free tier compatible)
Local Installation
- Clone the repository:
- Create a virtual environment:
- Install dependencies:
- Install development dependencies:
requirements-dev.txt:
requirements.txt for CI/CD compatibility, so the main installation command covers everything.
Configuration
Set up environment variables for local development:Running Locally
Start the FastAPI development server:- API: http://localhost:8000
- Swagger UI: http://localhost:8000/docs
- Health check: http://localhost:8000/health
Using the CLI
The project includes a CLI tool (run or run.py):
Code Style and Conventions
Python Style
The project follows standard Python conventions with some flexibility:- Line length: Maximum 120 characters (enforced by flake8 in CI)
- Imports: Group standard library, third-party, and local imports
- Type hints: Use type hints for function signatures when possible
- Docstrings: Document all modules, classes, and non-trivial functions
Code Organization
The project follows a modular architecture:File Headers
Include descriptive headers at the top of files:Function Documentation
Document functions with clear docstrings:Test Documentation
Tests should have descriptive names and docstrings:Testing Requirements
Writing Tests
All new code should include tests. See the Testing documentation for detailed guidance. Requirements:- Unit tests for all new functions and classes
- Integration tests for new API endpoints
- Mock external dependencies (GitHub API, Hugging Face API, AWS services)
- Deterministic tests - No network calls or random behavior
- Fast tests - Tests should run quickly (< 1 second per test)
Running Tests
Before submitting a pull request:Test Coverage
Aim for high test coverage on new code:Pull Request Process
1. Create a Feature Branch
Create a new branch for your work:feature/- New featuresfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Test additions or improvements
2. Make Your Changes
- Write clean, documented code
- Follow the code style guidelines
- Add tests for new functionality
- Update documentation if needed
3. Test Your Changes
4. Commit Your Changes
Write clear, descriptive commit messages:- Use present tense (“Add feature” not “Added feature”)
- Be specific about what changed and why
- Reference issue numbers if applicable (“Fix #123: …“)
5. Push and Create Pull Request
- Navigate to the repository on GitHub
- Click New Pull Request
- Select your branch
- Fill in the PR template
6. PR Template
Provide a clear description of your changes:7. Code Review
Your PR will be reviewed by maintainers:- Respond to feedback - Address review comments promptly
- Make requested changes - Update your branch based on feedback
- Keep discussions focused - Stay on topic in review comments
8. CI Checks
The following checks must pass before merging:- Tests - All pytest tests must pass
- Linting - Code must pass flake8 checks (optional but recommended)
- No conflicts - Branch must be up-to-date with main
9. Merge
Once approved and all checks pass:- Maintainer will merge your PR
- Automated deployment will trigger (if applicable)
- Your changes will be live in the next release
Development Workflow
Typical Development Cycle
-
Sync with main:
-
Create feature branch:
-
Develop and test:
-
Commit frequently:
-
Push and create PR:
Keeping Your Branch Updated
If main branch is updated while you’re working:Common Development Tasks
Adding a New Metric
-
Create metric implementation in
src/metrics/: -
Add unit tests in
tests/unit/: - Register metric in the scoring service
- Update API documentation
Adding a New API Endpoint
-
Define schema in
src/schemas/: -
Create route handler in
src/api/: -
Add integration tests in
tests/integration/ - Update OpenAPI documentation
Updating Dependencies
To add a new dependency:-
Add to
requirements.txt: -
Install locally:
- Test thoroughly
- Document why the dependency is needed in your PR
Getting Help
Resources
- Documentation: Browse the full documentation site
- Issues: Check existing GitHub issues
- Discussions: Use GitHub Discussions for questions
Asking Questions
When asking for help:- Check documentation first - Your question may already be answered
- Search existing issues - Someone may have had the same problem
- Provide context - Include error messages, code snippets, and what you’ve tried
- Be specific - “How do I add a metric?” is better than “How does this work?”
Code of Conduct
Be Respectful
- Treat all contributors with respect
- Provide constructive feedback
- Focus on the code, not the person
- Welcome newcomers and help them learn
Be Professional
- Keep discussions on-topic
- Avoid inflammatory language
- Respect different viewpoints and experiences
- Accept constructive criticism gracefully
License
By contributing to this project, you agree that your contributions will be licensed under the same license as the project. This project is provided for academic and demonstration purposes as part of ECE 461/30861 Software Engineering.Recognition
Contributors are recognized in:- Git commit history
- Pull request discussions
- Release notes (for significant contributions)