Skip to content

Conversation

@Gude5
Copy link

@Gude5 Gude5 commented Sep 16, 2025

modified function get_rules_json() to prevent it from key errors and added test

Edit: additionally updated readme, script and tests due to deprecated demo key

@Gude5 Gude5 requested a review from Copilot September 25, 2025 12:37
Copy link

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 removes deprecated demo API key functionality and adds error handling to prevent key errors in the get_rules_json() method. The changes also update tests to handle the deprecated demo key status.

  • Commented out demo key initialization and related code since demo access is no longer available
  • Added error handling to check for 'rules' key existence before processing
  • Updated tests to explicitly use the deprecated demo key and handle error scenarios

Reviewed Changes

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

File Description
valhallaAPI/valhalla.py Commented out demo key usage and added 'rules' key check in get_rules_json()
tests/test_basic.py Updated to use explicit deprecated demo key and added test for invalid key scenario
README.md Added notice about deprecated demo API key availability

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

## Demo Access

> Important: The demo API key is not available and demo access is not possible anymore. Hence, the following section and everything regarding the given demo API key is outdated.
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this too broad?

The demo key is still very much supported and working; only the access to the rule info endpoint has been disabled for the demo key.

Same for changes below.

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.

2 participants