Skip to content

fix: attributes#130

Merged
pesap merged 16 commits into
mainfrom
al/fix-attributes
Jun 25, 2026
Merged

fix: attributes#130
pesap merged 16 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, check_attribute_exists

  4. Documentation updates related to attributes

@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.97959% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.93%. Comparing base (3003e52) to head (bb913f3).

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.93%   +0.37%     
==========================================
  Files           8        8              
  Lines        1823     1919      +96     
==========================================
+ Hits         1742     1841      +99     
+ Misses         81       78       -3     

☔ 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
@pesap

pesap commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

@akrivi , is this ready for review?

@akrivi akrivi requested a review from pesap June 25, 2026 17:58
@akrivi

akrivi commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

yes!

@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.

Approved after fixing the broken MyST/Sphinx API reference link in docs/source/howtos/add_attributes.md and validating the docs build locally.

@pesap pesap merged commit b4d276b into main Jun 25, 2026
28 checks passed
@pesap pesap deleted the al/fix-attributes branch June 25, 2026 19:55
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