Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ REM Activate virtual environment
echo 🔧 Activating virtual environment...
call venv\Scripts\activate.bat

REM Install Python dependencies
REM Install Python dependencies. --only-binary keeps pip from running setup
REM scripts out of source distributions.
echo 📚 Installing Python dependencies...
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install --upgrade --only-binary :all: pip
pip install --only-binary :all: -r requirements.txt

REM Check if Node.js is installed
node --version >nul 2>&1
if %errorlevel% equ 0 (
echo 🌐 Setting up React frontend...
cd client
npm install
npm install --ignore-scripts
cd ..
) else (
echo ⚠️ Node.js not found. Frontend setup skipped.
Expand Down
9 changes: 5 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ else
source venv/bin/activate
fi

# Install Python dependencies
# Install Python dependencies. --only-binary keeps pip from running setup
# scripts out of source distributions.
echo "📚 Installing Python dependencies..."
pip install --upgrade pip
pip install -r requirements.txt
pip install --upgrade --only-binary :all: pip
pip install --only-binary :all: -r requirements.txt

# Check if Node.js is installed for frontend
if command -v node &> /dev/null; then
echo "🌐 Setting up React frontend..."
cd client
npm install
npm install --ignore-scripts
cd ..
else
echo "⚠️ Node.js not found. Frontend setup skipped."
Expand Down
3 changes: 2 additions & 1 deletion tests/test_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ def predict(self, x, verbose=0):
return np.array([[0.0]])

arr = np.array([[1800, 500, 8000, 6.25, 45, 6.2, 160.0]])
model, scaler = DummyModel(), BadScaler()
with pytest.raises(HTTPException) as exc_info:
make_prediction(DummyModel(), BadScaler(), arr)
make_prediction(model, scaler, arr)
assert exc_info.value.status_code == 500


Expand Down