Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e1a0335
Merge pull request #3 from Climate-Vision/feature/api-middleware-audit
Goldokpa Mar 28, 2026
4bddcb3
Merge pull request #4 from Climate-Vision/feature/analytics-statistics
Goldokpa Mar 28, 2026
cea2e6a
docs: add Francis Umo role documentation
Mar 31, 2026
d37cbe7
docs: add Olufemi Taiwo role documentation
Mar 31, 2026
319a88f
Merge pull request #5 from Climate-Vision/docs/francis-role-document
Goldokpa Mar 31, 2026
326f3eb
Merge pull request #6 from Climate-Vision/docs/femi-role-document
Goldokpa Mar 31, 2026
0f4a362
feat(data): GEE tile downloader, band mapping, and cloud masking (#7)
Oshgig Apr 15, 2026
51edfac
feat(inference): make pipeline analysis-aware with dynamic model load…
Oshgig Apr 15, 2026
f2b9373
Merge develop into main: data pipeline + analysis-aware inference
femi23 Apr 15, 2026
1257e7a
feat(api): enforce API key auth with dev bypass, surface is_synthetic…
femi23 Apr 19, 2026
256fbf6
ci: add pytest scaffolding and GitHub Actions workflow
Apr 19, 2026
139ed61
test(models): add UNet and Siamese architecture tests
Godswill-code Apr 19, 2026
0da6c79
docs: add first-time and intermediate contributor issue guides
Goldokpa Apr 19, 2026
ff21090
fix(frontend): correct case-sensitive import paths for Map components
Apr 19, 2026
cf96100
fix(pipeline): remove unnecessary global declaration causing flake8 F824
femi23 Apr 19, 2026
c3d02c1
ci: install system deps before pip install (GDAL, OpenGL)
Apr 19, 2026
f7a7564
ci: remove redundant gdal pip package and simplify system deps
Apr 19, 2026
7c317df
ci: install package in editable mode for pytest
Apr 19, 2026
b8e34ea
feat(data): add dataset, augmentation, and synthetic data modules
Apr 19, 2026
aa643ea
fix(deps): add email-validator for pydantic EmailStr support
Apr 19, 2026
6ac29d1
docs: update Victor's role doc with sprint progress and live CI config
Apr 19, 2026
53f6125
Add Docker Compose setup for full-stack local development
anshjaiswal12 Apr 19, 2026
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
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
venv
__pycache__
*.pyc
*.pyo
.env
.git
.github
node_modules
dist
build
.pytest_cache
*.log
.DS_Store
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .

- name: Lint with flake8
run: |
flake8 src/ --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 src/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Test with pytest
run: |
pytest tests/ -v --tb=short

frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: npm ci

- name: Type check and build
run: npm run build
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ ENV/
!notebooks/*.ipynb

# Data
data/
datasets/
/data/
/datasets/
*.tif
*.tiff
*.h5
Expand Down
28 changes: 27 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,33 @@ We are committed to providing a welcoming and inclusive environment. Please be r

#### First Time Contributors

Look for issues labeled `good first issue` - these are specifically chosen for newcomers.
Look for issues labeled `good first issue` — these are specifically chosen for newcomers.

**Recommended first issues (ready to pick up):**

| Issue | What You'll Learn | Time Estimate |
|-------|-----------------|---------------|
| [#9: Add frontend unit tests](https://github.com/Climate-Vision/ClimateVision/issues/9) | Vitest, React Testing Library, Vite | 2–4 hours |
| [#13: Add Docker Compose](https://github.com/Climate-Vision/ClimateVision/issues/13) | Docker, multi-service orchestration | 3–6 hours |

**How to claim an issue:**
1. Read the issue description and acceptance criteria
2. Comment "I'd like to work on this" — a maintainer will assign you
3. Fork the repo and create a branch: `git checkout -b feature/issue-9-frontend-tests`
4. Open a **draft PR** within 48 hours (even if incomplete) so we can give early feedback

**Need help?** Tag `@Climate-Vision/maintainers` in the issue or open a [Discussion](https://github.com/Climate-Vision/ClimateVision/discussions).

#### Intermediate Contributors

Ready for something meatier? These issues close critical gaps in our production pipeline:

| Issue | Area | Skills You'll Build |
|-------|------|-------------------|
| [#10: Alert delivery worker](https://github.com/Climate-Vision/ClimateVision/issues/10) | Backend | FastAPI BackgroundTasks, SMTP, webhooks |
| [#11: WebSocket real-time updates](https://github.com/Climate-Vision/ClimateVision/issues/11) | Full-stack | FastAPI WebSockets, React hooks, graceful degradation |
| [#12: ONNX Runtime inference](https://github.com/Climate-Vision/ClimateVision/issues/12) | MLOps | ONNX Runtime, PyTorch export, latency benchmarking |
| [#14: Carbon analytics API](https://github.com/Climate-Vision/ClimateVision/issues/14) | Analytics | Feature flags, API schema design, geospatial math |

#### Development Process

Expand Down
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM python:3.10-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*

# Copy requirements
COPY requirements.txt .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy source code
COPY . .

# Install project in editable mode so climatevision module is available
RUN pip install -e .

EXPOSE 8000

# Set environment variable to ensure python output is not buffered
ENV PYTHONUNBUFFERED=1
ENV OMP_NUM_THREADS=1

# Run the FastAPI server
CMD ["uvicorn", "climatevision.api.main:app", "--host", "0.0.0.0", "--port", "8000"]
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ pip install -r requirements.txt

## Quickstart

### Docker Compose (Recommended)

The easiest way to run the full stack is using Docker Compose:

1. Copy the environment variables:
```bash
cp .env.example .env
cp frontend/.env.example frontend/.env
```
2. Start the environment:
```bash
docker-compose up -d --build # or docker compose up -d --build
```
3. Access the application:
- Frontend: [http://localhost:5173](http://localhost:5173) (or `http://localhost:3000`)
- Backend API Docs: [http://localhost:8000/docs](http://localhost:8000/docs)

### Manual Setup

**Start the API server:**

```bash
Expand Down
33 changes: 33 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: "3.8"

services:
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
- .:/app
environment:
- PYTHONUNBUFFERED=1
env_file:
- .env
restart: unless-stopped

frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "5173:5173"
# Expose on 3000 as well in case it's overridden
- "3000:3000"
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- BACKEND_URL=http://backend:8000
depends_on:
- backend
restart: unless-stopped
6 changes: 6 additions & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
dist
build
.env
.DS_Store
*.log
17 changes: 17 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:18-alpine

WORKDIR /app

# Copy package files
COPY package.json package-lock.json* ./

# Install dependencies
RUN npm install

# Copy source code
COPY . .

EXPOSE 5173 3000

# Run dev server and bind to all network interfaces
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
2 changes: 1 addition & 1 deletion frontend/src/pages/NewAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom'
import { Loader2 } from 'lucide-react'
import type { AnalysisType } from '../api'
import { predictJson } from '../api'
import { MapBBoxPicker } from '../components/map/MapBBoxPicker'
import { MapBBoxPicker } from '../components/Map/MapBBoxPicker'
import { AnalysisTypeSelector } from '../components/ui/AnalysisTypeSelector'
import { ResultsPanel } from '../components/results/ResultsPanel'
import { ErrorBoundary } from '../components/ui/ErrorBoundary'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CloudUpload, FileText, X, ChevronDown, ChevronUp, Loader2 } from 'lucid
import type { AnalysisType } from '../api'
import { predictUpload } from '../api'
import { AnalysisTypeSelector } from '../components/ui/AnalysisTypeSelector'
import { MapBBoxPicker } from '../components/map/MapBBoxPicker'
import { MapBBoxPicker } from '../components/Map/MapBBoxPicker'
import { ErrorBoundary } from '../components/ui/ErrorBoundary'
import { useToast } from '../contexts/ToastContext'
import { useApp } from '../contexts/AppContext'
Expand Down
2 changes: 1 addition & 1 deletion frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
strictPort: true,
proxy: {
'/api': {
target: 'http://127.0.0.1:8000',
target: process.env.BACKEND_URL || 'http://127.0.0.1:8000',
changeOrigin: true,
},
},
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ scikit-learn>=1.0.0

# Geospatial Data Processing
rasterio>=1.3.0
gdal>=3.4.0
geopandas>=0.12.0
shapely>=2.0.0
pyproj>=3.4.0
Expand Down Expand Up @@ -40,6 +39,7 @@ dask[complete]>=2023.1.0
fastapi>=0.95.0
uvicorn[standard]>=0.20.0
pydantic>=2.0.0
email-validator>=2.0.0
python-multipart>=0.0.5

# MLOps (optional)
Expand Down
Loading
Loading