Skip to content

Claude/review changes mjux96vr0mz96409 jm0 oo#33

Merged
arandomguyhere merged 5 commits intomainfrom
claude/review-changes-mjux96vr0mz96409-jm0OO
Jan 1, 2026
Merged

Claude/review changes mjux96vr0mz96409 jm0 oo#33
arandomguyhere merged 5 commits intomainfrom
claude/review-changes-mjux96vr0mz96409-jm0OO

Conversation

@arandomguyhere
Copy link
Owner

No description provided.

claude added 5 commits January 1, 2026 19:11
Critical bugs fixed:
- dark_fleet.py: Fix AttributeError when accessing BehaviorEvent.get()
  Now handles both object and dict returns from detect_ais_gaps()
- laden_status.py: Replace bare except with specific ValueError/AttributeError
  Skip invalid timestamps instead of using datetime.now() fallback

Standardization:
- gfw_integration.py: Add missing risk levels (critical, minimal) to match
  other modules - all now use: minimal < 15 < low < 30 < medium < 50 < high < 70 < critical
- venezuela.py: Update STS_ZONE_RADIUS_KM from 20.0 to 25.0 for consistency
- Add analytics_constants.py: Centralized thresholds and scoring weights
  for future consistency across all analytics modules
- Add ports_database.py with 150+ major world ports:
  - Baltic Sea ports (cable incident monitoring)
  - Venezuela/Caribbean (dark fleet operations)
  - Iran/Middle East (sanctions evasion routes)
  - Malaysia/SE Asia (STS transfer hubs)
  - China (destination ports)
  - Russia (shadow fleet origins)
  - Key oil terminals, refineries, STS zones

- Update /api/ports/nearby endpoint:
  - Try Marinesia API first
  - Fallback to built-in database if empty/failed
  - Response includes 'source' field (marinesia/built-in)

Data sourced from World Port Index (US NGA) and UN/LOCODE
- Add dropdown in UI to select port data source:
  - Auto (try Marinesia, fallback to built-in)
  - Marinesia (API only)
  - Built-in (local database only)
- Update /api/ports/nearby to accept source parameter
- Add /api/data-sources endpoint to show available sources
- Display source label in ports results
Configure Marinesia to use environment variable for API key
authentication, consistent with other data sources.
Global Fishing Watch provides historical events (AIS gaps, encounters,
loitering) and vessel identity data for enhanced analytics.
@arandomguyhere arandomguyhere merged commit 0170ae5 into main Jan 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants