-
Notifications
You must be signed in to change notification settings - Fork 16
chore: modified function #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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. |
There was a problem hiding this comment.
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.
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