- **Migration to uv package manager**: Replace pip/requirements with modern pyproject.toml - Add pyproject.toml with complete dependency management - Update all scripts and Makefile to use uv commands - Maintain backward compatibility with existing workflows - **PostgreSQL integration and migration tools**: - Enhanced config.py with automatic password URL encoding - Complete PostgreSQL setup scripts and documentation - High-performance SQLite to PostgreSQL migration tool (91x speed improvement) - Support for both connection strings and individual components - **Executable distribution system**: - PyInstaller integration for standalone .exe creation - Automated build scripts with batch file generation - Complete packaging system for end-user distribution - **Enhanced data management**: - Fix --fill-gaps command with proper method implementation - Add gap detection and historical data backfill capabilities - Implement data update functionality for existing records - Add comprehensive database adapter methods - **Developer experience improvements**: - Password encoding tools for special characters - Interactive setup wizards for PostgreSQL configuration - Comprehensive documentation and migration guides - Automated testing and validation tools 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
1.2 KiB
Bash
46 lines
1.2 KiB
Bash
#!/bin/bash
|
|
# Setup script for uv-based development environment
|
|
|
|
set -e
|
|
|
|
echo "🚀 Setting up Northern Thailand Ping River Monitor with uv..."
|
|
|
|
# Check if uv is installed
|
|
if ! command -v uv &> /dev/null; then
|
|
echo "❌ uv is not installed. Please install it first:"
|
|
echo " curl -LsSf https://astral.sh/uv/install.sh | sh"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ uv found: $(uv --version)"
|
|
|
|
# Initialize uv project if not already initialized
|
|
if [ ! -f "uv.lock" ]; then
|
|
echo "🔧 Initializing uv project..."
|
|
uv sync
|
|
else
|
|
echo "📦 Syncing dependencies with uv..."
|
|
uv sync
|
|
fi
|
|
|
|
# Install pre-commit hooks
|
|
echo "🎣 Installing pre-commit hooks..."
|
|
uv run pre-commit install
|
|
|
|
# Create .env file if it doesn't exist
|
|
if [ ! -f ".env" ] && [ -f ".env.example" ]; then
|
|
echo "📝 Creating .env file from template..."
|
|
cp .env.example .env
|
|
echo "⚠️ Please edit .env file with your configuration"
|
|
fi
|
|
|
|
echo "✅ Setup complete!"
|
|
echo ""
|
|
echo "📚 Quick start commands:"
|
|
echo " make install-dev # Install all dependencies"
|
|
echo " make run-test # Run a test cycle"
|
|
echo " make run-api # Start the web API"
|
|
echo " make test # Run tests"
|
|
echo " make lint # Check code quality"
|
|
echo ""
|
|
echo "🎉 Happy monitoring!" |