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

load_from_string parameters are ambiguous #548

Open
sylvlecl opened this issue Dec 5, 2022 · 0 comments
Open

load_from_string parameters are ambiguous #548

sylvlecl opened this issue Dec 5, 2022 · 0 comments

Comments

@sylvlecl
Copy link
Contributor

sylvlecl commented Dec 5, 2022

  • Do you want to request a feature or report a bug?

API clarification

  • What is the current behavior?

load_from_string method expects a "file name" as first parameter, which is surprising for the user, since it does not read the network from a file ...

Behind the scene, the filename is mainly used for selecting the right file format.

  • What is the expected behavior?

It would make more sense to specify the format instead of providing a filename. For example:

pp.network.load_from_string(format='XIIDM', content=...)

At least, the docstring should be clear about the use of that parameter. It's not the case today.

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