Centralizes parameter utilities & fixes parameter bugs#127
Merged
Conversation
Contributor
aaront
commented
Aug 6, 2025
- Centralizes parameter utilities
- Fixes issue when using Python snake_case for resultsLimit
- Cleans up imports
Fixes issue when using Python snake_case for resultsLimit Cleans up imports
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Cleans up some handling code for snake_case variant parameters Adds tests for the above
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR centralizes parameter utilities into a new parameters.py module and fixes a bug with Python snake_case parameter naming for resultsLimit. The changes improve code organization by consolidating parameter processing logic and ensure consistent handling of both camelCase and snake_case parameter formats.
Key changes:
- Creates new
mygeotab/parameters.pymodule with centralized parameter utilities - Fixes bug where
results_limit(snake_case) wasn't properly converted toresultsLimit - Updates imports to use relative imports and removes duplicate code
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
mygeotab/parameters.py |
New module containing centralized parameter utilities including camelcaseify_parameters and convert_get_parameters functions |
tests/test_parameters.py |
Comprehensive test suite for the new parameter utilities covering various scenarios |
mygeotab/api.py |
Refactored to use centralized parameter functions and removed duplicate process_parameters function |
mygeotab/api_async.py |
Updated to use centralized parameter functions and improved imports |
mygeotab/cli.py |
Updated imports to use relative imports and removed unused imports |
mygeotab/serializers.py |
Changed to relative import |
pyproject.toml |
Removed Black configuration and added Ruff formatting options |
| Various files | Code formatting improvements and import cleanup |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #127 +/- ##
==========================================
+ Coverage 56.85% 57.09% +0.23%
==========================================
Files 8 9 +1
Lines 540 543 +3
Branches 94 97 +3
==========================================
+ Hits 307 310 +3
+ Misses 213 212 -1
- Partials 20 21 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.