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

support derived buffer passed in the input desires #121

Merged
merged 2 commits into from
Mar 4, 2025
Merged
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
7 changes: 4 additions & 3 deletions service_capacity_modeling/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,9 +897,10 @@ def merge_with(self, defaults: "CapacityDesires") -> "CapacityDesires":
default_buffers["default"] = desired_buffers["default"]
for k, v in desired_buffers.get("desired", {}).items():
default_buffers["desired"][k] = v
for i in desired_buffers.get("derived", []):
if i not in default_buffers["derived"]:
default_buffers["derived"].append(i)

default_buffers.setdefault("derived", {})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mind modifying the test_desire_merge.py regression test to verify this?

Copy link
Collaborator Author

@ayushisingh29 ayushisingh29 Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed this in a new commit
0df03b6

for k, v in desired_buffers.get("derived", {}).items():
default_buffers["derived"][k] = v

default_dict.update(desires_dict)

Expand Down