Skip to content

Conversation

@aorumbayev
Copy link
Contributor

@aorumbayev aorumbayev commented Jan 31, 2025

Proposed Changes

  • Throwing LogicError instead of generic Exception if error message is detected in sources (covers the case when its considered to be a runtime error). Previously it would always init a generic Exception, instead now it would throw a logic error if it was properly loaded and parsed prior to detecting runtime error. Same behavior seems to be consistent on utils-ts so we would need to propagate this patch to ts as well (cc @neilcampbell). Reported by @cusma as he noticed a lot of breaking changes for runtime errors which were still technically LogicErrors thrown from on-chain teal invocation during his migration on d-asa repo. The change should also reduce # of breaking changes with the previous utils.
  • Fixing minor typo in docstring (get_account() on account_manager only accepts str type) reported by @iskysun96
  • Adds algo, micro_algo, ALGORAND_MIN_TX_FEE, transaction_fees helpers that utils ts expose as well. Additionally, rewrites constructor to use a more pythonic set of overloads instead of expecting a dictionary, in this case it was too direct in translating the ts implementation (reported by @iskysun96 @cusma )
  • Adds an ignore statement for TestNetDispenser abstraction to ensure pytest does not think its a test abstraction (reported by @iskysun96 )
  • Integrating CommonAppCallParams from the generator py and trimming some redundant dataclasses, note that generator py would need to be updated to use the beta version triggered by merge of this PR. (reported by @iskysun96 )
  • Updating ApplicationClient migration section to further align with typescript migration guide

@aorumbayev aorumbayev force-pushed the fix/feedback-batch-2 branch 3 times, most recently from 000b29a to cc7b698 Compare February 1, 2025 00:55
@aorumbayev aorumbayev force-pushed the fix/feedback-batch-2 branch from cc7b698 to c3fe207 Compare February 1, 2025 00:56
@github-actions
Copy link

github-actions bot commented Feb 1, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit_utils
   _debugging.py1411887%21, 40–42, 45, 54, 62, 81, 87, 96, 110–114, 133, 141–143
   account.py330%1–12
   algorand.py981585%62–63, 74–75, 95–96, 108–110, 119–120, 214, 234, 247, 263
   application_client.py330%1–11
   application_specification.py770%1–39
   config.py891880%26–28, 41, 53, 84–85, 100, 105, 110, 118–123, 153, 155, 157
   deploy.py330%1–10
   logic_error.py330%1–10
src/algokit_utils/_legacy_v2
   _ensure_funded.py71199%100
   _transfer.py70396%14, 75–76
   account.py931386%15–18, 70–74, 109, 126, 156, 159, 203
   application_client.py5367786%56–57, 175, 180, 209, 321, 326–327, 329, 331, 800, 815, 833–836, 930, 970, 982, 995, 1037, 1097–1103, 1107–1112, 1114, 1150, 1157, 1270, 1306, 1320, 1358–1360, 1362, 1372–1429, 1440–1445, 1465–1468
   asset.py80495%24–27
   common.py13192%13
   deploy.py4072295%32–35, 170, 174–175, 193, 249, 339–340, 361, 395, 406–414, 429, 437, 593–594, 618
   network_clients.py73593%77–78, 101–102, 135
src/algokit_utils/accounts
   account_manager.py2133385%162, 181–182, 206–211, 229–230, 247, 264–269, 316–318, 347, 386, 406–410, 423, 482, 503, 660, 766, 845, 850, 869–870, 893
   kmd_account_manager.py72889%49–53, 94, 150, 157
src/algokit_utils/applications
   abi.py1307145%14, 74, 110, 116, 118, 120, 124–125, 140–159, 175, 178–184, 200–213, 226–238, 253–264
   app_client.py69021469%65–73, 132, 140, 334–337, 340, 343, 346, 349, 361–364, 367, 370, 373, 376, 388, 397, 406, 409–476, 489–547, 571–573, 590–593, 601–604, 612–615, 623–626, 634–637, 648–651, 664, 760–763, 797, 809, 821, 833, 845, 860, 875, 885, 895, 905, 915, 925, 962–975, 991, 1008, 1025, 1042, 1063, 1084, 1174, 1319, 1366–1367, 1398, 1400, 1406, 1451–1459, 1492–1495, 1498–1501, 1522, 1570, 1633–1635, 1648–1655, 1696, 1713, 1715, 1718, 1722, 1849, 1860–1861, 1884, 1894–1896, 1899–1921, 1931, 1940–1955, 1960–1965
   app_deployer.py2094081%97, 195, 202, 212–217, 220–224, 262–276, 291–292, 481–494, 504, 509, 515, 521–523, 530, 544, 555–596
   app_factory.py2662790%351, 361, 364, 508, 516, 528, 677, 691–696, 702–703, 721, 746, 757–758, 794, 802–816
   app_manager.py2181693%226, 285–286, 318–323, 349, 367–368, 398, 419–422, 445, 454
src/algokit_utils/applications/app_spec
   arc32.py95892%198–207
   arc56.py4703692%72–74, 183, 318, 336–337, 415, 437–439, 495, 504, 506, 574, 769, 779, 783, 943, 945, 978–989, 1002, 1004–1005, 1021
src/algokit_utils/assets
   asset_manager.py1061289%266–267, 276, 282–306, 316
src/algokit_utils/clients
   client_manager.py1765469%24–26, 74–81, 95, 127–129, 185, 196–199, 224, 263, 298–303, 338–340, 370, 388, 407, 441–444, 477–480, 514–517, 547–550, 568–593, 623, 632, 640
   dispenser_api_client.py841286%129–130, 134–137, 172–174, 193–195
src/algokit_utils/errors
   logic_error.py561180%14, 105–121
src/algokit_utils/models
   account.py881484%31, 33, 79–80, 127, 135, 159–166, 180–181, 189, 197
   amount.py1261787%47, 58, 144, 154, 160, 168, 173–175, 182, 187–189, 196, 203, 216, 222
   application.py42198%8
   state.py36586%51, 55–58
   transaction.py51394%66, 86, 91
src/algokit_utils/protocols
   account.py11282%17, 22
   typed_clients.py24483%12–24
src/algokit_utils/transactions
   transaction_composer.py95113086%34–41, 619, 622, 627, 631–642, 674, 715, 782, 789, 811, 844, 907–970, 999, 1017–1019, 1025–1040, 1045, 1053, 1055, 1057, 1073, 1079, 1114–1121, 1124–1131, 1142, 1236, 1285, 1533–1534, 1573–1574, 1613, 1664–1668, 1824, 1827, 1846, 1851, 1875–1877, 1914–1950, 1957–1964, 2105, 2108, 2233, 2235–2236, 2286–2287
   transaction_creator.py75791%116, 121, 126, 131, 136, 141, 156
   transaction_sender.py1481093%88, 243, 286–287, 431–436, 441–442, 487
TOTAL625393185% 

Tests Skipped Failures Errors Time
396 0 💤 0 ❌ 0 🔥 3m 52s ⏱️

@aorumbayev aorumbayev force-pushed the fix/feedback-batch-2 branch from 6abf73a to 1744001 Compare February 2, 2025 00:55
@aorumbayev aorumbayev merged commit 0693abc into main Feb 3, 2025
4 checks passed
@aorumbayev aorumbayev deleted the fix/feedback-batch-2 branch February 3, 2025 09:41
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.

3 participants