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

Make _convert_time public and add funtionalities #2426

Open
priba opened this issue Aug 11, 2023 · 3 comments
Open

Make _convert_time public and add funtionalities #2426

priba opened this issue Aug 11, 2023 · 3 comments
Labels
enhancement New (engineering) enhancements, such as features or API changes.

Comments

@priba
Copy link
Contributor

priba commented Aug 11, 2023

🚀 Feature Request

Allow Time conversions

Motivation

For custom callbacks, it would be nice to expose _convert_time in the API.

Hopefully, it is expose _convert_time in the API. That is _convert_time -> convert_time. And add the conversion type.

I am happy to start a PR about that

@priba priba added the enhancement New (engineering) enhancements, such as features or API changes. label Aug 11, 2023
@mvpatel2000
Copy link
Contributor

Agree! This would be helpful. If you want to open a PR, that would be great. I think it'd be useful to have a state function that exposes this functionality?

@priba priba changed the title Make _convert_time public Make _convert_time public and add funtionalities Aug 11, 2023
@priba
Copy link
Contributor Author

priba commented Aug 11, 2023

I thought on moving the function to core/time.py. What do you mean by state function?

@mvpatel2000
Copy link
Contributor

mvpatel2000 commented Aug 12, 2023

I thought on moving the function to core/time.py.

core/time.py is only classes, so it might be simpler to just leave definitions there.

What do you mean by state function?

Instead, I was thinking of attaching this as a function to class State in core/state.py. The signature would change to no longer take a state as an argument and just use self instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New (engineering) enhancements, such as features or API changes.
Projects
None yet
Development

No branches or pull requests

2 participants