Skip to content

Commit 16a0d82

Browse files
jameslawlorJames
andauthored
clean added to makefile, small refactoring (#11)
Co-authored-by: James <[email protected]>
1 parent 44e287e commit 16a0d82

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
1-
all: black flake test solutions
1+
.PHONY: all clean black flake test solutions
22

3+
# Default target
4+
all: black flake test solutions clean
5+
6+
# Clean temporary and generated files
7+
clean:
8+
find . \( -type f -name '*.pyc' -or -type d -name '__pycache__' \) -delete
9+
find . \( -type d -name '.eggs' -or -type d -name '*.egg-info' -or -type d -name '.pytest_cache' \) | xargs rm -rf
10+
11+
# Format code using black
312
black:
413
black ./src ./tests
514

15+
# Run flake8 for linting
616
flake:
717
flake8 ./src ./tests
818

19+
# Run tests
920
test:
1021
python3 -m pytest
1122

23+
# Run specific solutions for Advent of Code 2023
1224
solutions:
1325
python3 src/aoc_2023/days/1.py --input_file inputs/1.txt --part 1
1426
python3 src/aoc_2023/days/1.py --input_file inputs/1.txt --part 2

0 commit comments

Comments
 (0)