-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·87 lines (75 loc) · 2.19 KB
/
install.sh
File metadata and controls
executable file
·87 lines (75 loc) · 2.19 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
# Installation script for Semantic Model Data Mapper
set -e # Exit on error
echo "=========================================="
echo "Semantic Model Data Mapper - Installation"
echo "=========================================="
echo ""
# Check Python version
echo "Checking Python version..."
python_version=$(python3 --version 2>&1 | awk '{print $2}')
required_version="3.11"
if ! python3 -c "import sys; exit(0 if sys.version_info >= (3, 11) else 1)"; then
echo "❌ Error: Python 3.11+ is required. Found: $python_version"
exit 1
fi
echo "✓ Python version: $python_version"
echo ""
# Create virtual environment
echo "Creating virtual environment..."
if [ -d "venv" ]; then
echo "Virtual environment already exists. Skipping creation."
else
python3 -m venv venv
echo "✓ Virtual environment created"
fi
echo ""
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
echo "✓ Virtual environment activated"
echo ""
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip > /dev/null 2>&1
echo "✓ pip upgraded"
echo ""
# Install dependencies
echo "Installing dependencies..."
pip install -r requirements.txt
echo "✓ Dependencies installed"
echo ""
# Install package in development mode
echo "Installing rdfmap package..."
pip install -e .
echo "✓ Package installed"
echo ""
# Verify installation
echo "Verifying installation..."
if command -v rdfmap &> /dev/null; then
echo "✓ rdfmap CLI is available"
echo ""
echo "=========================================="
echo "Installation Complete!"
echo "=========================================="
echo ""
echo "Quick Start:"
echo ""
echo "1. Run the mortgage example:"
echo " rdfmap convert \\"
echo " --mapping examples/mortgage/config/mortgage_mapping.yaml \\"
echo " --out ttl output/mortgage.ttl \\"
echo " --validate"
echo ""
echo "2. Run tests:"
echo " pytest"
echo ""
echo "3. View help:"
echo " rdfmap --help"
echo ""
echo "For more information, see README.md and QUICKSTART.md"
echo ""
else
echo "❌ Error: rdfmap command not found. Installation may have failed."
exit 1
fi