Skip to content

Commit cb02081

Browse files
authored
Merge pull request #65 from UBC-MDS/improve_column_validation_docstring
Improve column validation docstring
2 parents c7d37fc + c9c87ac commit cb02081

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ jobs:
5757
steps:
5858
- name: Deploy to GitHub Pages
5959
id: deployment
60-
uses: actions/deploy-pages@v2
60+
uses: actions/deploy-pages@v4

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ sudoku_board = [
3131
]
3232
```
3333
> Note: Invalid shapes or values will raise an exception.
34+
>
3435
> Note: All functions are written defensively and will raise informative exceptions
3536
when invalid input is detected.
3637

3738
There are other Python packages that provide similar functionality. Here are some examples:
3839
- `sudoku_py`: https://github.com/aurbano/sudoku_py
3940
- `CodeWars-Python`: https://github.com/Peter-Liang/CodeWars-Python/blob/master/solutions/Validate_Sudoku_with_size_NxN.py
4041

41-
Note: this package is a work in progress and might contain example code that is not used in the final product.
42+
> Note: this package is a work in progress and might contain example code that is not used in the final product.
4243
4344
## Contributors
4445

tests/unit/test_column_validation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def test_column_validation_invalid_board_wrong_columns():
152152

153153
def test_column_validation_invalid_board_invalid_value_zero():
154154
"""
155-
Test column_validation with board containing invalid value (0 is outside 1-9 range).
155+
Test column_validation with board containing invalid value at row 0, column 0 (0 is outside 1-9 range).
156156
"""
157157
invalid_board_invalid_value = [
158158
[0, 2, 3, 4, 5, 6, 7, 8, 9],
@@ -171,7 +171,7 @@ def test_column_validation_invalid_board_invalid_value_zero():
171171

172172
def test_column_validation_invalid_board_invalid_value_ten():
173173
"""
174-
Test column_validation with board containing invalid value (10 is outside 1-9 range).
174+
Test column_validation with board containing invalid value at row 0, column 8 (10 is outside 1-9 range).
175175
"""
176176
invalid_board_invalid_value_2 = [
177177
[1, 2, 3, 4, 5, 6, 7, 8, 10],
@@ -190,7 +190,7 @@ def test_column_validation_invalid_board_invalid_value_ten():
190190

191191
def test_column_validation_invalid_board_negative_values():
192192
"""
193-
Test column_validation with board containing negative values.
193+
Test column_validation with board containing negative values at row 0, column 0 (-1 is outside 1-9 range).
194194
"""
195195
invalid_board_negative_values = [
196196
[-1, 2, 3, 4, 5, 6, 7, 8, 9],
@@ -209,7 +209,7 @@ def test_column_validation_invalid_board_negative_values():
209209

210210
def test_column_validation_invalid_board_duplicate_values_1():
211211
"""
212-
Test column_validation with board containing duplicate values (example 1).
212+
Test column_validation with board containing duplicate values at row 0, column 0 and row 1, column 0 (1 is duplicated).
213213
"""
214214
invalid_board_duplicate_values = [
215215
[1, 2, 3, 4, 4, 6, 7, 8, 9],
@@ -227,7 +227,7 @@ def test_column_validation_invalid_board_duplicate_values_1():
227227

228228
def test_column_validation_invalid_board_duplicate_values_2():
229229
"""
230-
Test column_validation with board containing duplicate values (example 2).
230+
Test column_validation with board containing duplicate values at row 0, column 4 and row 1, column 0 (1 is duplicated).
231231
"""
232232
board_example_5 = [
233233
[9, 6, 3, 1, 7, 4, 2, 5, 8],

0 commit comments

Comments
 (0)