diff --git a/setup.bat b/setup.bat index 83bd68e..a002254 100644 --- a/setup.bat +++ b/setup.bat @@ -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. diff --git a/setup.sh b/setup.sh index cd5565b..6c53b52 100644 --- a/setup.sh +++ b/setup.sh @@ -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." diff --git a/tests/test_predict.py b/tests/test_predict.py index ef00386..de369ab 100644 --- a/tests/test_predict.py +++ b/tests/test_predict.py @@ -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