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

Include Type Constraints for Input fields #15

Open
samaraaugust opened this issue Aug 2, 2023 · 4 comments
Open

Include Type Constraints for Input fields #15

samaraaugust opened this issue Aug 2, 2023 · 4 comments

Comments

@samaraaugust
Copy link
Contributor

Implement way to appropriately set the input type of the parameters. For example,
image
for the sleep plan I added an array for the time but it should be a number.
For now, the web client allows users to input whatever they want and by using JSON.parse, it parses the string or object into what it best believes the type should be however, there are some limitations to using the function for example the string value 'hey' or `hey` would not be accepted because JSON.parse does not read single quotes or backticks but it allows double quotes. So, finding a better way to parse the object would be significant improvement to the overall logic handling of the web client.

@prjemian
Copy link
Contributor

prjemian commented Aug 4, 2023

JSON: "some text" is stringified as \"some text\"

In other languages, this is called marshalling or serializing.

@prjemian
Copy link
Contributor

prjemian commented Aug 4, 2023

type annotation for the*args in the scan plan might be (ideally)

List[Tuple[object, float, float]]

@prjemian
Copy link
Contributor

prjemian commented Aug 4, 2023

See this python import (which means there is a package for this):

from typing import Optional, Tuple, Type

@prjemian
Copy link
Contributor

prjemian commented Aug 4, 2023

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

No branches or pull requests

2 participants