Enhance vCon party management and documentation#55
Merged
howethomas merged 1 commit intomainfrom Sep 18, 2025
Merged
Conversation
Contributor
howethomas
commented
Sep 18, 2025
- Updated the parties property to return a list of dictionaries instead of Party objects, allowing for in-place modifications.
- Introduced a new method, get_party_objects(), to retrieve Party objects from the internal data structure.
- Enhanced usage documentation to reflect changes in party data access and provide examples for both dictionary and object usage.
- Updated tests to align with the new party data structure and ensure correct assertions.
- Updated the parties property to return a list of dictionaries instead of Party objects, allowing for in-place modifications. - Introduced a new method, get_party_objects(), to retrieve Party objects from the internal data structure. - Enhanced usage documentation to reflect changes in party data access and provide examples for both dictionary and object usage. - Updated tests to align with the new party data structure and ensure correct assertions.
There was a problem hiding this comment.
Pull Request Overview
This PR enhances vCon party management by addressing a mutability inconsistency between the dialog and parties properties. The main purpose is to make both properties return mutable references that allow in-place modifications, ensuring consistent behavior across the API.
- Changed
partiesproperty to return dictionaries instead of Party objects for consistent mutability - Added
get_party_objects()method for backward compatibility when Party objects are needed - Updated documentation and tests to reflect the new party data access patterns
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vcon/vcon.py | Modified parties property to return mutable dictionaries and added get_party_objects() method |
| tests/test_vcon.py | Updated assertions to work with dictionary-based party access |
| tests/test_mutability_consistency.py | Added comprehensive tests demonstrating mutability consistency |
| docs/source/usage.rst | Enhanced documentation with examples for both dictionary and object usage |
| MUTABILITY_FIX_SUMMARY.md | Added detailed documentation of the changes and migration guide |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.