pyleecan.Functions.Load.retrocompatibility module

convert_init_dict(init_dict)[source]

Convert an init_dict from an old version of pyleecan to the current one (modification in place)

Parameters:

init_dict (dict) – The dictionnary to update

is_yoke_notch(obj_dict)[source]

Check if the object need to be updated for yoke_notch

move_yoke_notch(obj_dict)[source]

Move all yoke notches to notch property and set notch.is_yoke property to True

is_OP_matrix_dict(obj_dict)[source]

Check if the object need to be updated for OP_matrix

convert_OP_matrix(obj_dict)[source]
is_OP_dict(obj_dict)[source]

Check if the object need to be updated for OP

convert_OP(obj_dict)[source]
is_HoleUD_dict(obj_dict)[source]

Check if the object need to be updated for HoleUD

convert_HoleUD(hole_dict)[source]

Update the content of the dict and instantiate object

is_Winding_dict(obj_dict)[source]

Check if the object need to be updated for Winding

convert_Winding(wind_dict)[source]

Update the old Winding classes to WindingUD

is_VarParam_dict(obj_dict)[source]

Check if the object need to be updated for Winding

rename_varparam(varparam_dict)[source]

Update the old VarParam class to VarParamSweep

is_OptiConstraint_dict(obj_dict)[source]

Check if the object need to be updated for OptiConstraint

convert_opticonstraint(opticonstraint_dict)[source]

Update the old OptiConstraint to the new one inherited from DataKeeper without get_variable

is_OptiDesignVar_dict(obj_dict)[source]

Check if the object need to be updated for OptiDesignVar

convert_optidesignvar(optidesignvar_dict)[source]

Update the old OptiDesignVar to the new ones OptiDesignVarSet & OptiDesignVarInterval

is_before_version(ref_version, check_version)[source]

Check if a version str is before another version str

Parameters:
  • ref_version (str) – Reference version to compare with (“1.2.3” for instance)

  • check_version (str) – Version to check if before reference (“1.3.4” for instance)

Returns:

is_before – True if check_version is before ref_version

Return type:

bool

create_update_dict(file_version)[source]

Create a dict to know which parameter to update

Parameters:

file_version (str) – Version of the file to update

Returns:

update_dict – Dictionnary Key: What to update, value: is update needed

Return type:

dict