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

Check User Input For Validity #30

Open
kb1lqc opened this issue Mar 11, 2018 · 4 comments
Open

Check User Input For Validity #30

kb1lqc opened this issue Mar 11, 2018 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@kb1lqc
Copy link
Member

kb1lqc commented Mar 11, 2018

Per #29 the software should check for user input validity and essentially sanitize input.

@kb1lqc kb1lqc added the enhancement New feature or request label Mar 11, 2018
@kb1lqc kb1lqc self-assigned this Mar 11, 2018
@kb1lqc
Copy link
Member Author

kb1lqc commented Mar 11, 2018

Taking some pointers from http://www.tldp.org/LDP/LG/issue83/evans.html

kb1lqc added a commit to kb1lqc/faradayio-cli that referenced this issue Mar 11, 2018
* Added checkUserInput()
* Checked callsign
* Checked ID
* Checked IP Address
kb1lqc added a commit to kb1lqc/faradayio-cli that referenced this issue Mar 11, 2018
* Added baud rate value and type checking
* Changed argparse input type to integer
kb1lqc added a commit to kb1lqc/faradayio-cli that referenced this issue Mar 11, 2018
* Went back and added helpful information for each exception where
possible to indicate to user what happened.
* Updated some value checking to be more pythonic
kb1lqc added a commit to kb1lqc/faradayio-cli that referenced this issue Mar 11, 2018
* Check that the serial port path is a string
kb1lqc added a commit to kb1lqc/faradayio-cli that referenced this issue Mar 11, 2018
* Check for integer and NoneType values, however, Nonetype is currently
impossible to get per design of argparse options
* Check for integer value creater than or equal to zero
kb1lqc added a commit to kb1lqc/faradayio-cli that referenced this issue Mar 11, 2018
…ead timeout

* Added writetimeout checks similar to readtimeout
* Fixed read timeout notes to remove copy/paste errors
@kb1lqc
Copy link
Member Author

kb1lqc commented Mar 11, 2018

Keeping open until unit testing checks the input values and until the timeout values are properly handled by argparse

@kb1lqc
Copy link
Member Author

kb1lqc commented Mar 11, 2018

🚨 Ahh I still need to add in the baud rate values to the --help options.

@kb1lqc
Copy link
Member Author

kb1lqc commented Mar 11, 2018

🚨 Ahh I need to accept timeouts that are floats as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant