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

docs: initial documentation for beta release #128

Merged
merged 6 commits into from
Dec 23, 2024

Conversation

aorumbayev
Copy link
Contributor

@aorumbayev aorumbayev commented Dec 23, 2024

Proposed Changes

  • Added comprehensive v3 migration guide with step-by-step instructions
  • Enhanced documentation for remaining core capabilities (asset management, testing, indexer, etc.)
  • Added missing exports for transaction parameter types and network models
  • Improved docstrings and type hints across multiple files (majority is to be further refined in early January)

The changes focus on improving documentation clarity and providing guidance for migrating from v2 to v3 of AlgoKit Utils Python.

@aorumbayev aorumbayev marked this pull request as ready for review December 23, 2024 11:24
Copy link

github-actions bot commented Dec 23, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit_utils
   _debugging.py1501093%21, 42, 81, 87, 96, 136, 164, 172–174
   application_client.py330%1–11
   config.py891880%26–28, 41, 53, 84–85, 100, 105, 110, 118–123, 156, 158, 160
   deploy.py330%1–10
   logic_error.py330%1–10
src/algokit_utils/_legacy_v2
   _ensure_funded.py71199%100
   _transfer.py70396%14, 77–78
   account.py931386%15–18, 70–74, 109, 126, 156, 159, 208
   application_client.py5327786%60–61, 178, 183, 212, 324, 329–330, 332, 334, 799, 814, 832–835, 925, 965, 977, 990, 1032, 1092–1098, 1102–1107, 1109, 1145, 1152, 1265, 1299, 1313, 1351–1353, 1355, 1365–1422, 1433–1438, 1458–1461
   asset.py82594%10, 28–31
   common.py13192%13
   deploy.py4332295%32–35, 170, 174–175, 193, 249, 339–340, 361, 395, 406–414, 429, 437, 630–631, 655
   network_clients.py73593%77–78, 101–102, 135
src/algokit_utils/accounts
   account_manager.py2114181%169–170, 202–208, 225, 242–247, 257–262, 302–304, 339–340, 379, 399–403, 416, 479, 658, 772, 855, 860, 878, 881–882, 905
   kmd_account_manager.py71889%57–61, 110, 183, 190
src/algokit_utils/applications
   abi.py1287244%55, 70–71, 77, 83, 85, 87, 91–92, 99–118, 127, 130–136, 144–157, 163–175, 183–194
   app_client.py71721071%56–65, 122, 130, 318–321, 324, 327, 330, 333, 345–348, 351, 354, 357, 360, 372, 381, 390, 395–457, 470–528, 561–563, 572–575, 578–579, 582–585, 588–589, 592–593, 596–597, 610, 672–673, 702, 705, 708, 711, 714, 717, 730, 733, 736, 739, 742, 745, 774–779, 782, 787, 792, 797, 802, 817, 840, 914, 934, 963–964, 983, 985, 991, 1021–1029, 1051–1054, 1057–1060, 1081, 1117, 1130, 1201–1208, 1233, 1245, 1247, 1250, 1254, 1355, 1373–1374, 1412, 1423–1425, 1429–1453, 1464, 1473–1484, 1492–1497
   app_deployer.py2143982%206, 213, 223–228, 231–235, 273–287, 302–303, 492–505, 515, 520, 526, 532–534, 541, 555, 566–604
   app_factory.py2712790%334, 344, 347, 481, 489, 501, 647, 661–666, 672–673, 692, 717, 728–729, 765, 773–787
   app_manager.py2111493%191, 221–222, 239–244, 265, 301, 314–317, 329, 337
src/algokit_utils/applications/app_spec
   arc32.py95892%195–204
   arc56.py4703692%66–68, 140, 223, 234–235, 283, 296–298, 330, 339, 341, 383, 545, 555, 559, 697, 699, 732–743, 756, 758–759, 775
src/algokit_utils/assets
   asset_manager.py1271291%223–224, 233, 239–254, 264
src/algokit_utils/beta
   __init__.py21210%1–67
src/algokit_utils/clients
   algorand_client.py941386%62–63, 72–73, 96–98, 107–108, 202, 222, 235, 251
   client_manager.py1483775%53–60, 66, 90–92, 122, 127–130, 144, 171, 195–198, 220, 244, 256, 270, 286–311, 337, 349, 358
   dispenser_api_client.py831286%126–127, 131–134, 169–171, 190–192
src/algokit_utils/errors
   logic_error.py561279%14, 38, 105–121
src/algokit_utils/models
   account.py63690%81, 86, 107–114
   amount.py1155651%34, 58, 66, 120, 125–128, 132, 135–141, 148, 151–155, 158–162, 165–169, 172–176, 179–183, 186–192, 195–198, 201–207
   application.py42198%8
   state.py36586%51, 55–58
   transaction.py55493%56, 66, 86, 91
src/algokit_utils/protocols
   client.py23674%6–11
src/algokit_utils/transactions
   transaction_composer.py5755291%28–37, 624, 666, 826–827, 853–854, 890, 1040, 1045, 1074–1112, 1232, 1235, 1361, 1363–1364, 1413–1414
   transaction_creator.py75791%120, 125, 130, 135, 140, 145, 160
   transaction_sender.py1471093%83, 205, 246–247, 336–341, 346–347, 371
   utils.py2026866%31, 45, 52, 76, 78, 80, 97, 103, 131–194, 223, 241–243, 249–264, 271–278, 281–288, 299, 367, 370, 375, 379–390
TOTAL607094184% 

Tests Skipped Failures Errors Time
353 0 💤 0 ❌ 0 🔥 3m 46s ⏱️

docs/source/capabilities/account.md Outdated Show resolved Hide resolved

## `Account` and Transaction Signing

The core type that holds information about a signer/sender pair for a transaction in Python is the `Account` class, which represents both the signing capability and sender address in one object. This is different from the TypeScript implementation which uses `TransactionSignerAccount` interface that combines an `algosdk.TransactionSigner` with a sender address.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we should mirror the TS utils here? Might be worth a chat.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed, will introduce a further overhaul to have TransactionSignerAccount introduced as a protocol, would require a bigger chunk of changes so will address in a separate PR as part of last batch of improvements in preparation for pypi release. Will keep the issue unresolved for now

docs/source/capabilities/account.md Outdated Show resolved Hide resolved
Comment on lines 12 to 16
algorand = AlgorandClient.default_local_net()
# Point to TestNet using AlgoNode free tier
algorand = AlgorandClient.test_net()
# Point to MainNet using AlgoNode free tier
algorand = AlgorandClient.main_net()
Copy link
Contributor

Choose a reason for hiding this comment

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

If we changed local_net to localnet, this would apply to main_net and test_net etc.

docs/source/capabilities/algorand-client.md Outdated Show resolved Hide resolved
docs/source/capabilities/app-manager.md Outdated Show resolved Hide resolved
Comment on lines 154 to 157
- `accounts: list[str] | None` - Any account addresses to add to the accounts array
- `foreign_apps: list[int] | None` - The ID of any apps to load to the foreign apps array
- `foreign_assets: list[int] | None` - The ID of any assets to load to the foreign assets array
- `boxes: list[BoxReference | BoxIdentifier] | None` - Any boxes to load to the boxes array
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as previous comment about matching the TS naming.

docs/source/capabilities/transaction-composer.md Outdated Show resolved Hide resolved
docs/source/capabilities/transaction.md Show resolved Hide resolved
docs/source/capabilities/transfer.md Outdated Show resolved Hide resolved
aorumbayev and others added 3 commits December 23, 2024 16:50
Renaming network related namings from *_net to *net
Co-authored-by: Neil Campbell <neil.campbell@makerx.com.au>
@aorumbayev aorumbayev merged commit b3dec7f into prerelease/ts-feature-parity Dec 23, 2024
4 checks passed
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.

2 participants