Thank you for your interest in contributing to the Linear Genetic Programming (LGP) framework! This document outlines the guidelines and best practices for contributing to the project. Whether you're fixing bugs, adding features, or improving documentation, your contributions are greatly appreciated.
- Understand the Project: Familiarize yourself with the README.md and the project structure. The framework combines a high-performance C core with a Python interface.
- Set Up Your Environment:
- Use the provided
Dockerfileordocker-compose.ymlfor a consistent development environment. - Alternatively, ensure you have the required dependencies installed (e.g., GCC/Clang, Python 3.8+, OpenMP, etc.).
- Use the provided
- Clone the Repository:
git clone https://github.com/P4o1o/LinearGeneticProgramming.git cd LinearGeneticProgramming - Build the Project:
- For the C core:
make clean && make DEBUG=1 THREADS=4 - For the Python interface:
make python
- For the C core:
- Run Tests:
- Execute the test suite to ensure everything is working:
pytest tests/
- Execute the test suite to ensure everything is working:
- Use the GitHub Issues page to report bugs or suggest features.
- Provide detailed information, including steps to reproduce the issue, expected behavior, and environment details.
- Fork the Repository: Create your own fork of the repository.
- Create a Branch: Use a descriptive name for your branch (e.g.,
fix-memory-leak,add-new-fitness-function).git checkout -b your-branch-name
- Make Changes: Follow the coding standards and ensure your changes are well-documented.
- Run Tests: Verify that your changes do not break existing functionality.
- Submit a Pull Request (PR): Push your changes to your fork and open a PR against the
mainbranch. Include a clear description of your changes and reference any related issues.
- C Code:
- Follow the conventions in the existing codebase.
- Use meaningful variable and function names.
- Ensure thread safety and memory efficiency.
- Python Code:
- Adhere to PEP 8 standards.
- Use type hints and docstrings for all functions.
- Write tests for new features or bug fixes.
- Add unit tests for all new features and bug fixes.
- Ensure tests cover edge cases and are reproducible.
- Use
pytestfor Python tests and theMakefiletargets for C tests.
Here are some areas where contributions are needed:
- Complete support for multi-objective evolution.
- Add features to the Python interface.
- Enhance the virtual machine:
- Implement new instructions (e.g., vectorized, GPU-based).
- Expand instruction set.
- Add new selection and initialization methods.
- Develop additional fitness functions and evolutionary methods.
- Explore and implement other essential or innovative features.
- Join discussions on GitHub Discussions.