Contribute
How to contribute to OctoMY™
Contribute
Help improve OctoMY™ by contributing code, documentation, or ideas.
Pro Tip
Before starting a large feature, open a GitHub issue to discuss the approach. This ensures your work aligns with project direction and avoids duplicate effort with other contributors.
Ways to contribute
| Type | Description |
|---|---|
| Code | Bug fixes, features, optimizations |
| Documentation | Guides, API docs, translations |
| Testing | Bug reports, test cases |
| Design | UI/UX improvements, icons |
| Ideas | Feature requests, discussions |
Getting started
1. Fork the repository
- Go to github.com/mrdeveloperdude/OctoMY
- Click Fork
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/OctoMY.git
cd OctoMY
git remote add upstream https://github.com/mrdeveloperdude/OctoMY.git
2. Create a branch
# Update your fork
git fetch upstream
git checkout master
git merge upstream/master
# Create feature branch
git checkout -b feature/my-new-feature
3. Make changes
- Write code following the style guide
- Add tests for new features
- Update documentation if needed
4. Commit changes
# Stage changes
git add .
# Commit with descriptive message
git commit -m "Add feature: description of what this does"
5. Submit pull request
# Push to your fork
git push origin feature/my-new-feature
Then:
- Go to your fork on GitHub
- Click Compare & pull request
- Fill in the PR template
- Submit
Code style guide
C++ style
OctoMY™ follows Qt coding conventions:
// Class names: PascalCase
class MyNewClass : public QObject {
Q_OBJECT
public:
// Method names: camelCase
void doSomething();
int getValue() const;
private:
// Member variables: mPrefixCamelCase
QString mName;
int mValue{0};
};
Indentation
- Use tabs for indentation
- Align with spaces where needed
- Opening brace on same line
if (condition) {
doSomething();
} else {
doSomethingElse();
}
Comments
/**
* \brief Brief description of the function.
*
* Detailed description if needed.
*
* \param name Description of parameter
* \return Description of return value
*/
QString processData(const QString &name);
Header guards
Use #pragma once:
#pragma once
#include <QObject>
class MyClass {
// ...
};
Commit messages
Format
<type>: <short description>
<detailed description if needed>
<footer with issue references>
Types
| Type | Use For |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation |
style |
Code style changes |
refactor |
Refactoring |
test |
Adding tests |
chore |
Build/tooling changes |
Examples
feat: Add Bluetooth pairing support
Implements BLE scanning and pairing for mobile devices.
Uses Qt Bluetooth module for cross-platform support.
Closes #123
fix: Resolve servo jitter on high-frequency updates
Reduce update rate from 100Hz to 50Hz when multiple
servos are active to prevent power supply issues.
Fixes #456
Pull request guidelines
Before submitting
- [ ] Code compiles without warnings
- [ ] All tests pass
- [ ] New features have tests
- [ ] Documentation is updated
- [ ] Code follows style guide
- [ ] Commits are clean and logical
PR description template
## Summary
Brief description of changes.
## Changes
- Added X feature
- Fixed Y bug
- Updated Z documentation
## Testing
How to test these changes.
## Screenshots
If applicable, include screenshots.
## Related Issues
Closes #123
Review process
- Automated checks run on PR
- Maintainer review within a few days
- Feedback may request changes
- Approval and merge when ready
Development setup
Build tools
# Install development dependencies
sudo apt install qt6-base-dev qt6-tools-dev qbs
sudo apt install clang-format cppcheck
# Clone with dev tools
git clone --recursive https://github.com/YOUR_USERNAME/OctoMY.git
Code formatting
# Format code before committing
clang-format -i src/**/*.cpp src/**/*.hpp
# Or use Qt Creator's built-in formatter
Static analysis
# Run cppcheck
cppcheck --enable=all src/
# Run clang-tidy
clang-tidy src/**/*.cpp
Testing requirements
New features
Every new feature needs:
- Unit tests for core logic
- Integration tests for UI components
- Documentation in appropriate section
Bug fixes
Bug fixes should include:
- Test case reproducing the bug
- Fix that passes the test
- No regression in other tests
Test location
test/
├── testClassName/
│ ├── TestClassName.cpp
│ └── TestClassName.hpp
└── tests.qbs
Documentation contributions
Types of docs
| Location | Content |
|---|---|
content/doc/tutorials/ |
Getting started guides |
content/doc/howto/ |
Task-oriented guides |
content/doc/reference/ |
Technical reference |
content/doc/explanation/ |
Concepts and architecture |
Documentation style
- Use clear, simple language
- Include code examples
- Add diagrams where helpful
- Link to related pages
Adding a new page
- Create
.mdfile with frontmatter - Add to navigation index
- Include cross-references
Issue reporting
Bug reports
Include:
- Version of OctoMY™
- Platform (Linux, Android, etc.)
- Steps to reproduce
- Expected behavior
- Actual behavior
- Logs if available
Feature requests
Include:
- Use case - Why is this needed?
- Proposed solution - How might it work?
- Alternatives - Other approaches considered?
Community
Communication
- GitHub Issues - Bug reports and features
- GitHub Discussions - General questions
- Pull Requests - Code contributions
Code of conduct
- Be respectful and constructive
- Help newcomers
- Focus on technical merit
- Assume good intentions
Recognition
Contributors are recognized in:
- CONTRIBUTORS.md file
- Release notes
- Documentation credits
Legal
License
OctoMY™ is licensed under GPLv3. By contributing, you agree that your contributions will be licensed under the same terms.
Copyright
- Keep copyright notices intact
- Add your name to modified files
- Don't remove other contributors' names