Skip to content

Commit

Permalink
fix: revert avoiding oncomplete ignore in app client calls (to be add…
Browse files Browse the repository at this point in the history
…ed as breaking change) (#88)
  • Loading branch information
aorumbayev authored May 13, 2024
1 parent 1fbf2d6 commit 661edeb
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 1,231 deletions.
622 changes: 14 additions & 608 deletions docs/html/_sources/apidocs/algokit_utils/algokit_utils.md.txt

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/html/_sources/capabilities/debugging.md.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Debugger

The AlgoKit Python Utilities package provides a set of debugging tools that can be used to simulate and trace transactions on the Algorand blockchain. These tools and methods are optimized for developers who are building applications on Algorand and need to test and debug their smart contracts via [AlgoKit AVM Debugger extension](https://marketplace.visualstudio.com/items?itemName=algorandfoundation.algokit-avm-vscode-debugger).
The AlgoKit Python Utilities package provides a set of debugging tools that can be used to simulate and trace transactions on the Algorand blockchain. These tools and methods are optimized for developers who are building applications on Algorand and need to test and debug their smart contracts via [AVM Debugger extension](link to vscode extension).

## Configuration

The `config.py` file contains the `UpdatableConfig` class which manages and updates configuration settings for the AlgoKit project. The class has the following attributes:

- `debug`: Indicates whether debug mode is enabled.
- `project_root`: The path to the project root directory. Can be ignored if you are using `algokit_utils` inside an `algokit` compliant project (containing `.algokit.toml` file). For non algokit compliant projects, simply provide the path to the folder where you want to store sourcemaps and traces to be used with [`AlgoKit AVM Debugger`](https://github.com/algorandfoundation/algokit-avm-vscode-debugger). Alternatively you can also set the value via the `ALGOKIT_PROJECT_ROOT` environment variable.
- `trace_all`: Indicates whether to trace all operations. Defaults to false, this means that when debug mode is enabled, any (or all) application client calls performed via `algokit_utils` will store responses from `simulate` endpoint. These files are called traces, and can be used with `AlgoKit AVM Debugger` to debug TEAL source codes, transactions in the atomic group and etc.
- `project_root`: The path to the project root directory. Can be ignored if you are using `algokit_utils` inside an `algokit` compliant project (containing `.algokit.toml` file). For non algokit compliant projects, simply provide the path to the folder where you want to store sourcemaps and traces to be used with [`AVM Debugger`](links to extension). Alternatively you can also set the value via the `ALGOKIT_PROJECT_ROOT` environment variable.
- `trace_all`: Indicates whether to trace all operations. Defaults to false, this means that when debug mode is enabled, any (or all) application client calls performed via `algokit_utils` will store responses from `simulate` endpoint. These files are called traces, and can be used with [AVM Debugger](link to vscode extension) to debug TEAL source codes, transactions in the atomic group and etc.
- `trace_buffer_size_mb`: The size of the trace buffer in megabytes. By default uses 256 megabytes. When output folder containing debug trace files exceedes the size, oldest files are removed to optimize for storage consumption.
- `max_search_depth`: The maximum depth to search for a an `algokit` config file. By default it will traverse at most 10 folders searching for `.algokit.toml` file which will be used to assume algokit compliant project root path.

Expand Down
365 changes: 9 additions & 356 deletions docs/html/apidocs/algokit_utils/algokit_utils.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/html/capabilities/debugging.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@

<section id="debugger">
<h1>Debugger<a class="headerlink" href="#debugger" title="Permalink to this heading"></a></h1>
<p>The AlgoKit Python Utilities package provides a set of debugging tools that can be used to simulate and trace transactions on the Algorand blockchain. These tools and methods are optimized for developers who are building applications on Algorand and need to test and debug their smart contracts via <a class="reference external" href="https://marketplace.visualstudio.com/items?itemName=algorandfoundation.algokit-avm-vscode-debugger">AlgoKit AVM Debugger extension</a>.</p>
<p>The AlgoKit Python Utilities package provides a set of debugging tools that can be used to simulate and trace transactions on the Algorand blockchain. These tools and methods are optimized for developers who are building applications on Algorand and need to test and debug their smart contracts via [AVM Debugger extension](link to vscode extension).</p>
<section id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">config.py</span></code> file contains the <code class="docutils literal notranslate"><span class="pre">UpdatableConfig</span></code> class which manages and updates configuration settings for the AlgoKit project. The class has the following attributes:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">debug</span></code>: Indicates whether debug mode is enabled.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">project_root</span></code>: The path to the project root directory. Can be ignored if you are using <code class="docutils literal notranslate"><span class="pre">algokit_utils</span></code> inside an <code class="docutils literal notranslate"><span class="pre">algokit</span></code> compliant project (containing <code class="docutils literal notranslate"><span class="pre">.algokit.toml</span></code> file). For non algokit compliant projects, simply provide the path to the folder where you want to store sourcemaps and traces to be used with <a class="reference external" href="https://github.com/algorandfoundation/algokit-avm-vscode-debugger"><code class="docutils literal notranslate"><span class="pre">AlgoKit</span> <span class="pre">AVM</span> <span class="pre">Debugger</span></code></a>. Alternatively you can also set the value via the <code class="docutils literal notranslate"><span class="pre">ALGOKIT_PROJECT_ROOT</span></code> environment variable.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">trace_all</span></code>: Indicates whether to trace all operations. Defaults to false, this means that when debug mode is enabled, any (or all) application client calls performed via <code class="docutils literal notranslate"><span class="pre">algokit_utils</span></code> will store responses from <code class="docutils literal notranslate"><span class="pre">simulate</span></code> endpoint. These files are called traces, and can be used with <code class="docutils literal notranslate"><span class="pre">AlgoKit</span> <span class="pre">AVM</span> <span class="pre">Debugger</span></code> to debug TEAL source codes, transactions in the atomic group and etc.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">project_root</span></code>: The path to the project root directory. Can be ignored if you are using <code class="docutils literal notranslate"><span class="pre">algokit_utils</span></code> inside an <code class="docutils literal notranslate"><span class="pre">algokit</span></code> compliant project (containing <code class="docutils literal notranslate"><span class="pre">.algokit.toml</span></code> file). For non algokit compliant projects, simply provide the path to the folder where you want to store sourcemaps and traces to be used with [<code class="docutils literal notranslate"><span class="pre">AVM</span> <span class="pre">Debugger</span></code>](links to extension). Alternatively you can also set the value via the <code class="docutils literal notranslate"><span class="pre">ALGOKIT_PROJECT_ROOT</span></code> environment variable.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">trace_all</span></code>: Indicates whether to trace all operations. Defaults to false, this means that when debug mode is enabled, any (or all) application client calls performed via <code class="docutils literal notranslate"><span class="pre">algokit_utils</span></code> will store responses from <code class="docutils literal notranslate"><span class="pre">simulate</span></code> endpoint. These files are called traces, and can be used with [AVM Debugger](link to vscode extension) to debug TEAL source codes, transactions in the atomic group and etc.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">trace_buffer_size_mb</span></code>: The size of the trace buffer in megabytes. By default uses 256 megabytes. When output folder containing debug trace files exceedes the size, oldest files are removed to optimize for storage consumption.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">max_search_depth</span></code>: The maximum depth to search for a an <code class="docutils literal notranslate"><span class="pre">algokit</span></code> config file. By default it will traverse at most 10 folders searching for <code class="docutils literal notranslate"><span class="pre">.algokit.toml</span></code> file which will be used to assume algokit compliant project root path.</p></li>
</ul>
Expand Down
Loading

1 comment on commit 661edeb

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit_utils
   _debugging.py140795%20, 41, 76, 80, 89, 129, 157
   _ensure_funded.py69199%99
   _transfer.py67396%13, 76–77
   account.py851385%14–17, 61–65, 96, 109, 136, 139, 183
   application_client.py5287785%58–59, 166, 171, 200, 312, 317–318, 320, 322, 787, 802, 820–823, 913, 953, 965, 978, 1020, 1080–1086, 1090–1095, 1097, 1133, 1140, 1253, 1283, 1297, 1335–1337, 1339, 1349–1406, 1417–1422, 1442–1445
   application_specification.py971189%92, 94, 193–202, 206
   asset.py79594%9, 27–30
   common.py13192%13
   config.py511865%38–39, 50, 55, 60, 64–69, 100–109
   deploy.py4552495%30–33, 168, 172–173, 190, 205, 246, 402, 413–421, 438–441, 451, 459, 652–653, 677
   dispenser_api.py821285%112–113, 117–120, 155–157, 176–178
   logic_error.py38295%6, 29
   models.py125695%45, 50–52, 61–62
   network_clients.py74396%106–107, 138
src/algokit_utils/beta
   account_manager.py551475%39–40, 64, 123–130, 183–187, 198–200
   algorand_client.py1011585%111–112, 121–122, 143–145, 154–155, 224, 259, 274, 290, 303, 319
   client_manager.py371073%40, 61–63, 68–70, 75–78
   composer.py3207178%335–336, 339–340, 343–344, 347–348, 355–356, 359–360, 389, 391, 393, 396, 399, 404, 407, 411, 414, 456–489, 494–505, 510–516, 521–529, 549–562, 566, 590, 593–610, 618, 643, 659–660, 662–663, 665–666, 668–669, 671–672, 678–682
TOTAL243029388% 

Tests Skipped Failures Errors Time
206 0 💤 0 ❌ 0 🔥 2m 1s ⏱️

Please sign in to comment.