Skip to content

Commit a539d60

Browse files
committed
Merge branch 'release/v2.1.0'
2 parents e90337d + 7945502 commit a539d60

28 files changed

+1059
-352
lines changed

.circleci/config.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ workflows:
77
- unit-test:
88
matrix:
99
parameters:
10-
python-version: ["3.8", "3.9", "3.10"]
10+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1111
- integration-test:
1212
matrix:
1313
parameters:
14-
python-version: ["3.8", "3.9", "3.10"]
14+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1515
- docset
1616

1717
jobs:
@@ -24,9 +24,8 @@ jobs:
2424
steps:
2525
- checkout
2626
- run: pip install -r requirements.txt
27-
- run: black --check .
28-
- run: mypy algosdk
29-
- run: pytest tests/unit_tests
27+
- run: make lint
28+
- run: make pytest-unit
3029
integration-test:
3130
parameters:
3231
python-version:

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
# v2.1.0
4+
5+
## What's Changed
6+
### Bugfixes
7+
* bugfix: fix msig sks type + a couple other mypy complaints by @barnjamin in https://github.com/algorand/py-algorand-sdk/pull/434
8+
* fix: remove unused positional argument "contract_type" from OverspecifiedRoundError and UnderspecifiedRoundError by @ori-shem-tov in https://github.com/algorand/py-algorand-sdk/pull/438
9+
* Fix: Revert .test-env in develop by @bbroder-algo in https://github.com/algorand/py-algorand-sdk/pull/445
10+
### New Features
11+
* New Feature: Adding methods to use the simulate endpoint by @barnjamin in https://github.com/algorand/py-algorand-sdk/pull/420
12+
### Enhancements
13+
* Infrastructure: Add setup.py check to circle ci by @algochoi in https://github.com/algorand/py-algorand-sdk/pull/427
14+
* Enhancement: Type Friendly Exports by @tzaffi in https://github.com/algorand/py-algorand-sdk/pull/435
15+
* Algod: Add disassembly endpoint and implement cucumber test by @algochoi in https://github.com/algorand/py-algorand-sdk/pull/440
16+
* Enhancement: Upgrade black, mypy, and add type annotations to algod.py by @tzaffi in https://github.com/algorand/py-algorand-sdk/pull/442
17+
18+
## New Contributors
19+
* @ori-shem-tov made their first contribution in https://github.com/algorand/py-algorand-sdk/pull/438
20+
* @bbroder-algo made their first contribution in https://github.com/algorand/py-algorand-sdk/pull/445
21+
22+
**Full Changelog**: https://github.com/algorand/py-algorand-sdk/compare/v2.0.0...v2.0.1
23+
324
# v2.0.0
425

526
## What's Changed

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
UNIT_TAGS := "$(subst :, or ,$(shell awk '{print $2}' tests/unit.tags | paste -s -d: -))"
22
INTEGRATION_TAGS := "$(subst :, or ,$(shell awk '{print $2}' tests/integration.tags | paste -s -d: -))"
33

4+
generate-init:
5+
python -m scripts.generate_init
6+
7+
check-generate-init:
8+
python -m scripts.generate_init --check
9+
10+
black:
11+
black --check .
12+
13+
mypy:
14+
mypy algosdk
15+
16+
sdist-check:
17+
python setup.py check -s
18+
python setup.py check -s 2>&1 | (! grep -qEi 'error|warning')
19+
20+
lint: check-generate-init black mypy sdist-check
21+
22+
pytest-unit:
23+
pytest tests/unit_tests
24+
425
unit:
526
behave --tags=$(UNIT_TAGS) tests -f progress2
627

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,25 @@ Set up the Algorand Sandbox based test-harness without running the tests
4141

4242
* `make harness`
4343

44-
Format code:
44+
Format code
4545

4646
* `black .`
4747

48-
Lint types:
48+
Update `algosdk/__init__.pyi` which allows downstream developers importing `algosdk` and using VSCode's PyLance to have improved type analysis
4949

50-
* `mypy algosdk`
50+
* `make generate-init`
51+
52+
Lint types
53+
54+
* `make mypy` (or `mypy algosdk`)
55+
56+
Check all lints required by the C.I. process
57+
58+
* `make lint`
59+
60+
Run non-test-harness related unit tests
61+
62+
* `make pytest-unit`
5163

5264
## Quick start
5365

algosdk/__init__.py

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
1-
from . import abi
2-
from . import account
3-
from . import auction
4-
from . import constants
5-
from . import dryrun_results
6-
from . import encoding
7-
from . import error
8-
from . import kmd
9-
from . import logic
10-
from . import mnemonic
11-
from . import transaction
12-
from . import util
13-
from . import v2client
14-
from . import wallet
15-
from . import wordlist
16-
from . import source_map
1+
from . import (
2+
abi,
3+
account,
4+
auction,
5+
constants,
6+
dryrun_results,
7+
encoding,
8+
error,
9+
kmd,
10+
logic,
11+
mnemonic,
12+
source_map,
13+
transaction,
14+
util,
15+
v2client,
16+
wallet,
17+
wordlist,
18+
)
19+
20+
from .abi import __all__ as abi_all
21+
from .v2client import __all__ as v2client_all
22+
23+
# begin __all__
24+
__all__ = (
25+
abi_all
26+
+ v2client_all
27+
+ [
28+
"abi",
29+
"account",
30+
"auction",
31+
"constants",
32+
"dryrun_results",
33+
"encoding",
34+
"error",
35+
"kmd",
36+
"logic",
37+
"mnemonic",
38+
"source_map",
39+
"transaction",
40+
"util",
41+
"v2client",
42+
"wallet",
43+
"wordlist",
44+
]
45+
) # type: ignore
46+
# end __all__
1747

1848
name = "algosdk"

algosdk/__init__.pyi

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
## File generated from scripts/generate_init.py.
2+
## DO NOT EDIT DIRECTLY
3+
4+
from . import (
5+
abi,
6+
account,
7+
auction,
8+
constants,
9+
dryrun_results,
10+
encoding,
11+
error,
12+
kmd,
13+
logic,
14+
mnemonic,
15+
source_map,
16+
transaction,
17+
util,
18+
v2client,
19+
wallet,
20+
wordlist,
21+
)
22+
23+
from .abi import __all__ as abi_all
24+
from .v2client import __all__ as v2client_all
25+
26+
__all__ = [
27+
"ABIReferenceType",
28+
"ABITransactionType",
29+
"ABIType",
30+
"AddressType",
31+
"Argument",
32+
"ArrayDynamicType",
33+
"ArrayStaticType",
34+
"BoolType",
35+
"ByteType",
36+
"Contract",
37+
"Interface",
38+
"Method",
39+
"NetworkInfo",
40+
"Returns",
41+
"StringType",
42+
"TupleType",
43+
"UfixedType",
44+
"UintType",
45+
"abi",
46+
"account",
47+
"algod",
48+
"auction",
49+
"check_abi_transaction_type",
50+
"constants",
51+
"dryrun_results",
52+
"encoding",
53+
"error",
54+
"indexer",
55+
"is_abi_reference_type",
56+
"is_abi_transaction_type",
57+
"kmd",
58+
"logic",
59+
"mnemonic",
60+
"source_map",
61+
"transaction",
62+
"util",
63+
"v2client",
64+
"wallet",
65+
"wordlist",
66+
]
67+
68+
name = "algosdk"

algosdk/abi/__init__.py

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,45 @@
1-
from algosdk.abi.uint_type import UintType
2-
from algosdk.abi.ufixed_type import UfixedType
3-
from algosdk.abi.base_type import ABIType
4-
from algosdk.abi.bool_type import BoolType
5-
from algosdk.abi.byte_type import ByteType
61
from algosdk.abi.address_type import AddressType
7-
from algosdk.abi.string_type import StringType
82
from algosdk.abi.array_dynamic_type import ArrayDynamicType
93
from algosdk.abi.array_static_type import ArrayStaticType
10-
from algosdk.abi.tuple_type import TupleType
11-
from algosdk.abi.method import Method, Argument, Returns
12-
from algosdk.abi.interface import Interface
4+
from algosdk.abi.base_type import ABIType
5+
from algosdk.abi.bool_type import BoolType
6+
from algosdk.abi.byte_type import ByteType
137
from algosdk.abi.contract import Contract, NetworkInfo
8+
from algosdk.abi.interface import Interface
9+
from algosdk.abi.method import Argument, Method, Returns
10+
from algosdk.abi.reference import ABIReferenceType, is_abi_reference_type
11+
from algosdk.abi.string_type import StringType
1412
from algosdk.abi.transaction import (
1513
ABITransactionType,
16-
is_abi_transaction_type,
1714
check_abi_transaction_type,
15+
is_abi_transaction_type,
1816
)
19-
from algosdk.abi.reference import ABIReferenceType, is_abi_reference_type
17+
from algosdk.abi.tuple_type import TupleType
18+
from algosdk.abi.ufixed_type import UfixedType
19+
from algosdk.abi.uint_type import UintType
20+
21+
__all__ = [
22+
"ABIReferenceType",
23+
"ABITransactionType",
24+
"ABIType",
25+
"AddressType",
26+
"Argument",
27+
"ArrayDynamicType",
28+
"ArrayStaticType",
29+
"BoolType",
30+
"ByteType",
31+
"check_abi_transaction_type",
32+
"Contract",
33+
"Interface",
34+
"Method",
35+
"NetworkInfo",
36+
"Returns",
37+
"StringType",
38+
"TupleType",
39+
"UfixedType",
40+
"UintType",
41+
"is_abi_reference_type",
42+
"is_abi_transaction_type",
43+
]
2044

2145
name = "abi"

algosdk/abi/interface.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from algosdk.abi.method import Method, MethodDict, get_method_by_name
55

6+
67
# In Python 3.11+ the following classes should be combined using `NotRequired`
78
class InterfaceDict_Optional(TypedDict, total=False):
89
desc: str

algosdk/abi/method.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from algosdk import abi, constants, error
77

8+
89
# In Python 3.11+ the following classes should be combined using `NotRequired`
910
class MethodDict_Optional(TypedDict, total=False):
1011
desc: str

0 commit comments

Comments
 (0)