Files
semantica/scripts/setup-dev.ps1
T
KaifAhmad1 03b84ab238 docs: Add comprehensive open source project improvements
- Add essential open source files (CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, CHANGELOG.md, CONTRIBUTORS.md)
- Add GitHub issue and PR templates
- Add CI/CD workflows (CI, docs, release, dependabot)
- Add pre-commit hooks configuration
- Add documentation enhancements (architecture, governance, contributing, community)
- Add developer experience scripts (setup-dev, run-tests, format-code, check-code)
- Add community features (SUPPORT.md, .all-contributorsrc)
- Enhance README badges and project metadata
- Update mkdocs.yml navigation structure
2025-11-24 13:30:49 +05:30

51 lines
1.8 KiB
PowerShell

# Development environment setup script for Semantica (PowerShell)
Write-Host "🚀 Setting up Semantica development environment..." -ForegroundColor Cyan
# Check Python version
$pythonVersion = python --version 2>&1
Write-Host "📦 $pythonVersion" -ForegroundColor Green
# Create virtual environment if it doesn't exist
if (-not (Test-Path "venv")) {
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 project in editable mode with dev dependencies
Write-Host "📥 Installing Semantica with dev dependencies..." -ForegroundColor Yellow
pip install -e ".[dev]"
# Install pre-commit hooks
Write-Host "🪝 Installing pre-commit hooks..." -ForegroundColor Yellow
pre-commit install
# Verify installation
Write-Host "✅ Verifying installation..." -ForegroundColor Yellow
python -c "import semantica; print(f'Semantica version: {semantica.__version__}')"
Write-Host ""
Write-Host "✨ Development environment setup complete!" -ForegroundColor Green
Write-Host ""
Write-Host "To activate the virtual environment in the future, run:" -ForegroundColor Cyan
Write-Host " .\venv\Scripts\Activate.ps1" -ForegroundColor White
Write-Host ""
Write-Host "To run tests:" -ForegroundColor Cyan
Write-Host " pytest" -ForegroundColor White
Write-Host ""
Write-Host "To format code:" -ForegroundColor Cyan
Write-Host " black semantica/ tests/" -ForegroundColor White
Write-Host " isort semantica/ tests/" -ForegroundColor White
Write-Host ""
Write-Host "To run all checks:" -ForegroundColor Cyan
Write-Host " pre-commit run --all-files" -ForegroundColor White