-
Notifications
You must be signed in to change notification settings - Fork 11
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: algokit-utils-py v3 implementation #119
Conversation
39a8844
to
f569a20
Compare
…ls-ts - Moving all v2 code into legacy_v2 folder inside src - Moving all v2 tests into legacy_v2_tests - Moving all files in beta into more granular folder structure
f569a20
to
9389170
Compare
@neilcampbell @robdmoore , please note the bit around proposal with each folder having its own models.py might be revised. As im implementing the composer and moving out some of the legacy abstractions back to root models folder i might have to ditch the initial models per folder idea and create files |
…g refactoring efforts (#120) * feat: Initial AppManager implementation; wip on Composer; mypy tweaks; 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 * chore: removing models.py folders in favour of granular modules in root models namespace * chore: wip * feat: initial implementation of TransactionComposer
…ractions (#123) * chore: wip * feat: initial implementation of TransactionSender, TransactionCreator and AssetManager
…ments on top of existing new interfaces (#124) * chore: bump ruff * chore: wip; arc32 to arc56 converter * chore: wip * chore: wip * chore: wip * chore: wip * chore: finalizing initial tests around call * chore: wip * chore: extra tests; wip * chore: adding initial logic error exposer * chore: resource population; skeletons for appdeployer and appfactory * chore: adding draft deprecation warnings; wip * chore: wip * chore: wip * chore: wip * chore: wip * chore: mypy and ruff tweaks wip * chore: make some asset param fields optional; add subtraction dunder to AlgoAmount * chore: more tests; updating deprecation decorators; initial tweaks for ruff
…population tests (#125) * fix: configure method tweaks; fixing appdeployresult init * test: adding first half of resource population tests; improving composer txn generation
* chore: wip * chore: refining AppFactory and AppDeployer implementations * chore: adding missing client retrieval methods; missing box state accessor * chore: aligning kmd config resolution * chore: fixing default signer assignment in app factory * chore: fix state accessor * refactor: reusing useful legacy code; refining pyproject; refining deploy response in factory * chore: adding module deprecation warnings; aliasing applicationspec to arc32contract * refactor: rewriting arc56 converter and arc56contract class * refactor: remaining batch of refactoring efforts; improving project structure
57aa2ab
to
92774f7
Compare
* docs: adding rewritten app client amount and account sections; respective docstrings * docs: initial rewrites for appmanager; clients and debugger docs * docs: adding migration guide, refining remaining capabilities; adding missing exports * chore: addressing pr comments Renaming network related namings from *_net to *net * chore: update docs/source/capabilities/transfer.md Co-authored-by: Neil Campbell <neil.campbell@makerx.com.au> --------- Co-authored-by: Neil Campbell <neil.campbell@makerx.com.au>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still working through the code.
* chore: initial methods for typed client generator * fix: fixing arc2 note generation in AppDeployer * fix: changing CompiledTeal compiled to str from bytes; patching _build_source_map * refactor: adding usage of collections.abc.Sequence for args params * refactor: expose algorand client protocol; expand to cover latest interface * refactor: patch compile_teal_template behaviour around deployment_metadata * refactor: using generics for abi_return type in AppFactoryCreateMethodCallResult * refactor: making deploy arg types in app factory rely on generic (for redefinition in client generator) * refactor: further leveraging generics to match ts behaviour, the abi_return type turns into ABIValue * fix: proper use of type vars for client manager typed class getters * refactor: make all bare properties on app client send/createTxn/params optional * refactor: add error handler for simulate responses * fix: proper handling of default args from hints * fix: proper handling of getting abi args with default values (when no args given) * fix: typo in generics inheritance * refactor: ensure send calls from AppClient for methods parse output to arc56 values * fix: skip snake case conversion for struct field in arc56 * fix: group id generation for log during send atc * fix: exposing AppMethodCallTransactionArgument for typed client * fix: fixing params creation in factory * fix: safer global state decoding * refactor: parametrize indent in to_json methods of arc classes * fix: typo in get_map decoding * fix: box key decoding * refactor: contravariant typevars for typed factory protocol plus a fix for box decoding
e61b723
to
b8911e0
Compare
b8911e0
to
690b567
Compare
eb81ab6
to
2f2bb17
Compare
…est; adding extra deprecation warning
7a77b62
to
38238ea
Compare
- excluding html folder from generation (until produciton release is out) -> as this will refresh self hosted docs
38238ea
to
f8cb58f
Compare
81ddc55
to
226a32a
Compare
226a32a
to
9af713d
Compare
Proposed changes
This PR is to be used as a temporary dev branch for all feature parity prs as we gradually progress with the refactoring efforts.
Implementation plan
1. Preparing codebase for breaking changes
Moving all v2 code into legacy_v2 folder inside src
Moving all v2 tests into legacy_v2_tests
Moving all
beta
abstractions related tests intotests
- which will be expanding as refactoring progresses (some tests might be pulled back from legacy_v2_tests folder).Keeping all individual .py files at the root of the algokit-utils to forward exports to ensure backwards compatibility
2. Breaking down
beta
module into dedicated modules that will represent the refactored v3 of utils-pyThe proposed new structure is as follows:
New abstractions are significantly more type heavy, the v2 of utils-py contained a module named
models
at the root represented as a file, its turned into a folder now and re exposes the old legacy models, however the intent is to reuse it and later add more granular files inside for various abstractions (assets, apps, and etc)Note that some files from legacy_v2 and/or root .py files that expose the contents of legacy_v2 for backwards compatibility will be resurrected and repurposed (if it will make sense, similar to what was done with models.py -> models folder)
3. Implement
TransactionComposer
(previouslyAlgoKitComposer
) and any dependant abstractionsImplemented in: #120
AppFactory
,AppClient
andAppDeployer
abstractionsImplemented and refined in: #127
Implemented in: #128
Work in progress
Work in progress