Contributing to Lexoid#
Thank you for your interest in contributing to Lexoid! We welcome contributions from the community to make our document parsing library even better.
Getting Started#
Fork the repository and clone your fork:
git clone https://github.com/YOUR_USERNAME/lexoid.git cd lexoid
Set up your development environment:
make dev
Activate the virtual environment:
source .venv/bin/activate
Development Setup#
Environment Variables#
Create a .env
file in the root directory with the following API keys (as needed):
GOOGLE_API_KEY=your_google_api_key
OPENAI_API_KEY=your_openai_api_key
HUGGINGFACEHUB_API_TOKEN=your_huggingface_token
TOGETHER_API_KEY=your_together_api_key
Running Tests#
Run the test suite:
python3 -m pytest tests/test_parser.py -v
To see test logs:
python3 -m pytest tests/test_parser.py -v -s
Contributing Guidelines#
Code Style#
We use Python’s PEP 8 style guide
If using VS Code, install the Black Formatter extension
Use type hints for function parameters and return values
Pull Request Process#
Create a new branch for your feature or bugfix:
git checkout -b feature-name
Make your changes and commit them with clear, descriptive commit messages
Add tests for any new functionality
Update documentation as needed
Push your changes and create a pull request
Areas for Contribution#
When starting out, check out the Issues page and look for tickets tagged with
good first issue
However, don’t let the above restrict you. Feel free to have a go at any ticket or suggest any new features!
Testing Your Changes#
Add test cases to
tests/test_parser.py
along with changes if appropriateTest with different file formats and parsing strategies
Documentation#
When adding new features, please:
Update the main
README.md
if neededAdd docstrings to new functions and classes
Include example usage in the documentation
Update type hints and function signatures in the docs
Reporting Issues#
When reporting bugs, please include:
A clear description of the problem
Steps to reproduce
Expected vs actual behavior
Sample files (if possible)
Environment information (Python version, OS, etc.)
Thank you for helping improve Lexoid!