-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_env.ps1
More file actions
45 lines (35 loc) · 1.63 KB
/
setup_env.ps1
File metadata and controls
45 lines (35 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# PowerShell script to set up the development environment on Windows
Write-Host "Setting up Polymer Prediction development environment..." -ForegroundColor Green
# Check if Python is installed
try {
$pythonVersion = python --version
Write-Host "Found Python: $pythonVersion" -ForegroundColor Green
} catch {
Write-Host "Python not found. Please install Python 3.8 or higher." -ForegroundColor Red
exit 1
}
# Create virtual environment
Write-Host "Creating virtual environment..." -ForegroundColor Yellow
python -m venv venv
# Activate virtual environment
Write-Host "Activating virtual environment..." -ForegroundColor Yellow
& .\venv\Scripts\Activate.ps1
# Upgrade pip
Write-Host "Upgrading pip..." -ForegroundColor Yellow
python -m pip install --upgrade pip
# Install the package with development dependencies
Write-Host "Installing package with development dependencies..." -ForegroundColor Yellow
pip install -e ".[dev,docs]"
# Install pre-commit hooks
Write-Host "Installing pre-commit hooks..." -ForegroundColor Yellow
pre-commit install
# Create necessary directories
Write-Host "Creating project directories..." -ForegroundColor Yellow
New-Item -ItemType Directory -Force -Path "data", "logs", "outputs", "runs"
# Generate sample data
Write-Host "Generating sample data..." -ForegroundColor Yellow
python scripts/setup_data.py --n_samples 100 --split
Write-Host "Setup complete!" -ForegroundColor Green
Write-Host "To activate the environment in the future, run: .\venv\Scripts\Activate.ps1" -ForegroundColor Cyan
Write-Host "To run tests: make test" -ForegroundColor Cyan
Write-Host "To train a model: make train" -ForegroundColor Cyan