You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* CONTRIBUTING.md: What is an Algorithm?
We are seeing too many _how-to examples_ for using existing Python packages so we should define what we want algorithm contributions to be.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+22
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,28 @@ Your contribution will be tested by our [automated testing on Travis CI](https:/
27
27
28
28
Please help us keep our issue list small by adding fixes: #{$ISSUE_NO} to the commit message of pull requests that resolve open issues. GitHub will use this tag to auto close the issue when the PR is merged.
29
29
30
+
#### What is an Algorithm?
31
+
32
+
An Algorithm is one or more functions (or classes) that:
33
+
* take one or more inputs,
34
+
* perform some internal calculations or data manipulations,
35
+
* return one or more outputs,
36
+
* have minimal side effects (Ex. print(), plot(), read(), write()).
37
+
38
+
Algorithms should be packaged in a way that would make it easy for readers to put them into larger programs.
39
+
40
+
Algorithms should:
41
+
* have intuitive class and function names that make their purpose clear to readers
42
+
* use Python naming conventions and intuitive variable names to ease comprehension
43
+
* be flexible to take different input values
44
+
* have Python type hints for their input parameters and return values
45
+
* raise Python exceptions (ValueError, etc.) on erroneous input values
46
+
* have docstrings with clear explanations and/or URLs to source materials
47
+
* contain doctests that test both valid and erroneous input values
48
+
* return all calculation results instead of printing or plotting them
49
+
50
+
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.
51
+
30
52
#### Coding Style
31
53
32
54
We want your work to be readable by others; therefore, we encourage you to note the following:
0 commit comments