Skip to content

Commit

Permalink
Merge pull request #10 from mzelenetz/mzelenetz-patch-1
Browse files Browse the repository at this point in the history
Incorporate Mehul's changes, support windows
  • Loading branch information
mzelenetz authored Oct 14, 2024
2 parents 573e9a0 + 6785c8a commit 3aff225
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
.PHONY: install test
# Phony targets
.PHONY: all install test tests

default: test
# Detect OS
ifeq ($(OS),Windows_NT)
detected_OS := Windows
else
detected_OS := $(shell uname -s)
endif

# Set path separator
ifeq ($(detected_OS),Windows)
PATHSEP := ;
else
PATHSEP := :
endif

# Set PYTHONPATH
export PYTHONPATH := .$(PATHSEP)$(PYTHONPATH)

# Default target
all: test

# Install dependencies
install:
pip install -e .
pip install pytest pytest-colored

test:
PYTHONPATH=./ pytest -s
# Run all tests
test: tests

tests:
pytest -s --color=yes

# Run linear regression tests
lr:
PYTHONPATH=./ pytest -s ./tests/test_linear_regression.py

pytest -s --color=yes ./tests/test_linear_regression.py

# Run feature tests
features:
PYTHONPATH=./ pytest -s ./tests/test_features.py
pytest -s --color=yes ./tests/test_features.py

0 comments on commit 3aff225

Please sign in to comment.