Skip to content

Commit 6b0fd3b

Browse files
authored
Update contribution guidelines (#147)
1 parent 7454707 commit 6b0fd3b

File tree

1 file changed

+53
-4
lines changed

1 file changed

+53
-4
lines changed

README.md

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,56 @@ All algorithms can be found in the [`DIRECTORY.md`](https://github.com/TheAlgori
1515
## Contribution Guidelines
1616

1717
Please ensure to follow the points stated below if you would like to contribute:
18-
- 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.
19-
- Add an example to showcase the use of an algorithm proposed. It can be commented.
20-
- 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).
21-
- 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.
18+
### 1. Code Quality & Functionality
19+
20+
-Ensure that your code is functional and well-structured before submitting a pull request.
21+
22+
-The code should run without errors in an R environment and produce the expected output.
23+
24+
-Follow best practices for efficiency, readability, and maintainability.
25+
26+
### 2. Adding a New Algorithm
27+
28+
-Verify that the algorithm is not already implemented in the repository.
29+
30+
-Include a brief explanation of the algorithm in the file as comments.
31+
32+
-Add an example showcasing its usage (it can be commented within the script).
33+
34+
### 3. Modifying an Existing Algorithm
35+
36+
-If making improvements, clearly document the changes in your pull request description.
37+
38+
-Ensure that your modifications do not break existing functionality.
39+
40+
-If applicable, update or add test cases to validate your changes.
41+
42+
### 4. Code Style & Naming Conventions
43+
44+
-Use consistent and meaningful variable names. Follow one of these naming conventions:
45+
46+
-Use . or _ to separate words (e.g., results.df for a data frame).
47+
48+
-Ensure that filenames follow the existing directory structure and naming patterns.
49+
50+
### 5. Documentation & Comments
51+
52+
-Provide clear and concise documentation in the form of comments within the code.
53+
54+
-Add a brief docstring at the beginning of the script explaining:
55+
56+
-What the algorithm does
57+
58+
-The expected input and output
59+
60+
-Any dependencies required
61+
62+
### 6. Testing & Verification
63+
64+
-Before submitting a pull request, verify that your code:
65+
66+
-Runs correctly with different test cases
67+
68+
-Does not produce unnecessary warnings or errors
69+
70+
-If applicable, add a test file demonstrating the algorithm’s correctness.

0 commit comments

Comments
 (0)