feat: support URLs in forecast submissions - #255
Open
Jayashanker-Padishala wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #254
What this does
Adds the
urlfield 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.URL_REQUIRED_AS_OF_DUE_DATE(currently2026-08-01) are rejected ifurlis 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.FORECAST_FILE_METADATA_FIELDSinfunc_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.pycovering: 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, andpydocstyle(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: