Skip to content

Commit aebdf15

Browse files
committed
Fix formatting and grammar in CONTRIBUTING.md 🍉
1 parent f662b63 commit aebdf15

1 file changed

Lines changed: 28 additions & 33 deletions

File tree

CONTRIBUTING.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
# Contributing guidelines
1+
# Contributing Guidelines
22

3-
## Before contributing
3+
## Before Contributing
44

5-
Welcome to [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python)! Before submitting your pull requests, please ensure that you __read the whole guidelines__. If you have any doubts about the contributing guide, please feel free to [state it clearly in an issue](https://github.com/TheAlgorithms/Python/issues/new) or ask the community on [Gitter](https://gitter.im/TheAlgorithms/community).
5+
Welcome to [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python)! Before submitting your pull requests, please ensure that you __read the entire guidelines__. If you have any doubts about the contributing guide, please feel free to [state them clearly in an issue](https://github.com/TheAlgorithms/Python/issues/new) or ask the community on [Gitter](https://gitter.im/TheAlgorithms/community).
66

77
## Contributing
88

99
### Contributor
1010

1111
We are delighted that you are considering implementing algorithms and data structures for others! This repository is referenced and used by learners from all over the globe. By being one of our contributors, you agree and confirm that:
1212

13-
- You did your work - no plagiarism allowed.
13+
- You did your work no plagiarism allowed.
1414
- Any plagiarized work will not be merged.
15-
- Your work will be distributed under [MIT License](LICENSE.md) once your pull request is merged.
15+
- Your work will be distributed under the [MIT License](LICENSE.md) once your pull request is merged.
1616
- Your submitted work fulfills or mostly fulfills our styles and standards.
1717

18-
__New implementation__ is welcome! For example, new solutions for a problem, different representations for a graph data structure or algorithm designs with different complexity, but __identical implementation__ of an existing implementation is not allowed. Please check whether the solution is already implemented or not before submitting your pull request.
18+
__New implementations__ are welcome! For example, new solutions for a problem, different representations for a graph data structure, or algorithm designs with different complexities. However, __identical implementations__ of an existing one are not allowed. Please check whether the solution is already implemented before submitting your pull request.
1919

2020
__Improving comments__ and __writing proper tests__ are also highly welcome.
2121

2222
### Contribution
2323

24-
We appreciate any contribution, from fixing a grammar mistake in a comment to implementing complex algorithms. Please read this section if you are contributing your work.
24+
We appreciate any contribution from fixing a grammar mistake in a comment to implementing complex algorithms. Please read this section if you are contributing your work.
2525

26-
Your contribution will be tested by our [automated testing on GitHub Actions](https://github.com/TheAlgorithms/Python/actions) to save time and mental energy. After you have submitted your pull request, you should see the GitHub Actions tests start to run at the bottom of your submission page. If those tests fail, then click on the ___details___ button to read through the GitHub Actions output to understand the failure. If you do not understand, please leave a comment on your submission page and a community member will try to help.
26+
Your contribution will be tested by our [automated testing on GitHub Actions](https://github.com/TheAlgorithms/Python/actions) to save time and mental energy. After you have submitted your pull request, you should see the GitHub Actions tests start to run at the bottom of your submission page. If those tests fail, click on the ___details___ button to read through the GitHub Actions output to understand the failure. If you do not understand, please leave a comment on your submission page and a community member will try to help.
2727

2828
#### Issues
2929

30-
If you are interested in resolving an [open issue](https://github.com/TheAlgorithms/Python/issues), simply make a pull request with your proposed fix. __We do not assign issues in this repo__ so please do not ask for permission to work on an issue.
30+
If you are interested in resolving an [open issue](https://github.com/TheAlgorithms/Python/issues), simply make a pull request with your proposed fix. __We do not assign issues in this repo__, so please do not ask for permission to work on an issue.
3131

3232
__Do not__ create an issue to contribute an algorithm. Please submit a pull request instead.
3333

34-
Please help us keep our issue list small by adding `Fixes #{$ISSUE_NUMBER}` to the description of pull requests that resolve open issues.
34+
Please help us keep our issue list small by adding `Fixes #{$ISSUE_NUMBER}` to the description of pull requests that resolve open issues.
3535
For example, if your pull request fixes issue #10, then please add the following to its description:
3636
```
3737
Fixes #10
@@ -40,39 +40,37 @@ GitHub will use this tag to [auto-close the issue](https://docs.github.com/en/is
4040

4141
#### What is an Algorithm?
4242

43-
An Algorithm is one or more functions (or classes) that:
43+
An algorithm is one or more functions (or classes) that:
4444
* take one or more inputs,
4545
* perform some internal calculations or data manipulations,
4646
* return one or more outputs,
47-
* have minimal side effects (Ex. `print()`, `plot()`, `read()`, `write()`).
47+
* have minimal side effects (e.g., `print()`, `plot()`, `read()`, `write()`).
4848

49-
Algorithms should be packaged in a way that would make it easy for readers to put them into larger programs.
49+
Algorithms should be packaged in a way that would make it easy for readers to integrate them into larger programs.
5050

5151
Algorithms should:
52-
* have intuitive class and function names that make their purpose clear to readers
53-
* use Python naming conventions and intuitive variable names to ease comprehension
54-
* be flexible to take different input values
55-
* have Python type hints for their input parameters and return values
56-
* raise Python exceptions (`ValueError`, etc.) on erroneous input values
57-
* have docstrings with clear explanations and/or URLs to source materials
58-
* contain doctests that test both valid and erroneous input values
59-
* return all calculation results instead of printing or plotting them
60-
61-
Algorithms in this repo should not be how-to examples for existing Python packages. Instead, they should perform internal calculations or manipulations to convert input values into different output values. Those calculations or manipulations can use data types, classes, or functions of existing Python packages but each algorithm in this repo should add unique value.
62-
63-
#### Pre-commit plugin
52+
* have intuitive class and function names that make their purpose clear to readers,
53+
* use Python naming conventions and intuitive variable names to ease comprehension,
54+
* be flexible to take different input values,
55+
* have Python type hints for their input parameters and return values,
56+
* raise Python exceptions (`ValueError`, etc.) on erroneous input values,
57+
* have docstrings with clear explanations and/or URLs to source materials,
58+
* contain doctests that test both valid and erroneous input values,
59+
* return all calculation results instead of printing or plotting them.
60+
61+
Algorithms in this repo should not be simple how-to examples for existing Python packages. Instead, they should perform internal calculations or manipulations to convert input values into different output values. These calculations or manipulations can use data types, classes, or functions of existing Python packages, but each algorithm in this repo should add unique value.
62+
63+
#### Pre-Commit Plugin
6464
Use [pre-commit](https://pre-commit.com/#installation) to automatically format your code to match our coding style:
6565

6666
```bash
6767
python3 -m pip install pre-commit # only required the first time
6868
pre-commit install
6969
```
7070
That's it! The plugin will run every time you commit any changes. If there are any errors found during the run, fix them and commit those changes. You can even run the plugin manually on all files:
71-
7271
```bash
7372
pre-commit run --all-files --show-diff-on-failure
7473
```
75-
7674
#### Coding Style
7775

7876
We want your work to be readable by others; therefore, we encourage you to note the following:
@@ -85,20 +83,17 @@ We want your work to be readable by others; therefore, we encourage you to note
8583

8684
- We encourage the use of Python [f-strings](https://realpython.com/python-f-strings/#f-strings-a-new-and-improved-way-to-format-strings-in-python) where they make the code easier to read.
8785

88-
- Please consider running [__psf/black__](https://github.com/python/black) on your Python file(s) before submitting your pull request. This is not yet a requirement but it does make your code more readable and automatically aligns it with much of [PEP 8](https://www.python.org/dev/peps/pep-0008/). There are other code formatters (autopep8, yapf) but the __black__ formatter is now hosted by the Python Software Foundation. To use it,
89-
86+
- Please consider running [__psf/black__](https://github.com/python/black) on your Python file(s) before submitting your pull request. This is not yet a requirement but it does make your code more readable and automatically aligns it with much of [PEP 8](https://www.python.org/dev/peps/pep-0008/). There are other code formatters (autopep8, yapf) but the __black__ formatter is now hosted by the Python Software Foundation.
87+
- To use it:
9088
```bash
9189
python3 -m pip install black # only required the first time
9290
black .
9391
```
94-
95-
- All submissions will need to pass the test `ruff .` before they will be accepted so if possible, try this test locally on your Python file(s) before submitting your pull request.
96-
92+
- All submissions will need to pass the test `ruff .` before they will be accepted so if possible, try this test locally on your Python file(s) before submitting your pull request.
9793
```bash
9894
python3 -m pip install ruff # only required the first time
9995
ruff check
10096
```
101-
10297
- Original code submission require docstrings or comments to describe your work.
10398

10499
- More on docstrings and comments:

0 commit comments

Comments
 (0)