Skip to content

Conversation

@lsabor
Copy link
Contributor

@lsabor lsabor commented Dec 17, 2025

add support for setting METACULUS_API_BASE_URL
small fix to scaling value interpretation

small fix to scaling value interpretation
Copilot AI review requested due to automatic review settings December 17, 2025 23:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for configuring the Metaculus API base URL via an environment variable and improves error handling for parsing numeric bounds from API JSON responses.

  • Introduces METACULUS_API_BASE_URL environment variable support for flexible API endpoint configuration
  • Replaces assertions with explicit type conversion and error handling when parsing numeric bounds from API responses

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
forecasting_tools/helpers/metaculus_client.py Adds API_BASE_URL constant from environment variable and uses it as default parameter
forecasting_tools/data_models/questions.py Replaces assertions with try-except block and explicit float conversion for bounds parsing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@CodexVeritas CodexVeritas merged commit 6ce4fe6 into main Dec 19, 2025
2 checks passed
@CodexVeritas CodexVeritas deleted the quickfix/backend-url-setting branch December 19, 2025 03:36
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.

3 participants