Skip to content

Commit

Permalink
cdas csd
Browse files Browse the repository at this point in the history
  • Loading branch information
hulkoba committed Jun 5, 2024
1 parent 2986641 commit 9c9447c
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,14 +714,9 @@ def finalize_config(config, platform, arch, forge_config):
# pairs. Only for the latter it never sorts and retains the order of the OrderedDict.
def represent_ordered_dict(yaml_representer, data):
yaml = YAML()
yaml.default_flow_style = False
print('#### data items', data.items())
print('#### yaml_representer', yaml_representer)
# return yaml_representer.represent_dict(OrderedDict, data.items())
return yaml.representer.represent_dict
# return SafeRepresenter.represent_dict(
# yaml_representer, data.items()
# )
return yaml.representer.SafeRepresenter.represent_dict(
yaml_representer, data.items()
)



Expand Down Expand Up @@ -753,7 +748,7 @@ def dump_subspace_config_files(
# get rid of the special object notation in the yaml file for objects that we dump
yaml.representer.add_representer(set, SafeRepresenter.represent_list)
yaml.representer.add_representer(tuple, SafeRepresenter.represent_list)
yaml.representer.add_representer(OrderedDict, SafeRepresenter.represent_dict)
yaml.representer.add_representer(OrderedDict, SafeRepresenter.represent_ordered_dict)

platform_arch = "{}-{}".format(platform, arch)

Expand Down Expand Up @@ -799,8 +794,8 @@ def dump_subspace_config_files(
].replace("_", "-"),
}
)
# pprint.pp(result)
# pprint.pp(sorted(result, key=lambda x: x["config_name"]))
pprint.pp(result)
pprint.pp(sorted(result, key=lambda x: x["config_name"]))
return sorted(result, key=lambda x: x["config_name"])


Expand Down

0 comments on commit 9c9447c

Please sign in to comment.