Thank you for your interest in contributing to hier-config-gpt! We welcome contributions from the community.
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/hier-config-gpt.git cd hier-config-gpt -
Install dependencies using Poetry:
# Install Poetry if you haven't already curl -sSL https://install.python-poetry.org | python3 - # Install project dependencies poetry install --with dev,chatgpt,anthropic,ollama
-
Create a branch for your changes:
git checkout -b feature/your-feature-name
We use several tools to maintain code quality:
- Ruff: For linting and formatting
- mypy: For type checking
- pylint: For additional linting
Run checks before committing:
# Format code
poetry run ruff format .
# Run linter
poetry run ruff check .
# Type checking
poetry run mypy hier_config_gpt
# Pylint
poetry run pylint hier_config_gptWe use pytest for testing. Please ensure all tests pass before submitting a PR:
# Run all tests
poetry run pytest
# Run with coverage
poetry run pytest --cov=hier_config_gpt --cov-report=html
# Run specific test file
poetry run pytest tests/test_workflows.py- Write tests for all new features and bug fixes
- Aim for high test coverage (>80%)
- Use descriptive test names that explain what is being tested
- Mock external dependencies (API calls, file system, etc.)
Example test structure:
def test_feature_name_expected_behavior():
"""Test that feature X behaves correctly when Y."""
# Arrange
setup_data = ...
# Act
result = function_under_test(setup_data)
# Assert
assert result == expected_value- Add docstrings to all public functions, classes, and methods
- Follow Google-style docstring format
- Update README.md if adding new features
- Add examples for new functionality
Example docstring:
def my_function(param1: str, param2: int) -> bool:
"""Short description of what the function does.
Longer description if needed, explaining the behavior
and any important details.
Args:
param1: Description of param1.
param2: Description of param2.
Returns:
Description of the return value.
Raises:
ValueError: When param2 is negative.
"""
pass- Update documentation: Ensure all documentation is up to date
- Add tests: Include tests for new features or bug fixes
- Update CHANGELOG.md: Add an entry describing your changes
- Run all checks: Ensure linting, type checking, and tests pass
- Create a pull request:
- Use a clear, descriptive title
- Reference any related issues
- Describe what changed and why
- Include screenshots for UI changes (if applicable)
Use conventional commit format for PR titles:
feat: Add new feature Xfix: Resolve bug in Ydocs: Update documentation for Ztest: Add tests for Wrefactor: Improve code structure in Vchore: Update dependencies
- Be respectful and constructive in code reviews
- Address all review comments
- Request re-review after making changes
When reporting issues, please include:
- Description: Clear description of the issue
- Steps to reproduce: Detailed steps to reproduce the problem
- Expected behavior: What you expected to happen
- Actual behavior: What actually happened
- Environment:
- Python version
- hier-config-gpt version
- OS and version
- Relevant dependencies
- Code samples: Minimal code to reproduce the issue
- Error messages: Full error messages and stack traces
We welcome feature requests! Please:
- Check if the feature already exists or is planned
- Clearly describe the feature and its use case
- Explain why it would be valuable
- Provide examples if possible
###Our Pledge
We pledge to make participation in our project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
Positive behavior includes:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Unacceptable behavior includes:
- Trolling, insulting/derogatory comments, and personal attacks
- Public or private harassment
- Publishing others' private information without permission
- Other conduct which could reasonably be considered inappropriate
If you have questions about contributing, please:
- Open a GitHub Discussion
- Check existing issues and discussions
- Reach out to the maintainers
By contributing to hier-config-gpt, you agree that your contributions will be licensed under the Apache License 2.0.
Thank you for contributing! 🎉