Thank you for considering contributing to Auto Link Obsidian! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Workflow
- Pull Request Process
- Coding Standards
- Testing
- Documentation
- Issue Reporting
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to jonc@lacunae.org.
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/your-username/auto_link_obsidian.git cd auto_link_obsidian
- Install dependencies:
pip install -r requirements.txt
- Create a branch for your changes:
git checkout -b feature/your-feature-name
- Check the roadmap: Look at the ROADMAP.md file to see what features or improvements are planned.
- Create or choose an issue: Either create a new issue for your feature/fix or choose an existing one to work on.
- Write your code: Implement your changes following the coding standards below.
- Test your changes: Make sure your changes work as expected.
- Commit your changes: Use clear and descriptive commit messages.
- Push to your fork: Push your branch to your GitHub fork.
- Create a pull request: Submit a PR to the main repository.
- Ensure your code follows the project's coding standards.
- Update documentation if necessary.
- Include a clear description of the changes in your PR.
- Link any related issues in your PR description using keywords like "Fixes #123" or "Relates to #456".
- PRs need at least one approval from a maintainer before they can be merged.
- Python Style: Follow PEP 8 style guidelines.
- Docstrings: Use Google-style docstrings for functions and classes.
- Type Hints: Include Python type hints where appropriate.
- Error Handling: Use proper exception handling with specific exception types.
- Comments: Write clear comments for complex code sections.
Example of a good function definition:
def extract_tags(content: str) -> list[str]:
"""
Extract tags from content.
Args:
content: String content to extract tags from
Returns:
List of extracted tags
Raises:
ValueError: If content is empty
"""
if not content:
raise ValueError("Content cannot be empty")
# Function implementation...
return extracted_tags
We use pytest for testing. Before submitting a PR, ensure all tests pass:
pytest
For new features, please add appropriate tests to cover your code.
- Update README.md if your changes add or modify features.
- Add or update docstrings for new or modified functions, classes, and methods.
- Consider adding examples for new features.
When reporting issues, please include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Environment information (OS, Python version, etc.)
- Screenshots or logs if applicable
Feature requests are welcome! Please provide:
- A clear description of the feature
- The motivation for the feature (why it would be useful)
- Possible implementation approach (if you have ideas)
Thank you for contributing to Auto Link Obsidian!