mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-03-04 23:27:46 +01:00
* Add alembic DB schema management (#86) * Use alembic * add creation helper * example migration tool * Store UTC int time in DB (#81) * use UTC int time * Remove old index notes script -- no longer needed * modify alembic to support cleaner migrations * add /version json endpoint * move technical docs * remove old migrate script * add readme in docs: * more doc tidy * rm * update api docs * ignore other database files * health endpoint * alembic log format * break out api calls in to their own file to reduce footprint * ruff and docs * vuln * Improves arguments in mvrun.py * Set dbcleanup.log location configurable * mvrun work * fallback if missing config * remove unused loop * improve migrations and fix logging problem with mqtt * Container using slim/uv * auto build containers * symlink * fix symlink * checkout and containerfile * make /app owned by ap0p * Traceroute Return Path logged and displayed (#97) * traceroute returns are now logged and /packetlist now graphs the correct data for a return route * now using alembic to update schema * HOWTO - Alembic --------- Co-authored-by: Joel Krauska <jkrauska@gmail.com> * DB Backups * backups and cleanups are different * ruff * Docker Docs * setup-dev * graphviz for dot in Container * Summary of 3.0.0 stuff * Alembic was blocking mqtt logs * Add us first/last timestamps to node table too * Worked on /api/packet. Needed to modify - Store.py to read the new time data - api.py to present the new time data - firehose.html chat.html and map.html now use the new apis and the time is the browser local time * Worked on /api/packet. Needed to modify - Store.py to read the new time data - api.py to present the new time data - firehose.html chat.html and map.html now use the new apis and the time is the browser local time * Improves container build (#94) * Worked on /api/packet. Needed to modify - Store.py to read the new time data - api.py to present the new time data - firehose.html chat.html and map.html now use the new apis and the time is the browser local time * Worked on /api/packet. Needed to modify - Store.py to read the new time data - api.py to present the new time data - firehose.html chat.html and map.html now use the new apis and the time is the browser local time * Worked on /api/packet. Needed to modify - Added new api endpoint /api/packets_seen - Modified web.py and store.py to support changes to APIs. - Started to work on new_node.html and new_packet.html for presentation of data. * Worked on /api/packet. Needed to modify - Added new api endpoint /api/packets_seen - Modified web.py and store.py to support changes to APIs. - Started to work on new_node.html and new_packet.html for presentation of data. * Finishing up all the pages for the 3.0 release. Now all pages are functional. * Finishing up all the pages for the 3.0 release. Now all pages are functional. * fix ruff format * more ruff * Finishing up all the pages for the 3.0 release. Now all pages are functional. * Finishing up all the pages for the 3.0 release. Now all pages are functional. * pyproject.toml requirements * use sys.executable * fix 0 epoch dates in /chat * Make the robots do our bidding * another compatibility fix when _us is empty and we need to sort by BOTH old and new * Finishing up all the pages for the 3.0 release. Now all pages are functional. * Finishing up all the pages for the 3.0 release. Now all pages are functional. * Remamed new_node to node. shorter and descriptive. * Remamed new_node to node. shorter and descriptive. * Remamed new_node to node. shorter and descriptive. * Remamed new_node to node. shorter and descriptive. * Remamed new_node to node. shorter and descriptive. * Remamed new_node to node. shorter and descriptive. * More changes... almost ready for release. Ranamed 2 pages for easy or reading. * Fix the net page as it was not showing the date information * Fix the net page as it was not showing the date information * Fix the net page as it was not showing the date information * Fix the net page as it was not showing the date information * ruff --------- Co-authored-by: Óscar García Amor <ogarcia@connectical.com> Co-authored-by: Jim Schrempp <jschrempp@users.noreply.github.com> Co-authored-by: Pablo Revilla <pablorevilla@gmail.com>
85 lines
2.3 KiB
Bash
Executable File
85 lines
2.3 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# setup-dev.sh
|
|
#
|
|
# Development environment setup script for MeshView
|
|
# This script sets up the Python virtual environment and installs development tools
|
|
|
|
set -e
|
|
|
|
echo "Setting up MeshView development environment..."
|
|
echo ""
|
|
|
|
# Check if uv is installed
|
|
if ! command -v uv &> /dev/null; then
|
|
echo "Error: 'uv' is not installed."
|
|
echo "Install it with: curl -LsSf https://astral.sh/uv/install.sh | sh"
|
|
exit 1
|
|
fi
|
|
|
|
# Create virtual environment if it doesn't exist
|
|
if [ ! -d "env" ]; then
|
|
echo "Creating Python virtual environment with uv..."
|
|
uv venv env
|
|
echo "✓ Virtual environment created"
|
|
else
|
|
echo "✓ Virtual environment already exists"
|
|
fi
|
|
|
|
# Install requirements
|
|
echo ""
|
|
echo "Installing requirements..."
|
|
uv pip install -r requirements.txt
|
|
echo "✓ Requirements installed"
|
|
|
|
# Install development tools
|
|
echo ""
|
|
echo "Installing development tools..."
|
|
uv pip install pre-commit pytest pytest-asyncio pytest-aiohttp
|
|
echo "✓ Development tools installed"
|
|
|
|
# Install pre-commit hooks
|
|
echo ""
|
|
echo "Installing pre-commit hooks..."
|
|
./env/bin/pre-commit install
|
|
echo "✓ Pre-commit hooks installed"
|
|
|
|
# Install graphviz check
|
|
echo ""
|
|
if command -v dot &> /dev/null; then
|
|
echo "✓ graphviz is installed"
|
|
else
|
|
echo "⚠ Warning: graphviz is not installed"
|
|
echo " Install it with:"
|
|
echo " macOS: brew install graphviz"
|
|
echo " Debian: sudo apt-get install graphviz"
|
|
fi
|
|
|
|
# Create config.ini if it doesn't exist
|
|
echo ""
|
|
if [ ! -f "config.ini" ]; then
|
|
echo "Creating config.ini from sample..."
|
|
cp sample.config.ini config.ini
|
|
echo "✓ config.ini created"
|
|
echo " Edit config.ini to configure your MQTT and site settings"
|
|
else
|
|
echo "✓ config.ini already exists"
|
|
fi
|
|
|
|
echo ""
|
|
echo "=========================================="
|
|
echo "Development environment setup complete!"
|
|
echo "=========================================="
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo " 1. Edit config.ini with your MQTT settings"
|
|
echo " 2. Run: ./env/bin/python mvrun.py"
|
|
echo " 3. Open: http://localhost:8081"
|
|
echo ""
|
|
echo "Pre-commit hooks are now active:"
|
|
echo " - Ruff will auto-format and fix issues before each commit"
|
|
echo " - If files are changed, you'll need to git add and commit again"
|
|
echo ""
|
|
echo "Run tests with: ./env/bin/pytest tests/"
|
|
echo ""
|