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

Mismatch between docs and Parameters #723

Open
BDonnot opened this issue Mar 11, 2024 · 5 comments
Open

Mismatch between docs and Parameters #723

BDonnot opened this issue Mar 11, 2024 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@BDonnot
Copy link
Contributor

BDonnot commented Mar 11, 2024

Describe the current behavior

After upgrading (from a much older version) to the most recent one (1.3.1) the code I was using does not work any more.

I double check the documentation here, https://pypowsybl.readthedocs.io/en/stable/reference/loadflow/parameters.html but it seems to be outdated.

Describe the expected behavior

A fix of the doc for example.

Describe the steps

import pypowsybl.loadflow as lf
lf.Parameters(voltage_init_mode=None, transformer_voltage_control_on=None, no_generator_reactive_limits=None, phase_shifter_regulation_on=None, twt_split_shunt_admittance=None, simul_shunt=None, read_slack_bus=None, write_slack_bus=None, distributed_slack=None, balance_type=None, dc_use_transformer_ratio=None, countries_to_balance=None, connected_component_mode=None, provider_parameters=None)
# copy paste from the doc https://pypowsybl.readthedocs.io/en/stable/reference/loadflow/parameters.html

raises the error TypeError: __init__() got an unexpected keyword argument 'no_generator_reactive_limits'
once removed i get: TypeError: __init__() got an unexpected keyword argument 'simul_shunt'

I suppose that the no_generator_reactive_limits has been renamed use_reactive_limits but I don't really know how to change the "simul_shunt" unfortunately.

Environment

Linux, ubuntu 20.04 (but not really relevant as it concerns the doc on the website)

Relevant Log Output

See paragraph above.

Extra Information

No response

@BDonnot BDonnot added the bug Something isn't working label Mar 11, 2024
@EtienneLt EtienneLt self-assigned this Mar 12, 2024
@EtienneLt
Copy link
Contributor

no_generator_reactive_limits is as you guessed use_reactive_limits
simul_shunt is now shunt_compensator_voltage_control_on
I will modify the documentation

9283001

@EtienneLt EtienneLt added documentation Improvements or additions to documentation and removed bug Something isn't working labels Mar 12, 2024
@jeandemanged
Copy link
Member

@EtienneLt it seems online documentation was not updated from latest release source code

@EtienneLt
Copy link
Contributor

@jeandemanged yes it seems to be broken, we'll try to fix it

@jeandemanged
Copy link
Member

Hi @BDonnot

I suppose that the no_generator_reactive_limits has been renamed use_reactive_limits but I don't really know how to change the "simul_shunt" unfortunately.

Be careful here it is not just a rename, because it is opposite logic now.

See #709 for migration guide.

@BDonnot
Copy link
Contributor Author

BDonnot commented Mar 12, 2024

Thanks for the precision. I figure it out with the new names but it's nice to have the confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants