Skip to content

fix: attributes#130

Open
akrivi wants to merge 13 commits into
mainfrom
al/fix-attributes
Open

fix: attributes#130
akrivi wants to merge 13 commits into
mainfrom
al/fix-attributes

Conversation

@akrivi

@akrivi akrivi commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

This PR:

  1. Updates copy_object to also copy object-level attributes (t_attribute_data) in addition to memberships and properties.
    This is particularly important for classes such as ClassEnum.Horizon, where key defining characteristics (e.g. Date From, Step Count, Chrono Date From, Look-ahead At a Time) are stored as attributes. Previously, these were not copied, resulting in incomplete duplicated objects.

  2. Introduces add_attributes_from_records for efficient bulk insertion of attribute values.

  3. Implements delete_attribute, get_attributes

  • docs updates

@akrivi akrivi marked this pull request as draft April 29, 2026 21:28
@codecov-commenter

codecov-commenter commented Apr 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.95833% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.87%. Comparing base (3003e52) to head (20471af).

Files with missing lines Patch % Lines
src/plexosdb/utils.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #130      +/-   ##
==========================================
+ Coverage   95.55%   95.87%   +0.32%     
==========================================
  Files           8        8              
  Lines        1823     1917      +94     
==========================================
+ Hits         1742     1838      +96     
+ Misses         81       79       -2     

☔ View full report in Codecov by Harness.
📢 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.

@github-actions github-actions Bot added the tests label Apr 30, 2026
@akrivi akrivi changed the title fix: attributes copy object fix: attributes Apr 30, 2026
@akrivi akrivi marked this pull request as ready for review May 1, 2026 14:42
@akrivi akrivi requested review from mcllerena and pesap May 1, 2026 14:46
Comment thread src/plexosdb/db.py Outdated
Comment thread src/plexosdb/utils.py
Comment thread tests/test_plexosdb_from_records.py

@pesap pesap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Left 3 inline comments. Main fixes requested: early validation for explicit attribute records missing name, plus regression test for that case. I also linked follow up issue #132 for chunking standardization so we can keep this PR focused.

@akrivi akrivi marked this pull request as draft May 1, 2026 22:47
@akrivi akrivi marked this pull request as ready for review June 22, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants