Skip to content
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

Add float, int range and choice types to vpype_cli API #430

Merged
merged 2 commits into from
Mar 27, 2022
Merged

Conversation

abey79
Copy link
Owner

@abey79 abey79 commented Mar 27, 2022

Description

  • Added vpype_cli.FloatType() (for float argument)
  • Added vpype_cli.IntRangeType() (based on click.IntRange())
  • Added vpype_cli.ChoiceType() (based on click.Choice())
  • Fixed argument processing code not converting exceptions to BadParameter

Fixes #411

Checklist

  • feature/fix implemented
  • code formatting ok (black and isort)
  • mypy returns no error
  • tests added/updated and pytest succeeds
  • documentation added/updated
    • command docstring and option/argument help
    • README.md updated (Feature Overview)
    • CHANGELOG.md updated
    • added new command to reference.rst
    • RTD doc updated and building with no error (make clean && make html in docs/)

- Added `vpype_cli.FloatType()` (for float argument)
- Added `vpype_cli.IntRangeType()` (based on `click.IntRange()`)
- Added `vpype_cli.ChoiceType()` (based on `click.Choice()`)
- Fixed argument processing code not converting exceptions to BadParameter
@codecov
Copy link

codecov bot commented Mar 27, 2022

Codecov Report

Merging #430 (8d8f820) into master (76e2f4e) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #430      +/-   ##
==========================================
+ Coverage   93.87%   93.93%   +0.06%     
==========================================
  Files          59       60       +1     
  Lines        5222     5276      +54     
  Branches      766      774       +8     
==========================================
+ Hits         4902     4956      +54     
  Misses        204      204              
  Partials      116      116              
Impacted Files Coverage Δ
tests/test_types.py 100.00% <100.00%> (ø)
vpype_cli/state.py 95.58% <100.00%> (+0.20%) ⬆️
vpype_cli/types.py 89.85% <100.00%> (+0.96%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 76e2f4e...8d8f820. Read the comment docs.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@abey79 abey79 merged commit b3907ed into master Mar 27, 2022
@abey79 abey79 deleted the feature-types branch March 27, 2022 17:02
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.

vpype_cli: add FloatType, IntRangeType, ChoiceType
1 participant