-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ashleve
authored
Jul 15, 2022
1 parent
3316436
commit cddf84d
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
help: ## Show help | ||
@grep -E '^[.a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
clean: ## Clean autogenerated files | ||
rm -rf dist | ||
find . -type f -name "*.DS_Store" -ls -delete | ||
find . | grep -E "(__pycache__|\.pyc|\.pyo)" | xargs rm -rf | ||
find . | grep -E ".pytest_cache" | xargs rm -rf | ||
find . | grep -E ".ipynb_checkpoints" | xargs rm -rf | ||
rm -f .coverage | ||
|
||
clean-logs: ## Clean logs | ||
rm -r logs/** | ||
|
||
style: ## Run pre-commit hooks | ||
pre-commit run -a | ||
|
||
sync: ## Merge changes from main branch to your current branch | ||
git fetch --all | ||
git merge main | ||
|
||
test: ## Run not slow tests | ||
pytest -k "not slow" | ||
|
||
test-full: ## Run all tests | ||
pytest | ||
|
||
train: ## Train the model | ||
python src/train.py | ||
|
||
debug: ## Enter debugging mode with pdb | ||
# | ||
# tips: | ||
# - use "import pdb; pdb.set_trace()" to set breakpoint | ||
# - use "h" to print all commands | ||
# - use "n" to execute the next line | ||
# - use "c" to run until the breakpoint is hit | ||
# - use "l" to print src code around current line, "ll" for full function code | ||
# - docs: https://docs.python.org/3/library/pdb.html | ||
# | ||
python -m pdb src/train.py debug=default |