This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Dagster-based data orchestration system for scientific data harvesting and processing, specifically designed for the EarthCube community. The system uses containerized workflows to run Gleaner (data harvesting) and Nabu (data processing) tools for indexing websites with JSON-LD structured data.
- Dagster 1.7.10+ - Main orchestration framework using Software Defined Assets (SDA) pattern
- Python 3.11 - Primary language
- PostgreSQL 13.3 - Dagster backend database
- Docker/Docker Compose - Containerization and deployment
- MinIO/S3 - Object storage for configurations and data
- Blazegraph - RDF triplestore for graph data storage
- earthcube-utilities - Custom library for EarthCube-specific functionality
# Set up environment
export $(cat dagster/implnets/deployment/.env | xargs)
# Run Dagster development server
cd dagster/implnets
dagster dev
# Run specific workflow modules
cd dagster/implnets/workflows/tasks
dagster devcd dagster/implnets/deployment
cp envFile.env .env
# Edit .env file with your configuration
./dagster_localrun.sh
# Access Dagster UI at http://localhost:3000# Materialize specific assets
python -m dagster asset materialize -m tasks --select task/source_list,task/loadstatsHistory
# Execute jobs with partitions
dagster job execute eco_summon_and_release_job --partition geocodes_demo_data# Run tests (uses pytest framework)
cd dagster/implnets/workflows/[workflow_name]
pytest tests/- workflows/ingest/ - Data ingestion pipelines using Gleaner tool
- workflows/tasks/ - Scheduled processing tasks using Nabu tool
- workflows/ecrr/ - Earth Cube Resource Registry specific workflows
- workflows/tutorial/ - Example/tutorial workflows
- dagster-dagit - Web UI (port 3000)
- dagster-daemon - Background scheduler and sensor manager
- dagster-code-ingest - Ingest workflow container
- dagster-code-tasks - Tasks workflow container
- dagster-postgres - Metadata storage
- headless - Chrome headless for web scraping
- Configurable namespaces in graph database
- Tenant-specific configurations via
tenant.yaml - Organization-based data isolation
dagster/implnets/deployment/.env- Environment variables (50+ required)dagster/implnets/configs/gleanerconfig.yaml- Data source definitionsdagster/implnets/configs/tenant.yaml- Community/organization definitionsdagster/implnets/configs/nabuconfig.yaml- Data processing configuration
dagster/implnets/workspace.yaml- Workspace definitiondagster/implnets/dagster.yaml- Instance configuration
dagster/implnets/deployment/compose_local.yaml- Local developmentdagster/implnets/deployment/compose_project.yaml- Production stack- Environment-specific override files available
- Configuration Monitoring - S3 sensors detect changes to config files
- Data Harvesting - Gleaner tool scrapes websites for JSON-LD data
- Data Processing - Nabu tool transforms and validates data
- Graph Loading - Data loaded into Blazegraph triplestore
- Statistics & Reports - Generate usage and processing reports
dagster/implnets/
├── workflows/ # Core workflow modules
│ ├── ingest/ # Data ingestion (Gleaner)
│ ├── tasks/ # Processing tasks (Nabu)
│ ├── ecrr/ # Resource registry workflows
│ └── tutorial/ # Examples
├── deployment/ # Docker deployment configs
├── configs/ # Configuration files
├── shared/ # Shared utilities
└── build/ # Docker build files
traefik_proxy- External network for routingheadless_gleanerio- Headless browser network
dagster-postgres- PostgreSQL data persistence
- MinIO/S3 credentials and endpoints
- Graph database URLs and namespaces
- Docker/Portainer API configuration
- Gleaner/Nabu tool configurations
- Slack notification settings
- If workflows show as "not working" in UI, regenerate code using the pygen/makefile approach
- Network creation failures: Check Docker swarm status and existing networks
- Missing environment file: Copy and edit
envFile.envto.env
- Dagster UI provides pipeline status and logs
- Slack integration for failure notifications
- Comprehensive logging stored in S3
- Asset lineage tracking through Dagster's dependency graph