Skip to content

feat: support URLs in forecast submissions - #255

Open
Jayashanker-Padishala wants to merge 1 commit into
forecastingresearch:mainfrom
Jayashanker-Padishala:feat-254-submission-url-field
Open

feat: support URLs in forecast submissions#255
Jayashanker-Padishala wants to merge 1 commit into
forecastingresearch:mainfrom
Jayashanker-Padishala:feat-254-submission-url-field

Conversation

@Jayashanker-Padishala

Copy link
Copy Markdown

Closes #254

What this does

Adds the url field to forecast submissions so organizations can provide their website directly in the submission file.

  • read_forecast_file() (src/orchestration/_io.py) now reads and validates the field: when present it must be an http(s) URL, otherwise the file is rejected with a clear log line.
  • Required going forward, optional for history: non-anonymous submissions whose forecast due date is on or after URL_REQUIRED_AS_OF_DUE_DATE (currently 2026-08-01) are rejected if url is missing. Forecast sets due before that date keep processing without one, so nightly resolution of historical files is unaffected. Happy to adjust the cutoff date to whatever due date you want enforcement to start at.
  • Anonymous submissions are exempt — organizations matching "Anonymous"/"Anonymous N" (same pattern the leaderboard uses) can omit the field.
  • The field is passed through into the processed forecast set via FORECAST_FILE_METADATA_FIELDS in func_resolve/main.py. It is not surfaced anywhere on the website, per the issue.

Tests

Five new contract tests in src/tests/orchestration/test_forecast_file_io.py covering: pass-through of a valid url, rejection of a new non-anonymous submission without url, anonymous exemption, old-forecast-set exemption, and rejection of a non-http(s) url.

python -m pytest src/tests/orchestration/test_forecast_file_io.py → 10/10 pass. black --check, isort --check, flake8, and pydocstyle (repo config) all clean on the changed files.

Wiki

The How to submit wiki page can't be updated via PR; suggested addition to the submission-format section:

url (string, required for non-anonymous submissions) — Your organization's website, e.g. "https://example.org". Must start with http:// or https://. Anonymous submissions may omit this field.

Add an optional `url` field to forecast submission files so organizations
can provide their website directly in the submission:

- read_forecast_file() validates the field when present (must be http(s))
  and rejects non-anonymous submissions without one when the forecast due
  date is on or after URL_REQUIRED_AS_OF_DUE_DATE (2026-08-01), making the
  field required going forward while older forecast sets keep processing
  unchanged.
- Anonymous submissions (organization "Anonymous"/"Anonymous N") are
  exempt.
- The field is passed through to the processed forecast set via
  FORECAST_FILE_METADATA_FIELDS; it is not displayed on the website.

Closes forecastingresearch#254
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.

support URLs in forecast submissions

1 participant