You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecates InventoryCollection.get_specs() and add_specs() via @deprecated (removed in 2.0); pins typing_extensions>=4.6.1 as a direct dependency
Adds migration guide (docs/migration/specs-to-attributes.md) and restructures migration docs into per-topic directory following the substances-v4 pattern
Notes
add_values is upsert — internally deletes matching attribute IDs before PUT so callers never see duplicate-ID errors
GET /attributes/values (bulk) returns 500 from the backend; test is marked xfail pending backend fix
typing_extensions.deprecated chosen over raw warnings.warn
[src/albert/collections/attributes.py:484]create() is missing @validate_call. Every public collection method must have it for runtime validation — all sibling methods (get_by_id, get_by_ids, delete, search, add_values, etc.) have it but create does not.
[src/albert/collections/attributes.py:503]update() is missing @validate_call for the same reason.
[src/albert/collections/inventory.py:~256] The add_specs() deprecation message tells users to call client.attributes.set_values(), which does not exist. The correct replacement is client.attributes.add_values().
[src/albert/collections/attributes.py:504-507]update() docstring contains implementation details: "Enum value changes are handled transparently via a separate enums endpoint before applying any field-level patches." Per project standards, docstrings must describe behaviour from the caller's perspective, never internal mechanics.
[src/albert/collections/attributes.py:503]update() is missing the required Notes section listing updatable fields. Per AGENTS.md: "Every update() method must have a Notes section listing the fields that can be updated."_updatable_attributes = {"reference_name", "parameters", "validation"} (plus unit_id based on the patch logic) should be documented there.
Summary
5 issues found. The wrong method name in the deprecation message is a user-facing correctness bug; the missing @validate_call decorators break the runtime validation contract that every public collection method is expected to provide.
[src/albert/collections/attributes.py:484]create() is missing @validate_call. Every public collection method must have it for runtime validation — all sibling methods (get_by_id, get_by_ids, delete, search, add_values, etc.) have it but create does not.
[src/albert/collections/attributes.py:503]update() is missing @validate_call for the same reason.
[src/albert/collections/inventory.py:~256] The add_specs() deprecation message tells users to call client.attributes.set_values(), which does not exist. The correct replacement is client.attributes.add_values().
[src/albert/collections/attributes.py:504-507]update() docstring contains implementation details: "Enum value changes are handled transparently via a separate enums endpoint before applying any field-level patches." Per project standards, docstrings must describe behaviour from the caller's perspective, never internal mechanics.
[src/albert/collections/attributes.py:503]update() is missing the required Notes section listing updatable fields. Per AGENTS.md: "Every update() method must have a Notes section listing the fields that can be updated."_updatable_attributes = {"reference_name", "parameters", "validation"} (plus unit_id based on the patch logic) should be documented there.
Summary
5 issues found. The wrong method name in the deprecation message is a user-facing correctness bug; the missing @validate_call decorators break the runtime validation contract that every public collection method is expected to provide.
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
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.
Summary
AttributeCollection(client.attributes) with full CRUD (create,get_by_id,get_by_ids,get_all,search,update,delete) and reference value methods (add_values,get_values,get_bulk_values,delete_values,clear_values)Attribute,AttributeScope,ValidationItem,AttributeValue,AttributeValueRange,AttributeDefinition, andAttributeValuesResponseresource modelsInventoryCollection.get_specs()andadd_specs()via@deprecated(removed in 2.0); pinstyping_extensions>=4.6.1as a direct dependencydocs/migration/specs-to-attributes.md) and restructures migration docs into per-topic directory following the substances-v4 patternNotes
add_valuesis upsert — internally deletes matching attribute IDs before PUT so callers never see duplicate-ID errorsGET /attributes/values(bulk) returns 500 from the backend; test is markedxfailpending backend fixtyping_extensions.deprecatedchosen over rawwarnings.warn