Skip to content

[Advanced]: Prompt code rabbit on how to review src/hiero_sdk_python/tokensΒ #1192

@exploreriii

Description

@exploreriii

🧠 Advanced Contributors

This issue is intended for contributors who are already very familiar with the
Hiero Python SDK codebase and its architectural patterns.

You should feel comfortable:

  • navigating multiple modules across src/
  • understanding and modifying core SDK abstractions
  • reasoning about API design and backwards compatibility
  • updating or extending tests, examples, and documentation as needed
  • making changes that may affect public-facing behavior

New developers should start with
Good First Issues or Intermediate Issues first.

🐞 Problem Description

Additions or changes to token transactions should be reviewed in a slightly different way to other src files, like queries, because they use the Transaction base class

πŸ’‘ Proposed / Expected Solution

Prompt code rabbit on how to review token transactions or classes

class example:
src/hiero_sdk_python/tokens/token_info.py
src/hiero_sdk_python/tokens/token_kyc_status.py (base class enum)

transaction example:
src/hiero_sdk_python/tokens/token_reject_transaction.py
base class: transaction

we should ensure:

  • technically functional
  • use methods that are safe, and can grow with project needs without much breaking changes
  • strictly validate all import paths (don't look at examples, look at other src/token imports or knowledge of code base, flag hallucinations
  • no breaking changes, or, if there is, appropriate deprecation warnings and testing
  • google style docstrings in functions with args and returns and module level
  • type hinted e.g. return types
  • comments
  • should have setters to allow method chaining
  • distinction between internal and external API methods
  • errors should be deterministic, user-readable, raised at appropriate places
  • if possible should follow documentation of protobufs at https://github.com/hashgraph/hedera-protobufs/tree/8c27786cec93abab974309074feaef9b48a695b7/services
  • Changes must not break existing APIs
  • If a breaking change is unavoidable:
    Require explicit deprecation warnings for future releases
    Require corresponding tests
  • Meaningful inline comments where behavior is non-obvious

classes

  • often will have convenience methods e.g. str, repr

transactions

  • inherits from transaction
  • super init
  • _build_proto_body, build_transaction_body, build_scheduled_body (less strict), _get_method- get method needs to call correct service
  • often will have from proto method
  • will often have a corresponding/example and tests/unit and tests/integration

🧠 Implementation & Design Notes

The implementation requires innovation and creativity to create a solution that achieves a code rabbit reviewer that is better than human reviewers for the python sdk in many ways

βœ… Acceptance Criteria

To merge this issue, the pull request must:

  • Fully address the problem and design goals described above
  • Maintain backwards compatibility unless explicitly approved otherwise
  • Follow existing architectural and coding conventions
  • Include comprehensive tests covering new and existing behavior
  • Update relevant examples and documentation
  • Pass all CI checks
  • Include a valid changelog entry
  • Use DCO and GPG-signed commits

πŸ“š Additional Context, Links, or Prior Art

Optional.

Metadata

Metadata

Assignees

Labels

advancedrequires knowledge of multiple areas in the codebase without defined steps to implement or examplesintermediaterequires some knowledge of the codebase with some defined steps to implement or examples

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions