Skip to content

Conversation

adamamer20
Copy link
Member

@adamamer20 adamamer20 commented Aug 30, 2025

This PR implements the new .sets accessor on AgentsDF, addressing #146, #124 . The goal is to make agent set management more predictable and user-friendly by exposing a dict-like API for lookup and iteration, while keeping _agentsets internal. This also sets the stage for #162 (column accessor) and container-level name canonicalization.

Notes:

  • Uniqueness of name is only handled at AgentsDF level for separation of concerns
  • AgentSetsAccessor is not copied in copy operation but created from scratch to avoid keeping the _parent reference to the original `AgentsDF

…ement and enhance rename method for better delegation to AgentsDF.
…gent sets as a list for multiple matches and improve error messaging for better clarity.
…o 146-enhancement-consider-using-a-key-based-structure-for-agentsets-instead-of-list-in-agentsdf
…ency and clarity in the abstract class naming.
…proved consistency and clarity; enhance error messaging in __getitem__ and rename methods for better readability.
Copy link

codecov bot commented Aug 30, 2025

Codecov Report

❌ Patch coverage is 80.17241% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.17%. Comparing base (900490a) to head (95bb9af).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
mesa_frames/concrete/agents.py 61.42% 27 Missing ⚠️
mesa_frames/concrete/accessors.py 91.66% 8 Missing ⚠️
mesa_frames/concrete/model.py 0.00% 5 Missing ⚠️
mesa_frames/concrete/agentset.py 63.63% 4 Missing ⚠️
mesa_frames/abstract/mixin.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #172      +/-   ##
==========================================
- Coverage   92.44%   91.17%   -1.28%     
==========================================
  Files          13       15       +2     
  Lines        1695     1904     +209     
==========================================
+ Hits         1567     1736     +169     
- Misses        128      168      +40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…nt set types, improving performance and clarity in KeyError messages.
…arity in AGENTS.md, agents.py, agentset.py, and test_sets_accessor.py; improve formatting in test cases.
…r-agentsets-instead-of-list-in-agentsdf' of https://github.com/projectmesa/mesa-frames into 146-enhancement-consider-using-a-key-based-structure-for-agentsets-instead-of-list-in-agentsdf
…cessor; update parameter descriptions for improved understanding.
…update conflict resolution and mode descriptions for improved understanding.
…cessor and AgentSetsAccessor; update default values and descriptions for parameters.
pre-commit-ci bot and others added 26 commits September 1, 2025 10:49
…-and-agentsetpolars-to-agentsetdf-for-clarity' of https://github.com/projectmesa/mesa-frames into 146-enhancement-consider-using-a-key-based-structure-for-agentsets-instead-of-list-in-agentsdf
…-and-agentsetpolars-to-agentsetdf-for-clarity' of https://github.com/projectmesa/mesa-frames into 146-enhancement-consider-using-a-key-based-structure-for-agentsets-instead-of-list-in-agentsdf
…e to MoneyAgentNative for clarity; update MoneyModelDF to MoneyModel and adjust related references.
…DF; remove unused abstract properties for cleaner interface.
…-and-agentsetpolars-to-agentsetdf-for-clarity' of https://github.com/projectmesa/mesa-frames into 146-enhancement-consider-using-a-key-based-structure-for-agentsets-instead-of-list-in-agentsdf
…r-agentsets-instead-of-list-in-agentsdf' of https://github.com/projectmesa/mesa-frames into 146-enhancement-consider-using-a-key-based-structure-for-agentsets-instead-of-list-in-agentsdf
@adamamer20 adamamer20 self-assigned this Sep 3, 2025
@adamamer20 adamamer20 added enhancement Improvements to existing features or performance. breaking Changes that break backwards compatibility or require major updates. labels Sep 3, 2025
@adamamer20 adamamer20 added this to the 0.1.0-stable milestone Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Changes that break backwards compatibility or require major updates. enhancement Improvements to existing features or performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Consider using a key-based structure for agentsets instead of list in AgentsDf
1 participant