Thank you for your interest in contributing to LARUN! This document provides guidelines for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Multi-IDE Coordination
- Pull Request Process
- Code Style
- Testing
Be respectful, inclusive, and constructive. We're all here to advance exoplanet science.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/larun.git - Add upstream remote:
git remote add upstream https://github.com/larun-engineering/larun.git
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements-dev.txt
# Install pre-commit hooks
pre-commit install
pre-commit install --hook-type commit-msg
# Run tests to verify setup
pytest tests/ -vUse descriptive branch names:
feat/skill-name- New skill or featurefix/issue-description- Bug fixdocs/topic- Documentationrefactor/component- Refactoringtest/what-testing- Test additions
We use Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
Examples:
feat(stellar): add luminosity class estimation
fix(gaia): handle missing parallax values
docs(api): add endpoint documentation
test(transit): add edge case tests for transit fitting
LARUN supports multi-IDE development with AI assistants (Claude Code, Antigravity/Gemini, etc.).
- Check
.coordination/FILE_LOCKS.mdfor locked files - Review
.coordination/TASK_LOG.mdfor ongoing work - Check
.coordination/WORK_ORDERS.mdfor assigned tasks
-
Lock files you're editing:
## Active Locks | File | Locked By | Since | Reason | |------|-----------|-------|--------| | src/skills/stellar.py | Claude Code | 2024-01-31 10:00 | Implementing STAR-004 |
-
Log your tasks in
TASK_LOG.md
- Release file locks
- Update
HANDOFF_NOTES.mdwith:- What was completed
- Known issues
- Suggested next steps
- Update
skills/skills.yamlif skills were modified
-
Update your branch
git fetch upstream git rebase upstream/main
-
Run checks locally
# Linting ruff check src/ tests/ black --check src/ tests/ # Type checking mypy src/ # Tests pytest tests/ -v
-
Create PR
- Use the PR template
- Link related issues
- Request review from CODEOWNERS
-
Address review feedback
- Make changes in new commits (don't force-push during review)
- Mark conversations as resolved
-
Merge
- Squash and merge for clean history
- Delete branch after merge
- Line length: 100 characters
- Formatting: Black + isort
- Linting: Ruff
- Type hints: Required for public APIs
- Docstrings for all public functions/classes
- Google-style docstrings preferred:
def calculate_radius(depth: float, stellar_radius: float) -> float: """Calculate planet radius from transit depth. Args: depth: Transit depth (fractional, 0-1) stellar_radius: Stellar radius in solar radii Returns: Planet radius in Earth radii Raises: ValueError: If depth is negative or > 1 """
When creating new skills:
- Follow the skill template pattern in
src/skills/ - Include
SKILL_INFOdict for registration - Add dataclasses for results
- Include CLI convenience functions
- Add tests in
tests/ - Update
skills/skills.yaml - Update
src/skills/__init__.pyexports
# All tests
pytest tests/ -v
# Specific test file
pytest tests/test_stellar.py -v
# With coverage
pytest tests/ --cov=src --cov-report=html
# Skip slow tests
pytest tests/ -m "not slow"- Place tests in
tests/directory - Name test files
test_<module>.py - Use descriptive test names:
test_classify_star_returns_g_type_for_solar_temp - Mock external API calls
- Use fixtures for common setup
Mark tests appropriately:
@pytest.mark.slow
def test_full_pipeline_integration():
...
@pytest.mark.integration
def test_gaia_api_query():
...- Open an issue for bugs or feature requests
- Check existing issues before creating new ones
- Join discussions in the Discussions tab
Thank you for contributing to exoplanet discovery!