Contributing to ProtoRune
Development Setup
- Fork and clone the repository
- Install dependencies with
mix deps.get - Run tests with
mix test
Code Organization
lib/proto_rune/
├── atproto/ # Core AT Protocol
├── bsky/ # Bluesky app features
├── bot/ # Bot framework
├── lexicons/ # Generated code
└── xrpc/ # XRPC implementationCode Style
- Run
mix formatbefore committing - Ensure 100% type coverage with dialyzer
- Keep functions focused and small
- Document public functions with
@docand@moduledoc - Add typespecs to all public functions
Testing
- Add tests for new features
- Tests should be in
test/mirroringlib/structure - Run full test suite with
mix test - Run dialyzer with
mix dialyzer
Pull Requests
- Create a branch from
main - Write descriptive commit messages
- Add tests for new functionality
- Update documentation as needed
- Submit PR with description of changes
PRs should:
- Have a clear purpose
- Include relevant tests
- Pass CI checks
- Follow code style guidelines
- Include documentation updates
Generated Code
The lib/proto_rune/lexicons directory contains generated code from AT Protocol lexicons. To regenerate:
mix gen_schemas --path priv/lexicons/ --output lib/proto_rune/lexicons/
Do not modify generated code directly. Update the generator instead.
Release Process
- Update version in
mix.exs - Update CHANGELOG.md
- Create GitHub release
- Publish to Hex.pm
Questions?
Open an issue or join the github repo discussion forum.