Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split RPC schemas into multiple files #1385

Merged
merged 16 commits into from
Jul 9, 2024

Conversation

kkawula
Copy link
Collaborator

@kkawula kkawula commented Jul 5, 2024

Closes #1316

Introduced changes

  • rpc.py spilted into 5 files transctions.py trace_api.py block.py contract.py event.py

TODO

  • This PR contains breaking changes

  • Move schemas from gateway.py to rpc.py

  • Split schemas from rpc.py to other files in rpc directory

  • Rename CompiledContract, ContractClass and ContractClassSchema to DeprecatedCompiledContract, DeprecatedContractClass and DeprecatedContractClassSchema

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 98.31144% with 9 lines in your changes missing coverage. Please review.

Project coverage is 87.57%. Comparing base (2ad5d45) to head (66b367e).
Report is 1 commits behind head on development.

Additional details and impacted files
@@               Coverage Diff               @@
##           development    #1385      +/-   ##
===============================================
- Coverage        96.64%   87.57%   -9.07%     
===============================================
  Files               95      101       +6     
  Lines             5005     5079      +74     
===============================================
- Hits              4837     4448     -389     
- Misses             168      631     +463     
Files Coverage Δ
starknet_py/net/full_node_client.py 91.90% <100.00%> (+3.55%) ⬆️
starknet_py/net/schemas/broadcasted_txn.py 96.29% <100.00%> (ø)
starknet_py/net/schemas/gateway.py 94.66% <100.00%> (-1.89%) ⬇️
starknet_py/net/schemas/rpc/trace_api.py 99.23% <99.23%> (ø)
starknet_py/net/schemas/rpc/contract.py 97.56% <97.56%> (ø)
starknet_py/net/schemas/rpc/block.py 96.80% <96.80%> (ø)
starknet_py/net/schemas/rpc/transactions.py 98.63% <98.63%> (ø)

... and 58 files with indirect coverage changes

@kkawula kkawula linked an issue Jul 5, 2024 that may be closed by this pull request
Copy link
Collaborator

@ddoktorski ddoktorski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 💪

I've left a few comments. In addition to those, let's also update the migration guide with the information about renamed classes (CompiledContract and ContractClass).

starknet_py/net/models/transaction.py Outdated Show resolved Hide resolved
starknet_py/net/schemas/rpc/contract.py Outdated Show resolved Hide resolved
starknet_py/net/schemas/rpc/contract.py Outdated Show resolved Hide resolved
starknet_py/net/schemas/rpc/contract.py Outdated Show resolved Hide resolved
starknet_py/net/schemas/rpc/transactions.py Outdated Show resolved Hide resolved
starknet_py/net/client_models.py Outdated Show resolved Hide resolved
starknet_py/net/schemas/rpc/contract.py Outdated Show resolved Hide resolved
@kkawula kkawula requested a review from ddoktorski July 8, 2024 10:39
@kkawula kkawula requested a review from ddoktorski July 9, 2024 07:58
Copy link
Collaborator

@ddoktorski ddoktorski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kkawula kkawula merged commit bc7cc01 into development Jul 9, 2024
16 checks passed
@ddoktorski ddoktorski deleted the kkawula/1316_rpc_schemas_refactor branch July 9, 2024 10:32
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.

Split RPC schemas into multiple files
2 participants