Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "AHGD V3: Real Data Processing Environment",
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",

"features": {
"ghcr.io/devcontainers/features/python:1": {
"version": "3.11",
"installTools": true
},
"ghcr.io/devcontainers/features/git:1": {
"ppa": true,
"version": "latest"
}
},

"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.analysis.typeCheckingMode": "basic",
"files.watcherExclude": {
"**/real_data/**": true,
"**/data/**": true,
"**/cache/**": true,
"**/*.parquet": true,
"**/*.db": true
}
},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-vscode.vscode-json",
"redhat.vscode-yaml"
]
}
},

"containerEnv": {
"PYTHONPATH": "/workspaces/AHGD/src",
"AHGD_ENV": "cloud_processing",
"POLARS_MAX_THREADS": "4"
},

"postCreateCommand": "bash .devcontainer/setup.sh",

"mounts": [
"source=ahgd-data-volume,target=/tmp/ahgd_data,type=volume"
],

"remoteUser": "vscode"
}
76 changes: 76 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/bin/bash
set -e

echo "🚀 Setting up AHGD V3 Real Data Processing Environment"
echo "=================================================="

# Update system packages
echo "📦 Updating system packages..."
sudo apt-get update -y
sudo apt-get install -y \
build-essential \
curl \
git \
htop \
tree \
unzip \
wget

# Install Python dependencies
echo "🐍 Installing Python dependencies..."
pip install --upgrade pip
pip install -r requirements.txt

# Install additional geospatial libraries for real boundary data
echo "🗺️ Installing geospatial libraries..."
pip install geopandas folium contextily

# Create data processing directories
echo "📁 Creating data processing directories..."
mkdir -p /tmp/ahgd_data
mkdir -p /tmp/processed_data
mkdir -p /tmp/exports

# Set up environment variables
echo "⚙️ Setting up environment..."
echo "export PYTHONPATH=/workspaces/AHGD/src" >> ~/.bashrc
echo "export AHGD_DATA_DIR=/tmp/ahgd_data" >> ~/.bashrc
echo "export POLARS_MAX_THREADS=4" >> ~/.bashrc

# Create quick-start script for real data processing
echo "📝 Creating real data processing quick-start..."
cat > /workspaces/AHGD/start_cloud_processing.sh << 'EOF'
#!/bin/bash
echo "🇦🇺 AHGD V3: Real Australian Government Data Processing"
echo "====================================================="
echo ""
echo "📊 Available Commands:"
echo " 1. Download real data: python real_data_pipeline.py"
echo " 2. Process with Polars: python process_real_data.py"
echo " 3. Run performance tests: python src/performance/benchmark_suite.py"
echo " 4. Full pipeline report: python full_pipeline_report.py"
echo ""
echo "💾 Storage locations:"
echo " - Raw data: /tmp/ahgd_data"
echo " - Processed data: /tmp/processed_data"
echo " - Exports: /tmp/exports"
echo ""
echo "🎯 Next step: python real_data_pipeline.py --priority=1"
echo ""
EOF

chmod +x /workspaces/AHGD/start_cloud_processing.sh

# Display environment info
echo ""
echo "✅ AHGD V3 Environment Setup Complete!"
echo "======================================"
echo "🐍 Python: $(python --version)"
echo "📦 Pip: $(pip --version)"
echo "🗄️ Storage: $(df -h /tmp | tail -1 | awk '{print $4}') available in /tmp"
echo "🧠 Memory: $(free -h | awk '/^Mem:/ {print $2}') total RAM"
echo "⚙️ CPU cores: $(nproc) cores"
echo ""
echo "🚀 Ready to process real Australian government data!"
echo " Run: ./start_cloud_processing.sh"
echo ""
186 changes: 157 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# ============================================
# AHGD V3: Comprehensive .gitignore
# Keep only source code, exclude ALL data
# ============================================

# Python-generated files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -31,62 +36,185 @@ ENV/
env.bak/
venv.bak/

# IDE
# IDE and editors
.vscode/
.idea/
*.swp
*.swo
*~
.sublime-project
.sublime-workspace

# Jupyter Notebook
.ipynb_checkpoints
*.ipynb_checkpoints/

# Data files (keep structure but ignore actual data)
data/raw/*.csv
data/raw/*.xlsx
data/raw/*.json
data/raw/*.parquet
data/processed/*.csv
data/processed/*.xlsx
data/processed/*.json
data/processed/*.parquet

# Large data files (>100MB) - GitHub limit
data/raw/demographics/2021_GCP_AUS_SA2.zip
data/raw/demographics/2021_GCP_NSW_SA2.zip
data/raw/health/mbs_demographics_historical_1993_2015.zip
docs/assets/initial_map.html
# ============================================
# DATA FILES - EXCLUDE ALL REAL DATA
# ============================================

# Real government data downloads (MASSIVE FILES)
real_data/
real_data/**/*
*.zip
*.tar
*.gz
*.7z
*.rar

# All data directories and caches
data/
data/**/*
cache/
cache/**/*
outputs/
outputs/**/*

# Parquet storage (can be hundreds of MB)
data/demo_polars_cache/
data/benchmark_cache/
data/parquet_store/
data/test_storage/
*.parquet

# Large zip files and downloads
data/raw/**/*.zip
data/raw/**/*.7z
data/raw/**/*.gz
# DuckDB databases
*.db
*.duckdb
health_analytics.db
health_data_polars.duckdb

# Large HTML visualisations (>50MB)
# Performance and monitoring data
performance_metrics.db
benchmark_results.json

# ============================================
# GENERATED FILES AND OUTPUTS
# ============================================

# Large HTML visualizations
docs/assets/initial_map.html
docs/initial_map.html
*.html

# Logs
*.log
logs/*.log
# Generated documentation
docs/generated/

# OS
# Temporary processing files
*.tmp
*.temp
temp/
tmp/

# Excel and CSV files (could be large datasets)
*.xlsx
*.xls
*.csv

# JSON data files (not config)
data*.json
results*.json
export*.json

# ============================================
# SYSTEM AND OS FILES
# ============================================

# macOS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes

# Windows
ehthumbs.db
Thumbs.db
Desktop.ini

# Linux
.directory

# ============================================
# DEVELOPMENT AND DEPLOYMENT
# ============================================

# Environment variables
.env
.env.local
.env.*.local
.user.yml

# Logs and monitoring
*.log
logs/
logs/**/*

# Streamlit
.streamlit/

# Temporary files
*.tmp
*.temp
docs/assets/initial_map.html
# Docker volumes and data
volumes/
docker-data/

# DVC (Data Version Control)
.dvc/
*.dvc

# DLT (Data Load Tool) state
.dlt/
.dlt/**/*

# DBT (Data Build Tool)
dbt_packages/
target/
logs/
profiles.yml

# ============================================
# SPECIFIC TO THIS PROJECT
# ============================================

# Large Australian Census files
*Census*.csv
*census*.csv
2021_GCP_*.csv

# Geographic boundary files (shapefiles are large)
*.shp
*.shx
*.dbf
*.prj

# Any government data extracts
*_extract_*
*_raw_*
*government_data*

# Test and sample data that might be large
sample_*.parquet
test_*.csv
demo_*.db

# Architecture diagrams and large assets
architecture_*.png
diagram_*.svg

# Backup and archive files
*.bak
*.backup
archive/
backup/

# ============================================
# KEEP ONLY SOURCE CODE AND CONFIGS
# ============================================
# This gitignore is designed to keep:
# - Python source code (*.py)
# - Configuration files (*.yml, *.yaml, *.toml)
# - Documentation (*.md)
# - Requirements (requirements.txt, pyproject.toml)
# - Docker configs (Dockerfile*, docker-compose*)
# - CI/CD configs (.github/)
# - Small sample configs and schemas
# ============================================
PRPs/
Loading