Commit 85dd58a
feat: deferred app calls, modular test context, refined access to value generators, numerous fixes/improvements (#4)
* feat: work in progress on asset, application related state ops
* test: adding extra tests
* feat: extra tests and implementation wrappers around AppLocal
* chore: wip
* chore: update src/algopy_testing/op.py
Co-authored-by: Daniel McGregor <daniel.mcgregor@makerx.com.au>
* feat: adding acctparamsget; extra tests; pr comments
* refactor: adding final bits around AcctParamsGet; unit tests and fixes
* refactor: adding lookup by index to acct/app/asset get ops; tweaking ci
* refactor: addressing pr comments
* chore: fixing failing test
* refactor: simplifying test_context validation
* use specific enum types in box example with latest puya version
* include box types in algopy_testing
* fix inconsistent usage of field names on application fields
use state total overrides when determining state totals
reduce usage of `import algopy` in implementations
* expose fields property on application to aid debugging
* added section to CONTRIBUTING.md describing relationship between `algopy` and `algopy_testing`
* remove lazy algopy imports from utils
remove some unnecessary ignores
add TODO
* simplify abimethod and add TODO's
* add TODO for state totals
* add some tests (including currently failing ones) for app transactions
* feat: add arc4factory
* refactor: ensuring underlying _key is properly reflected on local/global states
* refactor: change guards for setting keys to explicitly check for None
* refactor: use implementation types in internal mappings
* refactor: remove usages of `import algopy` from op.py, remove explicit imports from typing module
add TODO's
* test: use non-abstract contract base
* allow empty box prefix
* refactor
* use immutable param defaults
* fix: handle populating foreign arrays correctly for abi method calls
* refactor: remove lazy import algopy
* remove irrelevant comment
* initialize accounts correctly
* build: adding post install command into examples venv in hatch settings
* refactor: refine arc4 factory; add corresponding tests
* chore: adding the missing clear methods
* chore: merging everything from docs branch except docs changes
* chore: merge conflicts
* refactor: simplify txn implementations
provide default values for unspecified txn fields
* docs: adding pep257 formatter; using reST docstrings style for context.py
* test: adding tests for scratch slots
* refactor: renaming set_txn_fields -> scoped_txn_fields
* chore: adding `amount` field and open question under TODO;
also adding adding get_box_map that reuses get_box but appends the bytes box_map prefix
* chore: bumping ruff
* refactor: adding context manager for lsig args setup (similar to algopy.Txn)
also running latest ruff - some rules are updated
* refactor: move helper classes into their own file
* refactor: simplify itxn loader
* refactor: isolate get_test_context to reduce circular imports
* chore: using multiprocessing in refresh test artifacts script
* refactor: adding tests for ITxn, ITxnCreate and GITxn, fixing related bugs
* refactor: default_creator -> default_sender; setting creator as default_sender
* chore: parsing name to op name in ITxn
* chore: updating default extension for mypy to use ms-python
* test: remove incorrect test and replace with TODO
* chore: add TODO about subroutine support
* add stricter type checks for primitives
* track when contracts are in a "creating" state or not
* todos
* refactor: moving GITxn class to itxn.py
* refactor: generate arc4 signatures from types
added more robust system for tracking arc4 types
removed unneeded functions on StaticArray
* only support native tuples when handling generic aliases in arc4 tuples
* refactor: 1/2 adding paged access to clear state program in txn fields
* refactor: consolidating txn and itxn related context attributes/methods
* minor refactors
* support arc4 structs
* refactor: simplify logic sig implementation, and remove mapping
* refactor: fix itxn op behaviour with program pages, and other array like fields
* refactor: simplify account properties
* refactor: move crypto ops into their own module
* refactor: move pure ops into their own module
* refactor: move other misc ops
* refactor: consolidating value generators; ledger and txn contexts;
* refactor: add active group/txn properties
change local/global state storage to store values against the app, not the contract instance
add UInt64Backed type to simplify serialization to/from int/bytes
* refactor: remove nested private modules, replace usages of get_test_context with lazy_context
* refactor: move inner transactions onto transaction group
* refactor: remove scoped_lsig_args
* refactor: remove maybe_active_app_id
* refactor: include bool in test for uint64
* refactor: ensure arc4 values always have fully parametrized types
* refactor: use _paramatize_type
* refactor: addressing TODOs
refactor: removing txn from method names inside txn context manager prop
chore: restoring initial pre-commit
refactor: expanding scoped_execution
chore: remove redundant fields
chore: addressing minor todos and removing the ones already addressed
* refactor: adding unit tests for global/local state with implicit keys
* refactor: improving handling of initial value for implicit global/local state keys
* test: extra test cases for accessing implicit/explicit keyed local/global state
* refactor: wip adding txn_group_for method
* chore: fix linting errors
* feat: continue with txn_group_for and add a test
* chore: remove scoped_txn_fields methods
* add some additional TODO's for scoped_execution
* remove TODO
* expand gaid TODO
* tweak op.exit implementation and add TODO
* remove arc4 property from AlgopyTestContext
* add more TODOs
* refactor: addressing TODOs; adding marketplace contract example (devrel bootcamps)
* test: fixing failing tests
---------
Co-authored-by: Daniel McGregor <daniel.mcgregor@makerx.com.au>1 parent dfa0a1b commit 85dd58a
File tree
157 files changed
+18092
-6737
lines changed- .github/workflows
- .vscode
- docs
- examples
- auction
- box
- htlc_logicsig
- marketplace
- proof_of_attendance
- scratch_storage
- simple_voting
- zk_whitelist
- scripts
- src
- algopy_testing
- _context_helpers
- _value_generators
- decorators
- models
- op
- primitives
- state
- utilities
- algopy
- tests
- arc4
- artifacts
- Arc4ABIMethod
- data
- Arc4InnerTxns/data
- Arc4PrimitiveOps/data
- CryptoOps
- data
- GlobalStateValidator
- data
- MiscellaneousOps/data
- PrimitiveOps/data
- StateOps
- data
- models
- state
- utilities
- value_generators
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
157 files changed
+18092
-6737
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | 20 | | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
0 commit comments