pygmt.binstats: Validate the quantile_value parameter#4332
Merged
seisman merged 11 commits intoGenericMappingTools:mainfrom Jan 16, 2026
Merged
pygmt.binstats: Validate the quantile_value parameter#4332seisman merged 11 commits intoGenericMappingTools:mainfrom
seisman merged 11 commits intoGenericMappingTools:mainfrom
Conversation
This commit adds input validation for quantile value, specifically that it is a number, and that it is between 0 and 100. It also adds testing for these changes, including modifying test_binstats_quantile() to pass a numeric value as a string.
seisman
reviewed
Jan 11, 2026
seisman
reviewed
Jan 11, 2026
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
seisman
reviewed
Jan 13, 2026
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
This updates the input validation to use separate error messages depending on the quantile_value input. Additionally, it combines two tests by parametrizes the invalid input values.
seisman
reviewed
Jan 15, 2026
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
…e_value input validation in test_binstats.py Modify the pytest parametrize decorator to include both an error type and invalid quantile_value input to test for the different error types in conjunction with the invalid input.
seisman
reviewed
Jan 15, 2026
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Member
|
/format |
seisman
approved these changes
Jan 16, 2026
seisman
reviewed
Jan 16, 2026
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.
Description of proposed changes
This adds input validation for quantile_value, specifically that it is a number, and that it is between 0 and 100. It also adds testing for this input validations, including modifying test_binstats_quantile() to pass a numeric value as a string.