Skip to content

Add OpenF1 plugin#85

Merged
clarkd merged 5 commits into
mainfrom
work/dc/openf1-plugin
Jul 7, 2026
Merged

Add OpenF1 plugin#85
clarkd merged 5 commits into
mainfrom
work/dc/openf1-plugin

Conversation

@clarkd

@clarkd clarkd commented Jul 6, 2026

Copy link
Copy Markdown
Member

🔌 Plugin overview

  • Plugin name: OpenF1
  • Purpose / problem solved: Brings Formula 1 timing data from the free, open OpenF1 API into SquaredUp. Indexes race weekends (meetings), sessions, and the current driver grid, and ships dashboards for session results, lap times, pit stops, tyre stints, weather, race control, overtakes, and drivers'/constructors' championship standings.
  • Primary audience: F1 fans and anyone wanting a worked example of a low-code plugin over a public, unauthenticated REST API.
  • Authentication method(s): None — OpenF1's historical data (2023 onwards) is free and public. A lightweight connectivity check runs on setup; there are no credentials to enter.

🖼️ Plugin screenshots

image image image

Plugin configuration

No configuration fields (public API); setup only runs a connectivity check.

Default dashboards

  • OpenF1 Overview — drivers' and constructors' championship standings.
  • F1 Meeting — meeting details + its sessions (drilldown to each session).
  • F1 Session — results, session drivers, lap-time chart, tyre stints, pit stops, weather chart, race control, overtakes.
  • F1 Driver — driver details + headshot (embed tile).

🧪 Testing

  • Deployed to a dev tenant and authenticated (no credentials required); the connectionCheck validation step returns 200.
  • Ran a full import: ~100 F1 Meetings, ~490 F1 Sessions, ~20 F1 Drivers (current grid) indexed successfully.
  • Tested every data stream live against the deployed plugin:
    • Scoped streams (session/meeting) verified against two different objects to confirm scoping actually narrows results (not a match-all).
    • Global streams (championship) verified directly.
  • Confirmed driver-number → name/team objectPropertyPath lookups resolve, and that the Session Result and Session Drivers tables drill down to the F1 Driver object.
  • Handled real API quirks found in testing: gap_to_leader can be a string ("+1 LAP"); /pit and some endpoints 404 on sessions with no data; session display names disambiguated by circuit (e.g. Imola vs Monza).

⚠️ Known limitations

  • Rate limit: OpenF1 allows max 3 requests/second.
  • Historical data only: 2023 onwards; real-time/live timing is a paid OpenF1 feature and is not included.
  • High-frequency telemetry omitted: /car_data and /location (~3.7 Hz) would exceed dashboard query limits.
  • Team radio omitted: sparse data; coverage dropped from 2026.
  • Driver names/teams reflect the current grid: the only shared key between timing data and driver details is the car number, so drivers are indexed from the latest session. Historical rows show the number's current driver/team, or no name if the number isn't on the current grid; the per-session Session Drivers tile always shows the exact driver/team for that session.
  • Starting grid: the OpenF1 /starting_grid endpoint returns no data, so it is not included (final positions come from session results).

Full detail in docs/README.md.


📚 Checklist

  • Plugin, datastream and UI naming follow SquaredUp guidelines
  • Logo added
  • One or more dashboards added
  • README added including configuration guidance
  • No secrets or credentials included
  • I agree to the Code of Conduct

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added an OpenF1 v1 integration with built-in dashboards for meetings, sessions, and drivers, including championship standings.
    • Added new OpenF1 v1 data streams for meetings/sessions, championship drivers and teams, session results, laps, stints, pit stops, race control, overtakes, drivers, and weather.
    • Added an OpenF1 connectivity check and corresponding default indexing/scopes for supported entities.
  • Documentation
    • Added OpenF1 v1 documentation describing available dashboards, setup, and limitations.

New community plugin for the free OpenF1 API (https://openf1.org). Indexes F1
meetings, sessions, and the current driver grid, with dashboards for session
results, laps, pit stops, tyre stints, weather, race control, overtakes, and
championship standings. No authentication required (public historical data).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: fc5dba53-fd65-40db-8e70-261ea0317870

📥 Commits

Reviewing files that changed from the base of the PR and between 040135f and 4ddf31d.

📒 Files selected for processing (1)
  • plugins/OpenF1/v1/dataStreams/championshipDrivers.json
💤 Files with no reviewable changes (1)
  • plugins/OpenF1/v1/dataStreams/championshipDrivers.json

📝 Walkthrough

Walkthrough

Adds the OpenF1 v1 plugin metadata, entity types, validation, data streams, indexing, default dashboards, scopes, documentation, and an empty UI config.

Changes

OpenF1 Plugin Implementation

Layer / File(s) Summary
Plugin metadata, config validation, and custom types
plugins/OpenF1/v1/metadata.json, plugins/OpenF1/v1/configValidation.json, plugins/OpenF1/v1/custom_types.json
Defines plugin metadata, a connection check validation step, and custom entity types for meetings, sessions, and drivers.
Core entity data streams
plugins/OpenF1/v1/dataStreams/connectionCheck.json, plugins/OpenF1/v1/dataStreams/meetings.json, plugins/OpenF1/v1/dataStreams/meetingSessions.json, plugins/OpenF1/v1/dataStreams/sessions.json, plugins/OpenF1/v1/dataStreams/drivers.json, plugins/OpenF1/v1/dataStreams/sessionDrivers.json
Defines the connection check and core meeting/session/driver streams with HTTP wiring, matching, sorting, and metadata schemas.
Session timing and stint streams
plugins/OpenF1/v1/dataStreams/laps.json, plugins/OpenF1/v1/dataStreams/stints.json, plugins/OpenF1/v1/dataStreams/pitStops.json
Defines session-scoped lap, stint, and pit stop streams with session key wiring and table-oriented field mappings.
Session status and results streams
plugins/OpenF1/v1/dataStreams/raceControl.json, plugins/OpenF1/v1/dataStreams/weather.json, plugins/OpenF1/v1/dataStreams/overtakes.json, plugins/OpenF1/v1/dataStreams/sessionResult.json
Defines session-scoped race control, weather, overtakes, and session result streams with sorted metadata output.
Championship standings data streams
plugins/OpenF1/v1/dataStreams/championshipDrivers.json, plugins/OpenF1/v1/dataStreams/championshipTeams.json
Defines driver and team championship standings streams with position and points metadata.
Index definitions for indexed object types
plugins/OpenF1/v1/indexDefinitions/default.json
Maps meetings, sessions, and drivers streams to indexed object types with property lists.
Default dashboards, scopes, and manifest
plugins/OpenF1/v1/defaultContent/manifest.json, plugins/OpenF1/v1/defaultContent/scopes.json, plugins/OpenF1/v1/defaultContent/overview.dash.json, plugins/OpenF1/v1/defaultContent/meeting.dash.json, plugins/OpenF1/v1/defaultContent/session.dash.json, plugins/OpenF1/v1/defaultContent/driver.dash.json
Adds a dashboard manifest, scope definitions, and overview, meeting, session, and driver dashboard layouts wired to the new streams.
Documentation and UI config
plugins/OpenF1/v1/docs/README.md, plugins/OpenF1/v1/ui.json
Adds plugin documentation and sets the UI config to an empty array.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding the OpenF1 plugin.
Description check ✅ Passed The description matches the new-plugin template well and includes overview, screenshots, testing, limitations, and checklist details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@clarkd clarkd added the new-plugin Used to PR newly added plugins label Jul 6, 2026
@clarkd clarkd marked this pull request as ready for review July 6, 2026 15:31
@clarkd clarkd requested a review from a team July 6, 2026 15:31

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 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/OpenF1/v1/dataStreams/championshipDrivers.json`:
- Around line 39-51: The role assignment in the championshipDrivers data stream
is reversed: driver_number is marked as the label even though it is the raw
identifier, while driverName is the human-readable field and should carry the
label role. Update the metadata in championshipDrivers.json so driverName is the
label (consistent with connectionCheck and championshipTeams), and move the
id/identifier-style role off driver_number or remove the incorrect label role
from it. Use the driver_number and driverName entries to locate the fix.

In `@plugins/OpenF1/v1/dataStreams/connectionCheck.json`:
- Line 16: The shared session identifier shape is inconsistent: session_key is
currently declared as string in connectionCheck.json while the OpenF1 schema
uses a numeric id. Update the session_key field definitions in
connectionCheck.json and sessions.json to shape number so they match
meetingSessions.json and keep the shared id consistent across the OpenF1 data
stream definitions.

In `@plugins/OpenF1/v1/dataStreams/sessionDrivers.json`:
- Around line 39-83: The metadata for sessionDrivers.json defines full_name
twice, which can cause the label metadata and drilldown source mapping to
conflict. Merge the visible full_name entry and the sourceId/sourceType entry
into a single metadata object in the metadata array, following the same pattern
used by session_name in meetingSessions.json. Make sure the combined full_name
entry keeps the displayName, shape, and role while also including sourceId and
sourceType so the driver link and label both work correctly.

In `@plugins/OpenF1/v1/dataStreams/sessionResult.json`:
- Around line 46-51: The sessionResult metadata has two entries using the same
name driver_number, causing one definition to conflict with the other. Update
the duplicate linked-entity field in the sessionResult data stream to use a
distinct name, matching the pattern used by other linked entities such as
driver_number plus a separate raw/display field name in overtakes.json, and keep
the original label metadata intact. Locate the conflicting entries in the
sessionResult metadata array and rename the raw linked-entity column so it no
longer overrides the existing driver_number label definition.
🪄 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: 204b2f0d-8eeb-4671-8a87-0bd8e22dfd56

📥 Commits

Reviewing files that changed from the base of the PR and between eb6d864 and f2ac527.

⛔ Files ignored due to path filters (1)
  • plugins/OpenF1/v1/icon.svg is excluded by !**/*.svg
📒 Files selected for processing (27)
  • plugins/OpenF1/v1/configValidation.json
  • plugins/OpenF1/v1/custom_types.json
  • plugins/OpenF1/v1/dataStreams/championshipDrivers.json
  • plugins/OpenF1/v1/dataStreams/championshipTeams.json
  • plugins/OpenF1/v1/dataStreams/connectionCheck.json
  • plugins/OpenF1/v1/dataStreams/drivers.json
  • plugins/OpenF1/v1/dataStreams/laps.json
  • plugins/OpenF1/v1/dataStreams/meetingSessions.json
  • plugins/OpenF1/v1/dataStreams/meetings.json
  • plugins/OpenF1/v1/dataStreams/overtakes.json
  • plugins/OpenF1/v1/dataStreams/pitStops.json
  • plugins/OpenF1/v1/dataStreams/raceControl.json
  • plugins/OpenF1/v1/dataStreams/sessionDrivers.json
  • plugins/OpenF1/v1/dataStreams/sessionResult.json
  • plugins/OpenF1/v1/dataStreams/sessions.json
  • plugins/OpenF1/v1/dataStreams/stints.json
  • plugins/OpenF1/v1/dataStreams/weather.json
  • plugins/OpenF1/v1/defaultContent/driver.dash.json
  • plugins/OpenF1/v1/defaultContent/manifest.json
  • plugins/OpenF1/v1/defaultContent/meeting.dash.json
  • plugins/OpenF1/v1/defaultContent/overview.dash.json
  • plugins/OpenF1/v1/defaultContent/scopes.json
  • plugins/OpenF1/v1/defaultContent/session.dash.json
  • plugins/OpenF1/v1/docs/README.md
  • plugins/OpenF1/v1/indexDefinitions/default.json
  • plugins/OpenF1/v1/metadata.json
  • plugins/OpenF1/v1/ui.json

Comment thread plugins/OpenF1/v1/dataStreams/championshipDrivers.json
Comment thread plugins/OpenF1/v1/dataStreams/connectionCheck.json Outdated
Comment thread plugins/OpenF1/v1/dataStreams/sessionDrivers.json
Comment thread plugins/OpenF1/v1/dataStreams/sessionResult.json
clarkd and others added 3 commits July 6, 2026 17:34
- sessionResult: merge duplicate driver_number metadata into one entry
  (keeps Car Number label + F1 Driver drilldown)
- sessionDrivers: merge duplicate full_name metadata into one entry
  (keeps Driver label + F1 Driver drilldown)
- connectionCheck, sessions: session_key shape string -> number to match
  the numeric OpenF1 id and meetingSessions

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Driver # column now links through to the F1 Driver object, consistent
with the session result and drivers tables. (championshipTeams has no
indexed object to drill to.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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/OpenF1/v1/dataStreams/championshipDrivers.json`:
- Around line 43-45: The data-stream contract in championshipDrivers.json has
changed, so the OpenF1 plugin version metadata must be bumped to match. Update
the version in plugins/OpenF1/v1/metadata.json alongside this stream change,
using the plugin metadata and version fields there so the package/version
reflects the updated contract.
🪄 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: d8b8607f-7dc6-4455-94b2-21a75effd0c3

📥 Commits

Reviewing files that changed from the base of the PR and between 7815426 and 96021d1.

📒 Files selected for processing (1)
  • plugins/OpenF1/v1/dataStreams/championshipDrivers.json

Comment thread plugins/OpenF1/v1/dataStreams/championshipDrivers.json
Drop sourceType from championshipDrivers.driverTeam so it shows the team
name as plain text (resolved via the driver_number lookup) instead of
drilling to the F1 Driver, matching the AutoTask objectPropertyPath pattern.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🧩 Plugin PR Summary

📦 Modified Plugins

  • plugins/OpenF1/v1

📋 Results

Step Status
Validation ✅ Passed
Deployment 🚀 Deployed

🔍 Validation Details

openf1
{
  "valid": true,
  "pluginName": "openf1",
  "pluginType": "hybrid",
  "summary": {
    "Data Streams": 15,
    "Import Definitions": 1,
    "UI Configuration": false,
    "Has Icon": true,
    "Has Default Content": true,
    "Config Validation": true,
    "Custom Types": true
  }
}

@clarkd clarkd merged commit 18219a1 into main Jul 7, 2026
1 check passed
@clarkd clarkd deleted the work/dc/openf1-plugin branch July 7, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-plugin Used to PR newly added plugins

Development

Successfully merging this pull request may close these issues.

2 participants