Skip to content

pygmt.binstats: Validate the quantile_value parameter#4332

Merged
seisman merged 11 commits intoGenericMappingTools:mainfrom
willschlitzer:quantile_value_check
Jan 16, 2026
Merged

pygmt.binstats: Validate the quantile_value parameter#4332
seisman merged 11 commits intoGenericMappingTools:mainfrom
willschlitzer:quantile_value_check

Conversation

@willschlitzer
Copy link
Contributor

@willschlitzer willschlitzer commented Jan 10, 2026

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.

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 seisman changed the title Add input validation for quantile_value in binstats.py. pygmt.binstats: Validate the quantile_value parameter Jan 11, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Jan 11, 2026
willschlitzer and others added 2 commits January 13, 2026 05:09
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman seisman added this to the 0.19.0 milestone Jan 14, 2026
willschlitzer and others added 3 commits January 14, 2026 14:47
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.
willschlitzer and others added 2 commits January 15, 2026 09:07
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.
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman
Copy link
Member

seisman commented Jan 16, 2026

/format

@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Jan 16, 2026
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Jan 16, 2026
@seisman seisman merged commit 1a2d806 into GenericMappingTools:main Jan 16, 2026
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants