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

Fix 22.2 doc build #962

Merged
merged 2 commits into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codegen/settingsgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def generate():

sinfo = session._settings_service.get_static_info()
session.exit()
cls = flobject.get_cls("", sinfo)
cls = flobject.get_cls("", sinfo, version=version)

_populate_hash_dict("", sinfo, cls)
_populate_classes(parent_dir)
Expand Down
12 changes: 8 additions & 4 deletions src/ansys/fluent/core/solver/flobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ def __setitem__(self, name: str, value):
child.set_state(value)


def get_cls(name, info, parent=None):
def get_cls(name, info, parent=None, version=None):
"""Create a class for the object identified by "path"."""
try:
if name == "":
Expand Down Expand Up @@ -870,6 +870,8 @@ def get_cls(name, info, parent=None):
user_creatable = info.get("user-creatable?", False) or info.get(
"user_creatable", False
)
if version == "222":
user_creatable = True
seanpearsonuk marked this conversation as resolved.
Show resolved Hide resolved

bases = (base,)
if include_child_named_objects:
Expand All @@ -893,7 +895,7 @@ def _process_cls_names(info_dict, names, write_doc=False):
nonlocal cls

for cname, cinfo in info_dict.items():
ccls = get_cls(cname, cinfo, cls)
ccls = get_cls(cname, cinfo, cls, version=version)
ccls_name = ccls.__name__

i = 0
Expand Down Expand Up @@ -942,7 +944,9 @@ def _process_cls_names(info_dict, names, write_doc=False):

object_type = info.get("object-type", False) or info.get("object_type", False)
if object_type:
cls.child_object_type = get_cls("child-object-type", object_type, cls)
cls.child_object_type = get_cls(
"child-object-type", object_type, cls, version=version
)
cls.child_object_type.rename = lambda self, name: self._parent.rename(
name, self._name
)
Expand Down Expand Up @@ -989,7 +993,7 @@ def get_root(flproxy, version: str = "") -> Group:
raise RuntimeError("Mismatch in hash values")
cls = settings.root
except Exception:
cls = get_cls("", obj_info)
cls = get_cls("", obj_info, version=version)
root = cls()
root.set_flproxy(flproxy)
root._setattr("_static_info", obj_info)
Expand Down