Thank you for your interest in contributing! This document provides guidelines and instructions for contributing.
-
Fork and clone the repository
git clone https://github.com/yourusername/tender-reformatter.git cd tender-reformatter -
Install dependencies
poetry install poetry install --extras local # For local LLM support
-
Install pre-commit hooks
pre-commit install
-
Run tests to verify setup
pytest tests/ -v
git checkout -b feature/your-feature-name- Write clear, documented code
- Add type hints for all functions
- Update tests for any new functionality
- Update documentation as needed
# Format code
black src/ tests/
isort src/ tests/
# Lint
ruff check src/ tests/
# Type check
mypy src/
# Run tests
pytest tests/ -v --cov=tender_reformattergit add .
git commit -m "feat: add new feature"We follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation changestest:Test additions/changesrefactor:Code refactoringperf:Performance improvements
git push origin feature/your-feature-nameThen open a Pull Request on GitHub.
- Place unit tests in
tests/unit/ - Place integration tests in
tests/integration/ - Use descriptive test names:
test_<what>_<condition>_<expected> - Aim for >90% code coverage
def test_detector_handles_empty_line():
"""Test that empty lines are correctly classified."""
detector = RegexDetector()
result = detector.detect("\n\n")
assert result.tokens[0].type == StructureType.EMPTY_LINE- Update README.md for user-facing changes
- Add docstrings for all public functions/classes
- Use Google-style docstrings
- Include type hints
def detect(self, text: str) -> DetectionResult:
"""
Detect document structure in the given text.
Args:
text: Raw text to analyze
Returns:
DetectionResult containing classified tokens
Raises:
ValueError: If text is empty or invalid
Example:
>>> detector = RegexDetector()
>>> result = detector.detect("# Title")
>>> print(result.tokens[0].type)
StructureType.HEADING_1
"""- Additional patterns: Improve regex detection for edge cases
- Test coverage: Add more unit and integration tests
- Documentation: Add examples, tutorials, notebooks
- Performance: Optimize detection algorithms
- Features: Support for other document types
- Integrations: Connect with popular RAG frameworks
- Datasets: Curate and annotate French tender documents
- Benchmarks: Comparative studies with other approaches
- Models: Fine-tuned models for document structure
When reporting bugs, please include:
- Description: Clear description of the bug
- Reproduction: Minimal code to reproduce
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Environment: Python version, OS, package versions
For feature requests, please:
- Check if it's already requested in Issues
- Describe the use case
- Explain why it's important
- Provide examples if possible
We use:
- Black for code formatting (line length: 100)
- isort for import sorting
- Ruff for linting
- mypy for type checking (strict mode)
All checks must pass before merging.
Contributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Credited in academic citations
Feel free to:
- Open a Discussion on GitHub
- Ask in Pull Request comments
- Email the maintainers
Thank you for contributing! 🎉