Skip to content

Commit 9cf3dbd

Browse files
authored
Merge pull request #2 from TheAlgorithms/feat-contributing-guide
Basic Files for Setup
2 parents 32ee437 + 859bdb4 commit 9cf3dbd

15 files changed

+297
-0
lines changed

.coveragerc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[report]
2+
sort = Cover
3+
omit =
4+
.env/*

.formatter.exs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Used by "mix format"
2+
[
3+
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
4+
]

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# The directory Mix will write compiled artifacts to.
2+
/_build/
3+
4+
# If you run "mix test --cover", coverage assets end up here.
5+
/cover/
6+
7+
# The directory Mix downloads your dependencies sources to.
8+
/deps/
9+
10+
# Where third-party dependencies like ExDoc output generated docs.
11+
/doc/
12+
13+
# Ignore .fetch files in case you like to edit your project deps locally.
14+
/.fetch
15+
16+
# If the VM crashes, it generates a dump, let's ignore it too.
17+
erl_crash.dump
18+
19+
# Also ignore archive artifacts (built via "mix archive.build").
20+
*.ez
21+
22+
# Ignore package tarball (built via "mix hex.build").
23+
algorithims-*.tar

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
erlang 21.2.3
2+
elixir 1.8.0

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
language: elixir
2+
elixir:
3+
- 1.9.0
4+
5+
otp_release:
6+
- 20.3
7+
- 22.0
8+
9+
matrix:
10+
exclude:
11+
- elixir: 1.6.6
12+
otp_release: 22
13+
14+
script:
15+
- mix format --check-formatted
16+
- mix deps.get
17+
- mix test
18+
19+
# check for any trailing whitespace
20+
- "! git grep ' $' -- \\*.exs"
21+
22+
sudo: false
23+
24+
cache:
25+
directories:
26+
- _build
27+
- deps

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing guidelines
2+
3+
## Before contributing
4+
5+
Welcome to [TheAlgorithms/Elixir](https://github.com/TheAlgorithms/Elixir)! Before sending your pull requests, make sure that you **read the whole guidelines**. If you have any doubt on the contributing guide, please feel free to [state it clearly in an issue](https://github.com/TheAlgorithms/Elixir/issues/new) or ask the community in [Gitter](https://gitter.im/TheAlgorithms).
6+
7+
## Contributing
8+
9+
### Contributor
10+
11+
We are very happy that you consider implementing algorithms and data structure for others! This repository is referenced and used by learners from all over the globe. Being one of our contributors, you agree and confirm that:
12+
13+
- You did your work - no plagiarism allowed
14+
- Any plagiarized work will not be merged.
15+
- Your work will be distributed under [MIT License](License) once your pull request is merged
16+
- You submitted work fulfils or mostly fulfils our styles and standards
17+
18+
**New implementations** are welcome! For example, new solutions for a problem, different representations for a graph data structure or algorithm designs with different complexity.
19+
20+
**Improving comments** and **writing proper tests** are also highly welcome.
21+
22+
### Contribution
23+
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.
25+
26+
Your contribution will be tested by our [automated testing on Travis CI](https://travis-ci.org/TheAlgorithms/Elixir/pull_requests) to save time and mental energy. After you have submitted your pull request, you should see the Travis tests start to run at the bottom of your submission page. If those tests fail, then click on the ___details___ button try to read through the Travis 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.
27+
28+
#### Coding Style
29+
30+
We want your work to be readable by others; therefore, we encourage you to note the following:
31+
32+
- Original code submission require module definitions or comments to describe your work.
33+
- Avoid importing external libraries for basic algorithms. Only use those libraries for complicated algorithms.
34+
- If you need a third party module that is not in the file __mix.exs__, please add it to that file as part of your submission.
35+
- Format your work, or it will fail the tests.
36+
37+
#### Other Standards While Submitting Your Work
38+
39+
- Strictly use snake_case (underscore_separated) in your file_name, as it will be easy to parse in future using scripts.
40+
- If you have modified/added code work, make sure the code compiles before submitting.
41+
- If you have modified/added documentation work, ensure your language is concise and contains no grammar errors.
42+
- Do not update the README.md or DIRECTORY.md file which will be periodically autogenerated by our Travis CI processes.
43+
- Add a corresponding explanation to [Algorithms-Explanation](https://github.com/TheAlgorithms/Algorithms-Explanation) (Optional but recommended).
44+
45+
46+
- Most importantly,
47+
- **Be consistent in the use of these guidelines when submitting.**
48+
- **Join** [Gitter](https://gitter.im/TheAlgorithms) **now!**
49+
- Happy coding!
50+
51+
Writer [@raksonibs](https://github.com/raksonibs), Nov 2019.

DIRECTORY.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,60 @@
11

2+
3+
## Arithmetic Analysis
4+
5+
## Backtracking
6+
7+
## Blockchain
8+
9+
## Boolean Algebra
10+
11+
## Ciphers
12+
13+
## Compression
14+
15+
## Conversions
16+
17+
## Data Structures
18+
* Linked List
19+
* [Singly Linked List](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/singly_linked_list.py)
20+
21+
## Digital Image Processing
22+
23+
## Divide And Conquer
24+
25+
## Dynamic Programming
26+
27+
## File Transfer
28+
29+
## Fuzzy Logic
30+
31+
## Graphs
32+
33+
## Hashes
34+
35+
## Linear Algebra
36+
37+
## Machine Learning
38+
39+
## Maths
40+
41+
## Matrix
42+
43+
## Networking Flow
44+
45+
## Neural Network
46+
47+
## Other
48+
49+
## Project Euler
50+
51+
## Searches
52+
53+
## Sorts
54+
55+
## Strings
56+
57+
## Traversals
58+
59+
## Web Programming
60+

LICENSE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) 2019 The Algorithms
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ These implementations are for learning purposes. They may be less efficient than
1212

1313
Read our [Contribution Guidelines](CONTRIBUTING.md) before you contribute.
1414

15+
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
16+
and published on [HexDocs](https://hexdocs.pm).
17+
1518
## Community Channel
1619

1720
We're on [Gitter](https://gitter.im/TheAlgorithms)! Please join us.

lib/algorithims.ex

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
defmodule Algorithims do
2+
@moduledoc """
3+
Documentation for Algorithims.
4+
"""
5+
6+
@doc """
7+
Hello world.
8+
9+
## Examples
10+
11+
iex> Algorithims.hello()
12+
:world
13+
14+
"""
15+
def hello do
16+
:world
17+
end
18+
end

0 commit comments

Comments
 (0)