Coding Standards
Code style expectations
- All new classes/functions/methods should include docstrings.
- All new functions/methods should include type hints (optional for tests).
- Remove commented out code before submitting changes.
- Readability and Consistency over micro-optimizations
Pull Requests
PRs are how you merge your code from your branch to main. To do this, it is helpful to include a:
-
Clear description
-
Screenshots (if UI)
-
How to test locally
-
Any known limitations
Committing Code
When committing code, it's helpful to follow the following strategies:
-
Commit early and often
-
Keep commits small
-
Write meaningful messages
It is helpful to use clear, descriptive commit messages. Here are a few good examples of commit messages.
git commit -m "feat: Add sentiment analysis model"
git commit -m "fix: Resolve data preprocessing bug"
git commit -m "docs: Update API documentation"
git commit -m "refactor: Simplify data loading pipeline"
Branch Naming Strategy
For fellowship projects, use a simple branching strategy:
main: Production-ready code
develop: Integration branch for features
feature/feature-name: Individual feature development
hotfix/issue-name: Quick fixes
Document decisions
If you make a non-obvious choice, write it down in the README or relevant docs.