Thank you for your interest in contributing to Lithium-Next! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Workflow
- Coding Standards
- Commit Guidelines
- Pull Request Process
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- GCC 13+ or Clang 18+
- CMake 3.20+
- Git
- Python 3.8+ (for pre-commit hooks)
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/lithium-next.git cd lithium-next git submodule update --init --recursive - Add the upstream repository:
git remote add upstream https://github.com/ElementAstro/lithium-next.git
- Install dependencies:
sudo apt-get install -y gcc g++ cmake libcfitsio-dev zlib1g-dev libssl-dev libzip-dev libnova-dev libfmt-dev gettext
- Set up pre-commit hooks:
pip install pre-commit pre-commit install
- Use the Bug Report template
- Check existing issues to avoid duplicates
- Include detailed steps to reproduce
- Provide system information and logs
- Use the Feature Request template
- Explain the use case and benefits
- Consider backward compatibility
- Find an issue to work on or create one
- Comment on the issue to let others know you're working on it
- Create a feature branch
- Write code and tests
- Submit a pull request
mkdir build && cd build
cmake ..
make -j$(nproc)cd build
ctest --output-on-failureWe use clang-format for C++ code formatting. Run before committing:
# Format all files
find src tests -name "*.cpp" -o -name "*.hpp" | xargs clang-format -i- Follow the existing code style in the project
- Use modern C++20 features where appropriate
- Prefer
std::containers and algorithms - Use RAII for resource management
- Document public APIs with Doxygen comments
- Headers in
src/alongside implementation files - Tests mirror the source structure in
tests/ - Each component should have corresponding tests
- Classes/Structs:
PascalCase - Functions/Methods:
camelCase - Variables:
snake_case - Constants:
UPPER_SNAKE_CASE - Namespaces:
lowercase
We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testsbuild: Build system changesci: CI/CD changeschore: Other changes
feat(camera): add support for ASCOM camera binning
fix(sequencer): resolve race condition in task scheduling
docs(readme): update build instructions for Windows
-
Create a branch from
master:git checkout -b feat/your-feature-name
-
Make your changes following the coding standards
-
Write/update tests for your changes
-
Run the test suite to ensure nothing is broken
-
Commit your changes following commit guidelines
-
Push to your fork:
git push origin feat/your-feature-name
-
Open a Pull Request using the PR template
-
Address review feedback promptly
- All tests pass
- Code follows project style guidelines
- Documentation is updated if needed
- Commit messages follow conventions
- PR description clearly explains the changes
If you have questions, feel free to:
- Open a Discussion
- Check existing issues and documentation
Thank you for contributing to Lithium-Next! 🌟