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

Don't keep reference to data_index in alias partial objects #942

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Changes from all commits
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
9 changes: 3 additions & 6 deletions desc/compute/data_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


def assign_alias_data(
alias, primary, base_class, data_index, params, profiles, transforms, data, **kwargs
alias, primary, fun, params, profiles, transforms, data, **kwargs
):
"""Assigns primary data to alias.

Expand All @@ -45,9 +45,7 @@
computed data dictionary (includes both alias and primary)

"""
data = data_index[base_class][primary]["fun"](
params, transforms, profiles, data, **kwargs
)
data = fun(params, transforms, profiles, data, **kwargs)

Check warning on line 48 in desc/compute/data_index.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/data_index.py#L48

Added line #L48 was not covered by tests
data[alias] = data[primary].copy()
return data

Expand Down Expand Up @@ -160,8 +158,7 @@
assign_alias_data,
alias=alias,
primary=name,
base_class=base_class,
data_index=data_index,
fun=data_index[base_class][name]["fun"],
)

flag = True
Expand Down
Loading