Skip to content

Add taxonomy block models and consolidate ledger API operations#101

Merged
jfrench9 merged 2 commits intomainfrom
feature/info-taxonomy-block
Apr 24, 2026
Merged

Add taxonomy block models and consolidate ledger API operations#101
jfrench9 merged 2 commits intomainfrom
feature/info-taxonomy-block

Conversation

@jfrench9
Copy link
Copy Markdown
Member

Summary

Introduces the taxonomy block abstraction to the robosystems client, replacing the previous granular CRUD operations for individual entities (elements, structures, taxonomies, associations) with a unified taxonomy block-based API. This also adds a new DisposeScheduleRequest model and corresponding operation.

Key Changes

New Taxonomy Block Models

  • CreateTaxonomyBlockRequest — supports creating a full taxonomy block with nested elements, structures, associations, and rules in a single request
  • UpdateTaxonomyBlockRequest / DeleteTaxonomyBlockRequest — lifecycle management for taxonomy blocks
  • TaxonomyBlockElementRequest, TaxonomyBlockStructureRequest, TaxonomyBlockAssociationRequest, TaxonomyBlockRuleRequest — sub-models representing the components of a taxonomy block, each with dedicated metadata and enum types (e.g., rule_category, rule_pattern, severity, association_type, structure_type)
  • ElementUpdatePatch and StructureUpdatePatch — new patch models for partial updates with nullable metadata support

New Dispose Schedule Operation

  • DisposeScheduleRequest model and op_dispose_schedule API operation replace the former op_update_structure operation

Removed Obsolete Models & Operations

  • Deleted 20+ models and API operations for individual entity CRUD: create_element, create_structure, create_taxonomy, delete_element, delete_taxonomy, delete_association, update_element, update_taxonomy, update_association, bulk_create_associations, and all associated request models and enums
  • These are superseded by the consolidated taxonomy block operations

Ledger Client Refactor

  • ledger_client.py significantly simplified — removed methods for individual entity operations and replaced with taxonomy block lifecycle methods
  • op_create_mapping_association and op_link_entity_taxonomy updated for request/response handling changes

Model Exports

  • models/__init__.py updated to export all new models and remove references to deleted ones

Breaking Changes

⚠️ This is a breaking change. All consumers relying on the following will need to migrate:

  • Individual entity create/update/delete methods on LedgerClient (elements, structures, taxonomies, associations)
  • Any direct imports of removed models (CreateElementRequest, CreateTaxonomyRequest, CreateStructureRequest, BulkCreateAssociationsRequest, UpdateElementRequest, UpdateTaxonomyRequest, UpdateAssociationRequest, DeleteStructureRequest, DeleteTaxonomyRequest, DeleteElementRequest, DeleteAssociationRequest, and related enums)
  • The op_update_structure operation is now op_dispose_schedule with a different request model

Testing Notes

  • Unit tests in test_ledger_client.py have been updated to reflect the new API surface
  • Verify end-to-end taxonomy block creation, update, and deletion flows against a running ledger service
  • Validate that the dispose schedule operation correctly replaces the former structure update behavior

Infrastructure Considerations

  • Downstream services consuming the robosystems client library must be updated in coordination with this release
  • API version compatibility should be verified — the backend must support the new taxonomy block endpoints before this client is deployed

🤖 Generated with Claude Code

Branch Info:

  • Source: feature/info-taxonomy-block
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

- Deleted the following models as they are no longer needed:
  - CreateStructureRequestStructureType
  - CreateTaxonomyRequest
  - CreateTaxonomyRequestTaxonomyType
  - DeleteAssociationRequest
  - DeleteElementRequest
  - DeleteStructureRequest
  - DeleteTaxonomyRequest
  - UpdateAssociationRequest
  - UpdateElementRequest
  - UpdateStructureRequest
  - UpdateTaxonomyRequest
  - UpdateElementRequestBalanceTypeType0
  - UpdateElementRequestClassificationType0
  - UpdateElementRequestPeriodTypeType0

- Introduced DisposeScheduleRequest model to handle disposal of schedules with attributes for structure ID, disposal date, memo, reason, sale proceeds, and related element IDs.
- Introduced `TaxonomyBlockElementRequestMetadata`, `TaxonomyBlockRuleRequest`, and related models for taxonomy block rules and elements.
- Implemented enums for rule categories, patterns, and severities to standardize taxonomy block rule definitions.
- Created `TaxonomyBlockStructureRequest` and its metadata model to define structure within taxonomy blocks.
- Added `UpdateTaxonomyBlockRequest` to facilitate updates to taxonomy blocks, including elements, structures, associations, and rules.
- Enhanced serialization and deserialization methods for all new models to support dictionary conversions.
@jfrench9 jfrench9 merged commit 8858c20 into main Apr 24, 2026
1 check passed
@jfrench9 jfrench9 deleted the feature/info-taxonomy-block branch April 24, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant