NASA Free API Plugin - #88
Conversation
Adds a new SquaredUp plugin for NASA's open data APIs, covering near-Earth asteroid close approaches (NeoWs), space weather alerts (DONKI), tracked satellites (Satellite Situation Center), and the Astronomy Picture of the Day (APOD). - Near-Earth Object: asteroids with a close approach in the current 7-day window, with summary and close-approach-history data streams - Space Weather Notification: DONKI's unified alert feed (solar flares, CMEs, geomagnetic storms, etc.) from the last 30 days - Satellite: ~84 actively tracked spacecraft from NASA's Satellite Situation Center, with a position-over-time data stream (GSE X/Y/Z) built against SSC's unusual Java-serialized JSON format - APOD: today's astronomy picture plus a date-range gallery stream, kept as dashboard-only content (no natural entity to index/drill into) EONET (natural events) was scoped in but dropped: NASA's EONET service mislabels JSON responses with an XML content-type on ~90%+ of requests, which crashes this plugin's response parser with no available workaround. Documented as a known limitation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughChangesThe NASA v1 plugin adds API configuration, custom object types, indexed NEO, space-weather, and satellite data, APOD streams, satellite response processing, documentation, and three default dashboards with scoped views. NASA Plugin
Sequence Diagram(s)sequenceDiagram
participant Dashboard
participant NASADataStream
participant NASAAPI
participant TransformScript
Dashboard->>NASADataStream: request configured NASA data
NASADataStream->>NASAAPI: send API request with api_key
NASAAPI-->>NASADataStream: return NASA response
NASADataStream->>TransformScript: normalize configured responses
TransformScript-->>Dashboard: return dashboard-ready rows
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/NASA/v1/dataStreams/neoFeed.json`:
- Around line 11-15: Update the end_date expression in the NeoWs feed parameters
to add 6 days instead of 7, while preserving the existing ISO date formatting
and start_date behavior.
In `@plugins/NASA/v1/dataStreams/satelliteLocation.json`:
- Line 6: Add "objectLimit": 1 to the satellite location stream configuration
associated with baseDataSourceName "httpRequestScopedSingle", ensuring the
stream enforces a single returned object despite the NASA UI only defining
apiKey.
In `@plugins/NASA/v1/dataStreams/scripts/neoFeed.js`:
- Line 1: Update the `byDate` initialization in `neoFeed.js` to guard against
null or undefined `data`, using the same null-safe pattern as `neoSummary.js` or
optional chaining before accessing `near_earth_objects`.
In `@plugins/NASA/v1/dataStreams/scripts/satelliteLocation.js`:
- Around line 41-49: Guard the coordinate-row construction loop by verifying
that xs[i], ys[i], and zs[i] are all defined before pushing a row; skip
iterations with incomplete coordinate data while retaining the existing
coordinateSystem assignment.
In `@plugins/NASA/v1/metadata.json`:
- Around line 5-7: Replace the email value in the metadata.json author.name
field with the contributor’s corresponding GitHub username or organisation,
keeping the author.type value unchanged.
In `@plugins/NASA/v1/ui.json`:
- Around line 2-9: Update the apiKey field in the UI configuration to use
displayName instead of label, and add the required placeholder and title
properties following the ui.json conventions. Because DEMO_KEY is a valid
default, remove validation.required or set it to false.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 04707802-cb3b-446e-8d4e-26bf4089b1d7
⛔ Files ignored due to path filters (1)
plugins/NASA/v1/icon.svgis excluded by!**/*.svg
📒 Files selected for processing (23)
plugins/NASA/v1/configValidation.jsonplugins/NASA/v1/custom_types.jsonplugins/NASA/v1/dataStreams/apodGallery.jsonplugins/NASA/v1/dataStreams/apodToday.jsonplugins/NASA/v1/dataStreams/donkiNotifications.jsonplugins/NASA/v1/dataStreams/neoCloseApproaches.jsonplugins/NASA/v1/dataStreams/neoFeed.jsonplugins/NASA/v1/dataStreams/neoSummary.jsonplugins/NASA/v1/dataStreams/satelliteLocation.jsonplugins/NASA/v1/dataStreams/satellites.jsonplugins/NASA/v1/dataStreams/scripts/neoFeed.jsplugins/NASA/v1/dataStreams/scripts/neoSummary.jsplugins/NASA/v1/dataStreams/scripts/satelliteLocation.jsplugins/NASA/v1/dataStreams/scripts/satellites.jsplugins/NASA/v1/defaultContent/manifest.jsonplugins/NASA/v1/defaultContent/nearEarthObject.dash.jsonplugins/NASA/v1/defaultContent/overview.dash.jsonplugins/NASA/v1/defaultContent/scopes.jsonplugins/NASA/v1/defaultContent/spaceWeatherNotification.dash.jsonplugins/NASA/v1/docs/README.mdplugins/NASA/v1/indexDefinitions/default.jsonplugins/NASA/v1/metadata.jsonplugins/NASA/v1/ui.json
clarkd
left a comment
There was a problem hiding this comment.
A few small tweaks @BusinessPlatformAutomation but looks awesome! 👾
Co-authored-by: Dave Clarke <02DClarke@gmail.com>
|
@BusinessPlatformAutomation I've made the required changes - if you're happy for me to merge I can get this one in? |
🧩 Plugin PR Summary📦 Modified Plugins
📋 Results
🔍 Validation Details✅
|
Adds a new SquaredUp plugin for NASA's open data APIs, covering near-Earth asteroid close approaches (NeoWs), space weather alerts (DONKI), tracked satellites (Satellite Situation Center), and the Astronomy Picture of the Day (APOD).
EONET (natural events) was scoped in but dropped: NASA's EONET service mislabels JSON responses with an XML content-type on ~90%+ of requests, which crashes this plugin's response parser with no available workaround. Documented as a known limitation.
Switch to the
Previewtab above and select the appropriate PR template to use for this change:Summary by CodeRabbit