Skip to content

Rename 'structure_type' to 'block_type' across models and queries#116

Merged
jfrench9 merged 1 commit into
mainfrom
chore/rename-block-structure
May 16, 2026
Merged

Rename 'structure_type' to 'block_type' across models and queries#116
jfrench9 merged 1 commit into
mainfrom
chore/rename-block-structure

Conversation

@jfrench9
Copy link
Copy Markdown
Member

Summary

Refactors reporting structure terminology from structure_type to block_type across the entire client codebase, including models, GraphQL queries, API operations, and tests. This is a naming alignment effort to ensure consistency with the updated domain language used in the backend/API.

Key Accomplishments

  • Model Renaming: Renamed TaxonomyBlockStructureRequestStructureType enum to TaxonomyBlockStructureRequestBlockType, including the corresponding file rename (taxonomy_block_structure_request_structure_type.pytaxonomy_block_structure_request_block_type.py).
  • Field Renaming: Updated all structure_type fields to block_type across multiple models:
    • TaxonomyBlockStructure
    • TaxonomyBlockStructureRequest
    • StructureSummary
    • ArtifactResponse
    • ChangeReportingStyleOp
    • ClassificationLite
    • InformationModelResponse
  • GraphQL Query Updates: Updated all GraphQL query strings in the ledger query module to use blockType instead of structureType in both query variables and response field selections.
  • API Operation Updates: Updated op_change_reporting_style to pass block_type instead of structure_type.
  • Client Layer Updates: Updated LedgerClient methods to use the new block_type parameter naming.
  • Enhanced RuleLite Model: Extended the RuleLite model with additional fields and logic (net addition of ~45 lines), suggesting expanded functionality beyond the pure rename.
  • Test Updates: All test fixtures and assertions updated to reflect the new block_type terminology.

Breaking Changes

⚠️ This is a breaking change for any consumers of this client library:

  • The structure_type field/parameter has been renamed to block_type across all public models and client methods.
  • The enum class TaxonomyBlockStructureRequestStructureType has been renamed to TaxonomyBlockStructureRequestBlockType.
  • Any code referencing the old field names or enum class will need to be updated accordingly.
  • GraphQL queries now use blockType — this requires the corresponding backend API to already support this field name.

Testing Notes

  • Existing tests in test_ledger_client.py have been updated to validate the new block_type terminology across query construction and response parsing.
  • Verify that the backend GraphQL API accepts blockType as the field/variable name before deploying this change.
  • Ensure downstream consumers of the client library are updated in coordination with this release.

Infrastructure Considerations

  • This change assumes the backend API has already been updated (or is being updated simultaneously) to use blockType instead of structureType. Deploying this client change against an API still using the old terminology will result in query failures.
  • Consider versioning this as a minor or major release (depending on semver policy) given the breaking nature of the public API changes.
  • Downstream services and integrations that depend on this client library will need coordinated updates.

🤖 Generated with Claude Code

Branch Info:

  • Source: chore/rename-block-structure
  • Target: main
  • Type: feature

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

@jfrench9 jfrench9 merged commit 5e0f00c into main May 16, 2026
1 check passed
@jfrench9 jfrench9 deleted the chore/rename-block-structure branch May 16, 2026 04:44
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