Skip to content

Commit 4744f6d

Browse files
committed
add contributing guide
1 parent 64a55d1 commit 4744f6d

File tree

6 files changed

+191
-1
lines changed

6 files changed

+191
-1
lines changed

.github/code-of-conduct.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Attribution
36+
37+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
38+
39+
[homepage]: http://contributor-covenant.org
40+
[version]: http://contributor-covenant.org/version/1/4/

.github/contributing.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
## Contributing
2+
3+
> Please note that this project is released with a [Contributor Code of Conduct](code-of-conduct.md). By participating in this project you agree to abide by its terms.
4+
5+
## See
6+
7+
- [General Rules](#general-rules)
8+
- [All ▲lgorithms Structure](#all-▲lgorithms-structure)
9+
- [Adding new algorithms](adding-new-algorithms)
10+
- [Style](#style)
11+
- [Adding Documentation](#adding-documentation)
12+
- [Run it online](#run-it-online)
13+
14+
### General Rules
15+
16+
- As much as possible, try to follow the existing format of markdown and code.
17+
18+
### All ▲lgorithms Python Library Structure
19+
20+
- Directories and files are all in lower case letter.
21+
- Files are separated by an underscore (`_`) following the `snake_case` style.
22+
- Directories in documentation are separated by a minus or hyphen (`-`) following `kebeab-case` style.
23+
24+
> We follow this structure
25+
26+
```
27+
├── allalgorithms
28+
│ │── sorting
29+
| | │── bubble_sort.py
30+
| | └── merge_sort.py
31+
│ └── searches
32+
| │── binary_search.py
33+
| └── linear_search.py
34+
├── docs
35+
│ │── sorting
36+
| | │── bubble-sort.md
37+
| | └── merge-sort.md
38+
│ └── searches
39+
| │── binary-search.md
40+
| └── linear-search.md
41+
└── tests
42+
│── test_searches.py
43+
└── test_sorting.py
44+
```
45+
46+
### Adding new algorithms
47+
48+
- Make your pull requests to be **specific** and **focused**. Instead of contributing "several algorithms" all at once contribute them all one by one separately (i.e. one pull request for "Binary Search", another one
49+
for "Bubble Sort" and so on).
50+
- Describe what you do in code using **comments**.
51+
52+
### Style
53+
54+
This repository follow the [PEP8 Style Gide for Python](https://www.python.org/dev/peps/pep-0008/), so make sure you lint your code before adding a new pull request.
55+
56+
Each `.py` file should have the following header. (no for testing files)
57+
58+
```py
59+
# -*- coding: UTF-8 -*-
60+
#
61+
# Binary search works for a sorted array.
62+
# The All ▲lgorithms library for python
63+
#
64+
# Contributed by: Carlos Abraham Hernandez
65+
# Github: @abranhe
66+
#
67+
```
68+
69+
If the algorithm is modified, this should be included there also.
70+
71+
```py
72+
# Contributed by: Carlos Abraham Hernandez
73+
# Github: @abranhe
74+
#
75+
# Modified by: Your Name
76+
# Github: @yourgithubusername
77+
```
78+
79+
If the algorithm have been modified by multiple contributors, that should be included as follow.
80+
81+
```py
82+
# Contributed by: Carlos Abraham Hernandez
83+
# Github: @abranhe
84+
#
85+
# Modifiers:
86+
# Your Name, @yourgithubusername
87+
# Your friend's name, @yourfriendongithub
88+
```
89+
90+
### Adding Documentation
91+
92+
Please make sure if you add an algorithm, you also add the required
93+
documentation for it the `/docs` directory.
94+
95+
Follow some of the examples already added.
96+
97+
If you are modifying an algorithm make sure you add a benchmark using [Repl.it](https://repl.it/) for the maintainers to have it easy to review it.
98+
99+
100+
#### Lastly and not less important:
101+
102+
Make sure you start ⭐️ the project and follow [@abranhe](https://git.io/abranhe)

.github/issue_template.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--------------------------------------------------------
2+
3+
Thanks for contributing to the All ▲lgorithms Project
4+
5+
Make sure you fill the require information
6+
---------------------------------------------------------->
7+
8+
This issue is: <!-- THIS IS REQUIRE -->
9+
10+
<!-- Mark one by adding an [x] -->
11+
12+
- [ ] A new Algorithm
13+
- [ ] An update to an existing algorithm.
14+
- [ ] An error found
15+
- [ ] A proposal
16+
- [ ] A question
17+
- [ ] Other (Describe below*)
18+
19+
**Description:**
20+
21+
<!-- THIS IS NOT REQUIRE unless you have selected other -->

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--------------------------------------------------------
2+
3+
Thanks for contributing to the All ▲lgorithms Project
4+
5+
Make sure you fill the require information
6+
---------------------------------------------------------->
7+
8+
This pull request is: <!-- THIS IS REQUIRE -->
9+
10+
<!-- Mark one by adding an [x] -->
11+
12+
- [ ] A new Algorithm
13+
- [ ] An update to an existing algorithm.
14+
- [ ] An error fix
15+
- [ ] Other (Describe below*)
16+
17+
This pull request fixes:
18+
19+
<!-- Enter the issue number which this pull request fixes -->
20+
21+
**Changes:**
22+
23+
<!-- Make sure you follow the contributing and code of conduct of this project -->

docs/readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
- Actively maintained
3232
- Because All Algorithms should easy to use in Python
3333

34-
Read the detailed documentation at [python.allalgorithms.com](https://python.allalgorithms.com) or see [Tree](#tree).
34+
Read the detailed documentation at [python.allalgorithms.com](https://python.allalgorithms.com) or see [Tree](#tree).
35+
36+
**Want to contribute?** [GET STARTED HERE](https://github.com/abranhe/python-lib/tree/master/.github/contributing.md)
3537

3638
## Install
3739

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333

3434
Read the detailed documentation at [python.allalgorithms.com](https://python.allalgorithms.com) or see the [`docs`](https://github.com/abranhe/python-lib/blob/master/docs) directory on Github. See [Tree](#tree).
3535

36+
**Want to contribute?** [GET STARTED HERE](https://github.com/abranhe/python-lib/tree/master/.github/contributing.md)
37+
3638
## Install
3739

3840
```

0 commit comments

Comments
 (0)