Contributing to EsTranslator¶
Thank you for your interest in contributing to the EsTranslator project! We welcome contributions from the community to help improve and grow the library. This document provides guidelines and information on how you can contribute effectively.
Ways to Contribute¶
There are several ways you can contribute to the EsTranslator project:
-
Report Issues: If you encounter any bugs, issues, or have feature requests, please submit an issue on our GitHub repository. Include as much detail as possible to help us understand and address the problem.
-
Provide Feedback: If you have feedback or suggestions for improving EsTranslator, we would love to hear from you. You can share your thoughts by opening a new issue or participating in discussions on existing issues.
-
Submit Pull Requests: If you'd like to contribute code changes, bug fixes, or new features, you can submit a pull request. Follow the guidelines below to ensure a smooth review and merge process.
Development Setup¶
To set up a development environment for EsTranslator, follow these steps:
- Install Apertium:
wget https://apertium.projectjj.com/apt/install-nightly.sh -O - | sudo bash
sudo apt install apertium-all-dev
- Clone the repository:
git clone https://github.com/icij/es-translator.git
- Install the required dependencies:
cd es-translator
make install
- Run tests to verify the setup:
make test
Development Commands¶
The project uses a Makefile for common development tasks. Here's a reference of available commands:
Code Quality¶
| Command | Description |
|---|---|
make lint | Run ruff linter to check for code issues |
make lint-fix | Automatically fix linting issues where possible |
Testing¶
| Command | Description |
|---|---|
make test | Run the test suite with pytest |
Documentation¶
| Command | Description |
|---|---|
make serve-doc | Start a local documentation server for preview |
make publish-doc | Deploy documentation to GitHub Pages |
Building & Cleaning¶
| Command | Description |
|---|---|
make install | Install project dependencies via Poetry |
make clean | Remove build artifacts, cache files, and compiled Python files |
Development Workflow¶
A typical development workflow looks like:
# 1. Make your changes to the code
# 2. Run linting to check for issues
make lint
# 3. Fix any auto-fixable issues
make lint-fix
# 4. Run tests to ensure nothing is broken
make test
# 5. Preview documentation changes (if applicable)
make serve-doc
Code Contribution Guidelines¶
When contributing code changes, please adhere to the following guidelines:
- Fork the repository and create a new branch for your changes.
- Ensure your code follows the existing code style and conventions.
- Run
make lintto check for linting issues before committing. - Write clear and concise commit messages. We recommend using conventional commits.
- Include tests to cover your changes and ensure they pass.
- Update documentation as necessary.
- Submit a pull request to the
masterbranch of the main repository.
License¶
By contributing to the EsTranslator project, you agree that your contributions will be licensed under the MIT License. You retain the copyright to your contributions.
Code of Conduct¶
We expect all contributors to follow the Code of Conduct when contributing to EsTranslator.