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

feat: TransactionComposer & AppManager implementation; various ongoing refactoring efforts #120

Merged

Conversation

aorumbayev
Copy link
Contributor

@aorumbayev aorumbayev commented Oct 24, 2024

Proposed Changes

  • Add AppManager class with methods for compiling TEAL, managing app state, and handling template variables. Reusing existing methods from deploy.py in legacy.
  • Update TransactionComposer to use AppManager
  • Move Account model back from legacy folder into a dedicated account namespace under models folder.
  • Add new models for ABI values and application constants
  • Improve type annotations and remove unnecessary type ignores
  • Add initial tests for AppManager template substitution and comment stripping
  • Update mypy configuration to globally exclude untyped calls in algosdk -> removing ~50 individual mypy type ignore for algosdk

TODO

  • Implement remaining feature parity on beta composer
  • Add composer tests

…; initial tests

- Add AppManager class with methods for compiling TEAL, managing app state, and handling template variables
- Update TransactionComposer to use AppManager
- Move Account model to a separate file and update imports
- Add new models for ABI values and application constants
- Improve type annotations and remove unnecessary type ignores
- Add initial tests for AppManager template substitution and comment stripping
- Update mypy configuration to *globally* exclude untyped calls in algosdk -> removing ~50 individual mypy type ignore for algosdk
@aorumbayev aorumbayev force-pushed the prerelease/ts-feature-parity-composer branch from 2df03e4 to 30e3f7d Compare October 24, 2024 01:29
Copy link

github-actions bot commented Oct 24, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit_utils
   _debugging.py140795%20, 41, 76, 80, 89, 129, 157
   application_client.py110%1
   config.py511865%38–39, 50, 55, 60, 64–69, 100–109
   deploy.py110%1
   logic_error.py110%1
src/algokit_utils/_legacy_v2
   _ensure_funded.py69199%99
   _transfer.py67396%13, 76–77
   account.py851385%14–17, 61–65, 96, 109, 136, 139, 183
   application_client.py5297785%59–60, 167, 172, 201, 313, 318–319, 321, 323, 788, 803, 821–824, 914, 954, 966, 979, 1021, 1081–1087, 1091–1096, 1098, 1134, 1141, 1254, 1284, 1298, 1336–1338, 1340, 1350–1407, 1418–1423, 1443–1446
   application_specification.py971189%92, 94, 193–202, 206
   asset.py79594%9, 27–30
   common.py13192%13
   deploy.py4312295%32–35, 170, 174–175, 192, 248, 337–338, 359, 393, 404–412, 427, 435, 628–629, 653
   logic_error.py39295%8, 31
   network_clients.py63395%93–94, 125
src/algokit_utils/accounts
   account_manager.py552751%39–40, 62–65, 80–82, 85–87, 94–101, 112–117, 131–135, 138–140
src/algokit_utils/applications
   app_manager.py2256870%76–77, 187–193, 196, 199–203, 218, 221–225, 228–230, 240–252, 255, 260–264, 269, 273–305, 316–319, 329–345
src/algokit_utils/clients
   algorand_client.py1092478%113, 125–126, 135–136, 157–159, 168–169, 173–181, 191, 195, 205, 210, 234, 249, 265, 278, 294
   client_manager.py371073%30, 51–53, 58–60, 65–68
   dispenser_api_client.py821285%112–113, 117–120, 155–157, 176–178
src/algokit_utils/models
   account.py24675%18, 23–25, 34–35
   amount.py955641%12, 14, 17–20, 28, 32, 36, 44, 48, 52, 56, 60, 63–69, 72, 75–81, 84–88, 91–95, 98–102, 105–109, 112–116, 119–123
src/algokit_utils/transactions
   models.py12120%1–30
   transaction_composer.py50411278%22–30, 638–639, 642–643, 646–647, 650–651, 654–655, 662–663, 666–667, 670–671, 674–675, 678–679, 682–683, 690–691, 694–695, 698, 721–722, 776–777, 781, 825, 827, 829, 832, 835, 840, 843, 847, 850, 866–907, 973–974, 978–979, 999, 1002, 1020, 1043–1049, 1054–1062, 1067–1077, 1082–1095, 1099, 1112, 1131–1149
   transaction_sender.py411466%47, 56–75, 80
TOTAL299150783% 

Tests Skipped Failures Errors Time
212 0 💤 0 ❌ 0 🔥 2m 24s ⏱️

@aorumbayev aorumbayev marked this pull request as ready for review November 1, 2024 18:04
@aorumbayev
Copy link
Contributor Author

@robdmoore @neilcampbell , please ignore the dummy stubs for AssetComposer and AlgorandClientTransaction(Sender|Creator), had to fill those with initial data to ensure CI is passing, the main scope of the pr is still AppManager and TransactionComposer. Should be ready for initial review, will merge Monday and continue with remaining abstractions (next 2 prs are going to be around AlgorandClientTransaction(Sender|Creator) and AppClient)

@aorumbayev aorumbayev force-pushed the prerelease/ts-feature-parity-composer branch from 5ad77e2 to 72e488e Compare November 1, 2024 18:09
@aorumbayev aorumbayev force-pushed the prerelease/ts-feature-parity-composer branch from 72e488e to f4b201d Compare November 1, 2024 18:17
@aorumbayev aorumbayev merged commit 1c77ad8 into prerelease/ts-feature-parity Nov 4, 2024
4 checks passed
@aorumbayev aorumbayev deleted the prerelease/ts-feature-parity-composer branch November 4, 2024 16:16
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