Skip to content

updated the contribution guidelines #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 53 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,56 @@ All algorithms can be found in the [`DIRECTORY.md`](https://github.com/TheAlgori
## Contribution Guidelines

Please ensure to follow the points stated below if you would like to contribute:
- If your proposing a new algorithm or making changes to an existing one, make sure your code works. Reviewers or the general user must be able to directly emplace it in an R environment and get the desired output.
- Add an example to showcase the use of an algorithm proposed. It can be commented.
- Follow proper naming convention for variables (use `.` or `_` to seperate terms, such as `results.df` for a data frame containing some results) and filenames (follow the convention that has been followed for files under the directory your committing to).
- Feel free to add links here to the newly added file(s), but ensure that they do not result in a merge conflict with different versions of this readme under previous pull requests.
### 1. Code Quality & Functionality

-Ensure that your code is functional and well-structured before submitting a pull request.

-The code should run without errors in an R environment and produce the expected output.

-Follow best practices for efficiency, readability, and maintainability.

### 2. Adding a New Algorithm

-Verify that the algorithm is not already implemented in the repository.

-Include a brief explanation of the algorithm in the file as comments.

-Add an example showcasing its usage (it can be commented within the script).

### 3. Modifying an Existing Algorithm

-If making improvements, clearly document the changes in your pull request description.

-Ensure that your modifications do not break existing functionality.

-If applicable, update or add test cases to validate your changes.

### 4. Code Style & Naming Conventions

-Use consistent and meaningful variable names. Follow one of these naming conventions:

-Use . or _ to separate words (e.g., results.df for a data frame).

-Ensure that filenames follow the existing directory structure and naming patterns.

### 5. Documentation & Comments

-Provide clear and concise documentation in the form of comments within the code.

-Add a brief docstring at the beginning of the script explaining:

-What the algorithm does

-The expected input and output

-Any dependencies required

### 6. Testing & Verification

-Before submitting a pull request, verify that your code:

-Runs correctly with different test cases

-Does not produce unnecessary warnings or errors

-If applicable, add a test file demonstrating the algorithm’s correctness.