Skip to content

Commit ee71bfe

Browse files
authored
Merge pull request abranhe#15 from abranhe/tree
Adding contributing guide
2 parents 51ac5f5 + 5c7ec3e commit ee71bfe

File tree

7 files changed

+208
-3
lines changed

7 files changed

+208
-3
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: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
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-python-library-structure)
9+
- [Adding new algorithms](#adding-new-algorithms)
10+
- [Style](#style)
11+
- [Adding Documentation](#adding-documentation)
12+
13+
### General Rules
14+
15+
- As much as possible, try to follow the existing format of markdown and code.
16+
17+
### All ▲lgorithms Python Library Structure
18+
19+
- Directories and files are all in lower case letter.
20+
- Files are separated by an underscore (`_`) following the `snake_case` style.
21+
- Directories in documentation are separated by a minus or hyphen (`-`) following `kebeab-case` style.
22+
23+
> We follow this structure
24+
25+
```
26+
├── allalgorithms
27+
│ │── sorting
28+
| | │── bubble_sort.py
29+
| | └── merge_sort.py
30+
│ └── searches
31+
| │── binary_search.py
32+
| └── linear_search.py
33+
├── docs
34+
│ │── sorting
35+
| | │── bubble-sort.md
36+
| | └── merge-sort.md
37+
│ └── searches
38+
| │── binary-search.md
39+
| └── linear-search.md
40+
└── tests
41+
│── test_searches.py
42+
└── test_sorting.py
43+
```
44+
45+
### Adding new algorithms
46+
47+
- 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
48+
for "Bubble Sort" and so on).
49+
- Describe what you do in code using **comments**.
50+
51+
### Style
52+
53+
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.
54+
55+
Each `.py` file should have the following header. (no for testing files)
56+
57+
```py
58+
# -*- coding: UTF-8 -*-
59+
#
60+
# Binary search works for a sorted array.
61+
# The All ▲lgorithms library for python
62+
#
63+
# Contributed by: Carlos Abraham Hernandez
64+
# Github: @abranhe
65+
#
66+
```
67+
68+
If the algorithm is modified, this should be included there also.
69+
70+
```py
71+
# Contributed by: Carlos Abraham Hernandez
72+
# Github: @abranhe
73+
#
74+
# Modified by: Your Name
75+
# Github: @yourgithubusername
76+
```
77+
78+
If the algorithm have been modified by multiple contributors, that should be included as follow.
79+
80+
```py
81+
# Contributed by: Carlos Abraham Hernandez
82+
# Github: @abranhe
83+
#
84+
# Modifiers:
85+
# Your Name, @yourgithubusername
86+
# Your friend's name, @yourfriendongithub
87+
```
88+
89+
### Adding Documentation
90+
91+
Please make sure if you add an algorithm, you also add the required
92+
documentation for it the `/docs` directory.
93+
94+
Follow some of the examples already added.
95+
96+
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.
97+
98+
99+
#### Lastly and not less important:
100+
101+
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 -->

changelog.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,23 @@ Date: October 9, 2018
88

99
### Algorithms:
1010

11-
- Sorting
11+
- ### Sorting
1212
- Bubble Sort
13-
- Searches
13+
- ### Searches
1414
- Merge Sort
15+
16+
# Version `0.0.1`
17+
18+
Date: TO ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD, 2018
19+
20+
### Algorithms:
21+
22+
Added:
23+
24+
- ### Searches
25+
- Bubble Sort
26+
- Cocktail Shaker Sort
27+
- Insertion Sort
28+
- Pigeonhole Sort
29+
- Selection Sort
30+
- Stooge Sort

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)