Skip to content

Commit

Permalink
Merge branch 'MIT-Emerging-Talent:main' into retrospective
Browse files Browse the repository at this point in the history
  • Loading branch information
GaiSamuel authored Jan 10, 2025
2 parents f7e4c08 + 50a35d2 commit 235376e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ about: A template PR for code review with a checklist

- [ ] The function's name describes it's behavior
- [ ] The function's name matches the file name
- _It's ok to have extra helper functions if necessary, like with mergesort_
- [ ] The function has correct type annotations
- [ ] The function is not called at the top level of the function file
- _Recursive solutions **can** call the function from **inside** the function body_

## Strategy

Expand All @@ -66,7 +69,7 @@ about: A template PR for code review with a checklist

### Don'ts

- [ ] The function's strategy _is not_ described in the documentation
- [ ] The function's strategy _is not_ described in any docstrings or tests
- [ ] Comments explain the _strategy_, **not** the _implementation_
- [ ] The function _does not_ have more comments than code
- If it does, consider finding a new strategy or a simpler implementation
Expand All @@ -82,5 +85,7 @@ about: A template PR for code review with a checklist
- [ ] Variable names are clear and helpful
- [ ] The code follows the strategy as simply as possible
- [ ] The implementation is as simple as possible given the strategy
- [ ] There are no commented lines of code
- [ ] There are no `print` statements anywhere
- [ ] The code includes defensive assertions
- [ ] Defensive assertions include as little logic as possible
6 changes: 5 additions & 1 deletion .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ jobs:
- name: Check for test files
id: check_tests
run: |
if find . -type f -name "test_*.py" | grep -q .; then
test_files=$(find ./solutions/tests -type f -name "test_*.py")
if [ -n "$test_files" ]; then
echo "Found test files:"
echo "$test_files"
echo "has_tests=true" >> $GITHUB_OUTPUT
else
echo "No test files found matching pattern ./solutions/tests/test_*.py"
echo "has_tests=false" >> $GITHUB_OUTPUT
fi
shell: bash
Expand Down
11 changes: 10 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,14 @@
},

// Enable/disable update table of contents on save
"markdown.extension.toc.updateOnSave": false
"markdown.extension.toc.updateOnSave": false,

"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.ruff": "explicit",
"source.organizeImports.ruff": "explicit"
}
}
}
1 change: 1 addition & 0 deletions solutions/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions solutions/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 235376e

Please sign in to comment.