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: algokit-utils-py v3 implementation #119

Merged
merged 32 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9389170
refactor: preparing codebase for gradual feature parity sync with uti…
aorumbayev Oct 22, 2024
1c77ad8
feat: TransactionComposer & AppManager implementation; various ongoin…
aorumbayev Nov 4, 2024
6cd11be
feat: AlgorandClientTransaction(Creator|Sender) and AssetManager abst…
aorumbayev Nov 6, 2024
62c121a
feat: AppClient, AppFactory, AppDeployer interface and various refine…
aorumbayev Dec 11, 2024
18744fe
chore: expose new interfaces
aorumbayev Dec 11, 2024
6bf71aa
refactor: further aligning composer class; initial batch of resource …
aorumbayev Dec 13, 2024
ec8cb13
chore: remaining resource packing related tests (#126)
aorumbayev Dec 16, 2024
92774f7
refactor: refining codebase; cleanup for initial beta release (#127)
aorumbayev Dec 20, 2024
8628075
feat: add offline_key_reg transaction to sender/creator/composer abst…
aorumbayev Dec 23, 2024
b3dec7f
docs: initial documentation for beta release (#128)
aorumbayev Dec 23, 2024
8024d37
refactor: refinements to support client generator v3 (#130)
aorumbayev Jan 22, 2025
a0efebc
refactor: remove AlgorandClientProtocol
aorumbayev Jan 22, 2025
06a59a9
refactor: removing AlgorandClientProtocol; extra type narrowing tweaks
aorumbayev Jan 22, 2025
dd75634
refactor: addressing pr comments
aorumbayev Jan 23, 2025
e9a9d63
docs: refining docstrings; enforcing sphinx styled format
aorumbayev Jan 23, 2025
64de8e4
Merge remote-tracking branch 'origin/main' into prerelease/ts-feature…
aorumbayev Jan 23, 2025
5abbed3
feat: refactoring the resource population to support cover appcall it…
aorumbayev Jan 24, 2025
42007ee
fix: further fixes revealed after refreshing generator against app ca…
aorumbayev Jan 25, 2025
8da2dfe
fix: add missing extra_program_pages calculation in method txn creation
aorumbayev Jan 25, 2025
1df5083
refactor: reusing OnSchemaBreak, OnUpdate, OperationPerformed
aorumbayev Jan 26, 2025
d01d90e
refactor: refine dataclasses; moving send and compilation params into…
aorumbayev Jan 26, 2025
b6e21fe
fix: remove skip signature for debug related simulate as it always tr…
aorumbayev Jan 26, 2025
f1036de
refactor: addressing pr comments
aorumbayev Jan 27, 2025
fc17da9
refactor: addressing pr comments
aorumbayev Jan 27, 2025
690b567
refactor: addressing pr comments
aorumbayev Jan 27, 2025
0755c87
docs: further refinements in capabilities .md files
aorumbayev Jan 28, 2025
1bf49e3
refactor: addressing pr comments
aorumbayev Jan 28, 2025
719e140
docs: typo in logic error description
aorumbayev Jan 28, 2025
cf14b5c
fix: improving regex usage in logic error message parser; bumping pyt…
aorumbayev Jan 28, 2025
f8cb58f
docs: refreshing documentation;
aorumbayev Jan 29, 2025
c14941b
docs: add migration note to readme
aorumbayev Jan 29, 2025
9af713d
docs: addressing pr comments
aorumbayev Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/workflows/check-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ jobs:
- name: Check types with mypy
run: poetry run mypy

- name: Check docs are up to date
run: |
poetry run poe docs
git diff --quiet --exit-code \
':!docs/html/_sources/apidocs/algokit_utils/algokit_utils.md.txt' \
':!docs/html/apidocs/algokit_utils/algokit_utils.html' \
':!docs/html/searchindex.js' \
':!docs/markdown/apidocs/algokit_utils/algokit_utils.md' \
docs/
# TODO: uncomment after bulk of feature parity with ts is addressed
# - name: Check docs are up to date
# run: |
# poetry run poe docs
# git diff --quiet --exit-code \
# ':!docs/html/_sources/apidocs/algokit_utils/algokit_utils.md.txt' \
# ':!docs/html/apidocs/algokit_utils/algokit_utils.html' \
# ':!docs/html/searchindex.js' \
# ':!docs/markdown/apidocs/algokit_utils/algokit_utils.md' \
# docs/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,6 @@ cython_debug/
/docs/source/apidocs

!docs/html

# Received approval test files
*.received.*
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ repos:
additional_dependencies: []
minimum_pre_commit_version: "0"
files: "^(src|tests)/"
exclude: "^tests/artifacts/"
- id: mypy
name: mypy
description: "`mypy` will check Python types for correctness"
Expand All @@ -33,3 +34,11 @@ repos:
additional_dependencies: []
minimum_pre_commit_version: "2.9.2"
files: "^(src|tests)/"
exclude: "^tests/artifacts/"
- id: docstrings-check
name: docstrings-check
description: "Check docstrings for correctness"
entry: poetry run poe docstrings-check
language: system
types: [python]
files: "^(src)/"
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "Python: Debug Tests",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"purpose": [
"debug-test"
],
"console": "integratedTerminal",
"justMyCode": false
}
]
}
23 changes: 12 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,24 @@
"**/__pycache__": true,
".idea": true
},

// Python
"platformSettings.autoLoad": true,
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
"python.analysis.extraPaths": ["${workspaceFolder}/src"],
"python.analysis.extraPaths": [
"${workspaceFolder}/src"
],
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
},
"python.analysis.exclude": [
"tests/artifacts/**"
],
"python.analysis.typeCheckingMode": "basic",
"ruff.enable": true,
"ruff.lint.run": "onSave",
"ruff.lint.args": ["--config=pyproject.toml"],
"ruff.lint.args": [
"--config=pyproject.toml"
],
"ruff.importStrategy": "fromEnvironment",
"ruff.fixAll": true, //lint and fix all files in workspace
"ruff.organizeImports": true, //organize imports on save
Expand All @@ -37,7 +43,6 @@
"ruff.codeAction.fixViolation": {
"enable": true
},

"mypy.configFile": "pyproject.toml",
// set to empty array to use config from project
"mypy.targets": [],
Expand All @@ -52,11 +57,7 @@
}
]
},

// PowerShell
"[powershell]": {
"editor.defaultFormatter": "ms-vscode.powershell"
},
"powershell.codeFormatting.preset": "Stroustrup",
"python.testing.pytestArgs": ["."]
"python.testing.pytestArgs": [
"."
],
}
69 changes: 35 additions & 34 deletions docs/markdown/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,47 @@ The goal of this library is to provide intuitive, productive utility functions t
Largely these functions wrap the underlying Algorand SDK, but provide a higher level interface with sensible defaults and capabilities for common tasks.

#### NOTE

If you prefer TypeScript there’s an equivalent [TypeScript utility library](https://github.com/algorandfoundation/algokit-utils-ts).

[Core principles]() | [Installation]() | [Usage]() | [Capabilities]() | [Reference docs]()

# Contents

* [Account management](capabilities/account.md)
* [`Account`](capabilities/account.md#account)
* [Client management](capabilities/client.md)
* [Network configuration](capabilities/client.md#network-configuration)
* [Clients](capabilities/client.md#clients)
* [App client](capabilities/app-client.md)
* [Design](capabilities/app-client.md#design)
* [Creating an application client](capabilities/app-client.md#creating-an-application-client)
* [Calling methods on the app](capabilities/app-client.md#calling-methods-on-the-app)
* [Composing calls](capabilities/app-client.md#composing-calls)
* [Reading state](capabilities/app-client.md#reading-state)
* [Handling logic errors and diagnosing errors](capabilities/app-client.md#handling-logic-errors-and-diagnosing-errors)
* [App deployment](capabilities/app-deploy.md)
* [Design](capabilities/app-deploy.md#design)
* [Finding apps by creator](capabilities/app-deploy.md#finding-apps-by-creator)
* [Deploying an application](capabilities/app-deploy.md#deploying-an-application)
* [Algo transfers](capabilities/transfer.md)
* [Transferring Algos](capabilities/transfer.md#transferring-algos)
* [Ensuring minimum Algos](capabilities/transfer.md#ensuring-minimum-algos)
* [Transfering Assets](capabilities/transfer.md#transfering-assets)
* [Dispenser](capabilities/transfer.md#dispenser)
* [TestNet Dispenser Client](capabilities/dispenser-client.md)
* [Creating a Dispenser Client](capabilities/dispenser-client.md#creating-a-dispenser-client)
* [Funding an Account](capabilities/dispenser-client.md#funding-an-account)
* [Registering a Refund](capabilities/dispenser-client.md#registering-a-refund)
* [Getting Current Limit](capabilities/dispenser-client.md#getting-current-limit)
* [Error Handling](capabilities/dispenser-client.md#error-handling)
* [Debugger](capabilities/debugger.md)
* [Configuration](capabilities/debugger.md#configuration)
* [Debugging Utilities](capabilities/debugger.md#debugging-utilities)
* [`algokit_utils`](apidocs/algokit_utils/algokit_utils.md)
* [Data](apidocs/algokit_utils/algokit_utils.md#data)
* [Classes](apidocs/algokit_utils/algokit_utils.md#classes)
* [Functions](apidocs/algokit_utils/algokit_utils.md#functions)
- [Account management](capabilities/account.md)
- [`Account`](capabilities/account.md#account)
- [Client management](capabilities/client.md)
- [Network configuration](capabilities/client.md#network-configuration)
- [Clients](capabilities/client.md#clients)
- [App client](capabilities/app-client.md)
- [Design](capabilities/app-client.md#design)
- [Creating an application client](capabilities/app-client.md#creating-an-application-client)
- [Calling methods on the app](capabilities/app-client.md#calling-methods-on-the-app)
- [Composing calls](capabilities/app-client.md#composing-calls)
- [Reading state](capabilities/app-client.md#reading-state)
- [Handling logic errors and diagnosing errors](capabilities/app-client.md#handling-logic-errors-and-diagnosing-errors)
- [App deployment](capabilities/app-deploy.md)
- [Design](capabilities/app-deploy.md#design)
- [Finding apps by creator](capabilities/app-deploy.md#finding-apps-by-creator)
- [Deploying an application](capabilities/app-deploy.md#deploying-an-application)
- [Algo transfers](capabilities/transfer.md)
- [Transferring Algos](capabilities/transfer.md#transferring-algos)
- [Ensuring minimum Algos](capabilities/transfer.md#ensuring-minimum-algos)
- [Transfering Assets](capabilities/transfer.md#transfering-assets)
- [Dispenser](capabilities/transfer.md#dispenser)
- [TestNet Dispenser Client](capabilities/dispenser-client.md)
- [Creating a Dispenser Client](capabilities/dispenser-client.md#creating-a-dispenser-client)
- [Funding an Account](capabilities/dispenser-client.md#funding-an-account)
- [Registering a Refund](capabilities/dispenser-client.md#registering-a-refund)
- [Getting Current Limit](capabilities/dispenser-client.md#getting-current-limit)
- [Error Handling](capabilities/dispenser-client.md#error-handling)
- [Debugger](capabilities/debugger.md)
- [Configuration](capabilities/debugger.md#configuration)
- [Debugging Utilities](capabilities/debugger.md#debugging-utilities)
- [`algokit_utils`](apidocs/algokit_utils/algokit_utils.md)
- [Data](apidocs/algokit_utils/algokit_utils.md#data)
- [Classes](apidocs/algokit_utils/algokit_utils.md#classes)
- [Functions](apidocs/algokit_utils/algokit_utils.md#functions)

<a id="core-principles"></a>

Expand Down
Loading
Loading