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

Move dict.update (shallow copy) to deep_update #1714

Merged
merged 2 commits into from
Dec 20, 2024
Merged

Conversation

NolanTrem
Copy link
Collaborator

@NolanTrem NolanTrem commented Dec 20, 2024

Important

Replaces shallow dictionary updates with deep_update for nested updates, enhancing configuration handling and adding tests for validation.

  • Behavior:
    • Replaces shallow dict.update with deep_update for nested dictionary updates in config.py.
    • Adds deep_update function to base_utils.py for recursive dictionary merging.
  • Config Handling:
    • Updates R2RConfig in config.py to use deep_update for merging configurations.
    • Ensures nested configurations are preserved and new values are added correctly.
  • Testing:
    • Adds test_config.py to test configuration loading, merging, and serialization.
    • Tests ensure that configurations maintain expected types and required keys are present.

This description was created by Ellipsis for eb116bc. It will automatically update as commits are pushed.

@NolanTrem NolanTrem marked this pull request as ready for review December 20, 2024 20:16
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to eb116bc in 1 minute and 53 seconds

More details
  • Looked at 532 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. py/core/base/utils/__init__.py:20
  • Draft comment:
    The deep_update function is imported multiple times across different files. Consider centralizing the import to avoid redundancy.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The deep_update function is imported multiple times across different files. It would be more efficient to import it once in a shared module and use it from there.
2. py/core/utils/__init__.py:15
  • Draft comment:
    The deep_update function is imported multiple times across different files. Consider centralizing the import to avoid redundancy.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The deep_update function is imported multiple times across different files. It would be more efficient to import it once in a shared module and use it from there.
3. py/shared/utils/__init__.py:18
  • Draft comment:
    The deep_update function is imported multiple times across different files. Consider centralizing the import to avoid redundancy.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The deep_update function is imported multiple times across different files. It would be more efficient to import it once in a shared module and use it from there.

Workflow ID: wflow_IxdX50RIHqWdtJae


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@NolanTrem NolanTrem merged commit a4f1eda into main Dec 20, 2024
12 of 14 checks passed
@NolanTrem NolanTrem deleted the Nolan/DeepUpdates branch December 20, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant