Thank you for your interest in contributing to multilang-python, an open-source transpileur that enables Python coding in native languages by translating localized keywords and built-ins (e.g., French définir to def) into standard Python. Your contributions help make programming accessible to non-English-speaking communities. This guide outlines how to contribute effectively.
Please adhere to our Code of Conduct to ensure a respectful and inclusive community.
Contributions include code, documentation, language translations, bug reports, and more. Below are the main ways to contribute.
Submit bugs using the Bug Report template. Include:
- Issue description.
- Steps to reproduce (e.g., script with
# multilang-python: fr). - Expected vs. actual behavior.
- Environment (Python version, OS).
Propose features via the Feature Request template. Provide:
- Feature description.
- Use cases (e.g., new language support).
- Potential challenges.
To add a language:
- Install the package:
pip install multilang-python
- Clone the repository for development:
git clone https://github.com/fless-lab/multilang-python.git cd multilang-python - Run:
python3 scripts/add_language.py
- Enter the language code (e.g.,
es) and translations. - Save the file (e.g.,
src/multilang_python/languages/es.json). - Add examples in
examples/<language>/with headers (e.g.,# multilang-python: es). - Write tests in
tests/integration/test_<language>.py. - Submit a pull request.
See src/multilang_python/languages/template.json and USER_GUIDE.md.
To contribute code:
- Fork and clone the repository:
git clone https://github.com/fless-lab/multilang-python.git cd multilang-python - Create a branch:
git checkout -b feature/<your-feature>
- Set up development:
pip install -r requirements/dev.txt python3 scripts/setup_dev.py
- Write code:
- Follow ARCHITECTURE.md.
- Use PEP 8 (enforced by
flake8, seeconfig/flake8.ini). - Add tests in
tests/.
- Test:
python3 -m pytest tests/
- Format:
./tools/format.sh
- Commit and push:
git commit -m "Add <feature>" - Submit a pull request using the PR template.
Update files in docs/ (e.g., USER_GUIDE.md). Run:
python3 scripts/generate_docs.pySubmit a PR with changes.
- Add benchmarks in
tests/benchmarks/. - Develop plugins in
src/multilang_python/interfaces/plugins/. - Translate documentation.
- Engage in GitHub Discussions.
- Branch Naming:
feature/<name>,bugfix/<name>,docs/<name>. - Testing: Use
pytest(seeconfig/pytest.ini). - Linting: Run
./tools/lint.sh. - CI/CD: Ensure GitHub Actions pass.
- Code Review: PRs need one maintainer approval.
See ARCHITECTURE.md for details. Key directories:
src/multilang_python/core/: Transpileur and validator.src/multilang_python/languages/: JSON translations.src/multilang_python/interfaces/: CLI and plugins.tests/: Tests.examples/: Sample scripts.docs/: Documentation.
- Search GitHub issues.
- Use GitHub Discussions.
- Contact maintainers via GitHub.
Contributions are under the MIT License.
Thank you for making multilang-python inclusive and powerful!