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

GET/results Enabling default start_time and final_time #545

Open
kefeimo opened this issue Jun 14, 2023 · 0 comments
Open

GET/results Enabling default start_time and final_time #545

kefeimo opened this issue Jun 14, 2023 · 0 comments

Comments

@kefeimo
Copy link
Contributor

kefeimo commented Jun 14, 2023

Tag

Feature Required/ User Experience Improvement

Description

As mentioned in

"args = {'point_names':['reaTZon_y'],'start_time':-np.inf, 'final_time':np.inf}\n",
"res = requests.put('{0}/results/{1}'.format(url, testid), data=args).json()['payload']\n",
, to achieve simulation results, we can use the following code snippet.

args = {'point_names':['reaTZon_y'],'start_time':-np.inf, 'final_time':np.inf}
res = requests.put('{0}/results'.format(url), data=args).json()['payload']

Note that we need to use -np.inf and np.inf to specify the whole range of the timestamp. Since np (aka numpy) is not native library of python, it introduces extra dependency.
In addition, arguably, it is easier for a user to get a full timestamp of the simulation result and filter it afterward rather than specifying it beforehand. Plus, it is not clear what would be the available start_time and final_time when using PUT/scenario.

Expected/proposal behavior

When leaving start_time, final_time empty, the RestAPI returns the full timestamp of the simulation result (i.e., set start_time==-np.inf, final_time==np.inf as default)

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

1 participant