Contributing to code2prompt
July 6, 2024 ยท View on GitHub
Thank you for your interest in contributing to code2prompt! We welcome contributions from the community to help improve and grow this project. This document outlines the process for contributing and provides guidelines to ensure a smooth collaboration.
Table of Contents
- Getting Started
- Development Setup
- Making Changes
- Submitting Changes
- Coding Standards
- Running Tests
- Reporting Issues
- Community Guidelines
Getting Started
Before you begin:
- Ensure you have a GitHub account.
- Familiarize yourself with the code2prompt documentation.
- Check the issues page for existing issues or feature requests.
Development Setup
To set up your development environment:
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/your-username/code2prompt.git cd code2prompt - Ensure you have Python 3.7+ and Poetry installed.
- Install dependencies using Poetry:
poetry install - Activate the virtual environment:
poetry shell
Making Changes
- Create a new branch for your changes:
git checkout -b feature/your-feature-name - Make your changes and commit them with a clear, descriptive commit message.
- Add or update tests as necessary.
- Update documentation if you're changing functionality.
Submitting Changes
- Push your changes to your fork:
git push origin feature/your-feature-name - Submit a pull request to the main repository.
- Ensure your PR description clearly describes the problem and solution.
- Link any relevant issues in the PR description.
Coding Standards
Please adhere to the following coding standards:
- Follow PEP 8 style guide for Python code.
- Use meaningful variable and function names.
- Write clear, concise comments and docstrings.
- Ensure your code is compatible with Python 3.7+.
- Use type hints where appropriate.
Running Tests
Before submitting your changes, make sure all tests pass:
poetry run pytest
If you've added new functionality, please include appropriate tests.
Reporting Issues
When reporting issues:
- Use the issue tracker.
- Provide a clear, concise description of the issue.
- Include steps to reproduce the problem.
- Specify your operating system, Python version, and code2prompt version.
- If possible, provide a minimal code example that demonstrates the issue.
Community Guidelines
To ensure a positive and inclusive community:
- Be respectful and considerate in your interactions.
- Provide constructive feedback.
- Avoid offensive or discriminatory language.
- Help others when you can.
- Follow the Code of Conduct.
Thank you for contributing to code2prompt! Your efforts help make this project better for everyone.