Thank you for your interest in contributing to this project! Your support and collaboration are greatly appreciated. Please read these guidelines carefully to help us maintain a positive and productive community.
Fork the main repository and clone the fork to your local environment:
git clone https://github.com/your-username/search-engine.git
Create a separate branch for your contribution. Make sure to name the branch according to the feature or bug fix you are working on. Each pull request must be associated with its own branch. GitHub provides an option to directly create branches linked to issues, which can simplify this process:
git checkout -b my-new-feature
Before starting work on a feature or bug fix, create an issue or open a discussion in the repository. This allows maintainers and contributors to provide feedback, avoid duplicated efforts, and ensure that the planned implementation aligns with the project's goals.
Write descriptive and concise commit messages. Follow this commit message convention:
- Use the imperative mood (e.g., "Add support for...").
- Keep the first line of the commit message under 50 characters.
- Add a longer description after a blank line, if needed.
Example commit message:
git commit -m "Fix bug in PageRank algorithm"
git commit -m "Add keyword search functionality
- Implement search function in the reverse index
- Improve indexing performance for large data sets"
To maintain the commit standard, use Commitizen. To do so, simply install the dependencies using Poetry, where the entire project is built and tested. Follow the steps outlined in the Commitizen Getting Started Guide. Example using Commitizen:
git add . # It is not recommended to use git add . This is just an example.
cz commit # Follow the instructions provided by cz.
Regularly update your fork with changes from the main repository:
git fetch upstream
git checkout main
git merge upstream/main
Ensure that your contribution does not break anything. Run the unit tests before submitting your pull request:
mkdir build
cd build
cmake ..
make
./tests/unit-tests/LibUnitTests
If necessary, add new tests covering your functionality or fix.
After completing your changes and testing the code, submit your pull request:
- Go to the page of your fork on GitHub.
- Click "New Pull Request."
- Provide a detailed title and description for your pull request explaining the changes.
When you open a pull request, it will be reviewed by one of the project maintainers. Please be patient, as the review process may take some time depending on the complexity of the changes. Reviewers may request changes during the process.
Follow these coding guidelines when contributing:
- C++11 Standard: Ensure your code complies with the C++11 standard or higher.
- Indentation: Use 4 spaces for indentation, no tabs.
- Naming Conventions: Use clear and meaningful names for variables and functions. Use
CamelCase
for class names andsnake_case
for variables and functions. - Documentation: Write comments to explain complex functions or non-trivial code.
If you find a bug, please open an issue on GitHub with the following information:
- Bug description.
- Steps to reproduce the bug.
- Expected behavior.
- Environment information (OS, compiler version, etc.).
For more details on how to contribute, please refer to the following:
- GitHub Documentation on Forking Repositories
- GitHub Discussions Overview
- Docs Library Search Engine
- Code of Conduct
- README
- Respect others: Treat all contributors and users with respect. Harassment, trolling, or abusive language will not be tolerated. Please refer to our Code of Conduct for more details.
- Be constructive: Provide helpful feedback, avoid unproductive criticism, and aim to make this project better for everyone.
- Collaborate: Communicate openly and proactively to ensure smooth teamwork and avoid duplicated efforts.
Thank you for taking the time to contribute to the Search Engine project. Your contribution is greatly appreciated!