Skip to content

Commit

Permalink
Update python build process to test a bit more
Browse files Browse the repository at this point in the history
And store the targets in the Makefile.  I'm not sure if `python a.py
b.py` runs both (I think probably not---I think it passes `b.py` as an
argument to `a.py`), so instead we invoke python separately.
  • Loading branch information
JasonGross committed Sep 14, 2023
1 parent d02b030 commit 1a2594e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- run: make check
- run: wandb login --anonymously
- run: python train_max_of_2.py --fail-if-cant-load
- run: make analyze
20 changes: 18 additions & 2 deletions training/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,24 @@ CHECK_PY_FILES := \
#

.PHONY: check
check:
$(PYTHON) $(CHECK_PY_FILES)
check::

define add_target
$(1)::
$(2)
endef

$(foreach f,$(CHECK_PY_FILES),$(eval $(call add_target,check,$(PYTHON) $(f))))

ANALYZE_PY_FILES := \
train_max_of_2.py \
proof_max2_01_exhaustive.py \
#

.PHONY: analyze
analyze::

$(foreach f,$(ANALYZE_PY_FILES),$(eval $(call add_target,analyze,$(PYTHON) $(f) --fail-if-cant-load)))

BROKEN_PACKAGES_GREP_PATTERN:='^mkl'

Expand Down

0 comments on commit 1a2594e

Please sign in to comment.