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
{{ message }}
Repository navigation
Commit 708557a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+5-9Lines changed: 5 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ These calculations or manipulations can use data types, classes, or functions of
86
86
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.
87
87
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.
88
88
89
-
#### Pre-commit plugin
89
+
#### Pre-commit
90
90
91
91
Use [pre-commit](https://pre-commit.com/#installation) to automatically format your code to match our coding style:
92
92
@@ -95,9 +95,7 @@ python3 -m pip install pre-commit # only required the first time
95
95
pre-commit install
96
96
```
97
97
98
-
That's it! The plugin will run every time you commit any changes. If there are any errors found during the run, fix them and commit those changes. You can even run the plugin manually on all files:
99
-
100
-
That's it! The plugin will run every time you commit any changes. If any errors are found during the run, fix them and commit those changes. You can even run the plugin manually on all files:
98
+
That's it! Pre-commit will run every time you commit any changes. If any errors are found during the run, fix them and commit those changes. You can even run the plugin manually on all files:
101
99
102
100
```bash
103
101
pre-commit run --all-files --show-diff-on-failure
@@ -130,8 +128,6 @@ We want your work to be readable by others; therefore, we encourage you to note
130
128
ruff check
131
129
```
132
130
133
-
- Original code submission require docstrings or comments to describe your work.
134
-
135
131
- Original code submissions require docstrings or comments to describe your work.
136
132
137
133
- More on docstrings and comments:
@@ -141,12 +137,12 @@ We want your work to be readable by others; therefore, we encourage you to note
141
137
The following are considered to be bad and may be requested to be improved:
142
138
143
139
```python
144
-
x = x +2# increased by 2
140
+
x +=2# increased by 2
145
141
```
146
142
147
-
This is too trivial. Comments are expected to be explanatory. For comments, you can write them above, on, or below a line of code, as long as you are consistent within the same piece of code.
143
+
This is too trivial. Comments should not merely repeat what the code already says. Comments should explain ___why___ we are doing things. Comments on the same line as code should never cause the line to wrap (> 88 characters per line). Comments which are not on the same line as code should appear ___before___ the code they describe. "First tell the reader ___why___ with comments and then show them ___how___ with code."
148
144
149
-
We encourage you to put docstrings inside your functions, but please pay attention to the indentation of docstrings. The following is a good example:
145
+
We require you to put docstrings inside your functions, but please pay attention to the indentation of docstrings. The following is a good example:
0 commit comments