Skip to content

Adding contributing guide #15

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 4 commits into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
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
40 changes: 40 additions & 0 deletions .github/code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributor Covenant Code of Conduct

## Our Pledge

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.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

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.

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.

## Scope

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.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
101 changes: 101 additions & 0 deletions .github/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
## Contributing

> 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.

## See

- [General Rules](#general-rules)
- [All ▲lgorithms Structure](#all-lgorithms-python-library-structure)
- [Adding new algorithms](#adding-new-algorithms)
- [Style](#style)
- [Adding Documentation](#adding-documentation)

### General Rules

- As much as possible, try to follow the existing format of markdown and code.

### All ▲lgorithms Python Library Structure

- Directories and files are all in lower case letter.
- Files are separated by an underscore (`_`) following the `snake_case` style.
- Directories in documentation are separated by a minus or hyphen (`-`) following `kebeab-case` style.

> We follow this structure

```
├── allalgorithms
│ │── sorting
| | │── bubble_sort.py
| | └── merge_sort.py
│ └── searches
| │── binary_search.py
| └── linear_search.py
├── docs
│ │── sorting
| | │── bubble-sort.md
| | └── merge-sort.md
│ └── searches
| │── binary-search.md
| └── linear-search.md
└── tests
│── test_searches.py
└── test_sorting.py
```

### Adding new algorithms

- 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
for "Bubble Sort" and so on).
- Describe what you do in code using **comments**.

### Style

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.

Each `.py` file should have the following header. (no for testing files)

```py
# -*- coding: UTF-8 -*-
#
# Binary search works for a sorted array.
# The All ▲lgorithms library for python
#
# Contributed by: Carlos Abraham Hernandez
# Github: @abranhe
#
```

If the algorithm is modified, this should be included there also.

```py
# Contributed by: Carlos Abraham Hernandez
# Github: @abranhe
#
# Modified by: Your Name
# Github: @yourgithubusername
```

If the algorithm have been modified by multiple contributors, that should be included as follow.

```py
# Contributed by: Carlos Abraham Hernandez
# Github: @abranhe
#
# Modifiers:
# Your Name, @yourgithubusername
# Your friend's name, @yourfriendongithub
```

### Adding Documentation

Please make sure if you add an algorithm, you also add the required
documentation for it the `/docs` directory.

Follow some of the examples already added.

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.


#### Lastly and not less important:

Make sure you start ⭐️ the project and follow [@abranhe](https://git.io/abranhe)
21 changes: 21 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--------------------------------------------------------

Thanks for contributing to the All ▲lgorithms Project

Make sure you fill the require information
---------------------------------------------------------->

This issue is: <!-- THIS IS REQUIRE -->

<!-- Mark one by adding an [x] -->

- [ ] A new Algorithm
- [ ] An update to an existing algorithm.
- [ ] An error found
- [ ] A proposal
- [ ] A question
- [ ] Other (Describe below*)

**Description:**

<!-- THIS IS NOT REQUIRE unless you have selected other -->
23 changes: 23 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--------------------------------------------------------

Thanks for contributing to the All ▲lgorithms Project

Make sure you fill the require information
---------------------------------------------------------->

This pull request is: <!-- THIS IS REQUIRE -->

<!-- Mark one by adding an [x] -->

- [ ] A new Algorithm
- [ ] An update to an existing algorithm.
- [ ] An error fix
- [ ] Other (Describe below*)

This pull request fixes:

<!-- Enter the issue number which this pull request fixes -->

**Changes:**

<!-- Make sure you follow the contributing and code of conduct of this project -->
20 changes: 18 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,23 @@ Date: October 9, 2018

### Algorithms:

- Sorting
- ### Sorting
- Bubble Sort
- Searches
- ### Searches
- Merge Sort

# Version `0.0.1`

Date: TO ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD, 2018

### Algorithms:

Added:

- ### Searches
- Bubble Sort
- Cocktail Shaker Sort
- Insertion Sort
- Pigeonhole Sort
- Selection Sort
- Stooge Sort
4 changes: 3 additions & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
- Actively maintained
- Because All Algorithms should easy to use in Python

Read the detailed documentation at [python.allalgorithms.com](https://python.allalgorithms.com) or see [Tree](#tree).
Read the detailed documentation at [python.allalgorithms.com](https://python.allalgorithms.com) or see [Tree](#tree).

**Want to contribute?** [GET STARTED HERE](https://github.com/abranhe/python-lib/tree/master/.github/contributing.md)

## Install

Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

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).

**Want to contribute?** [GET STARTED HERE](https://github.com/abranhe/python-lib/tree/master/.github/contributing.md)

## Install

```
Expand Down