Skip to content

Commit

Permalink
Merge branch 'release/v2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
algobarb committed Mar 14, 2023
2 parents e90337d + 7945502 commit a539d60
Show file tree
Hide file tree
Showing 28 changed files with 1,059 additions and 352 deletions.
9 changes: 4 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ workflows:
- unit-test:
matrix:
parameters:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
- integration-test:
matrix:
parameters:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
- docset

jobs:
Expand All @@ -24,9 +24,8 @@ jobs:
steps:
- checkout
- run: pip install -r requirements.txt
- run: black --check .
- run: mypy algosdk
- run: pytest tests/unit_tests
- run: make lint
- run: make pytest-unit
integration-test:
parameters:
python-version:
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

# v2.1.0

## What's Changed
### Bugfixes
* bugfix: fix msig sks type + a couple other mypy complaints by @barnjamin in https://github.com/algorand/py-algorand-sdk/pull/434
* 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
* Fix: Revert .test-env in develop by @bbroder-algo in https://github.com/algorand/py-algorand-sdk/pull/445
### New Features
* New Feature: Adding methods to use the simulate endpoint by @barnjamin in https://github.com/algorand/py-algorand-sdk/pull/420
### Enhancements
* Infrastructure: Add setup.py check to circle ci by @algochoi in https://github.com/algorand/py-algorand-sdk/pull/427
* Enhancement: Type Friendly Exports by @tzaffi in https://github.com/algorand/py-algorand-sdk/pull/435
* Algod: Add disassembly endpoint and implement cucumber test by @algochoi in https://github.com/algorand/py-algorand-sdk/pull/440
* Enhancement: Upgrade black, mypy, and add type annotations to algod.py by @tzaffi in https://github.com/algorand/py-algorand-sdk/pull/442

## New Contributors
* @ori-shem-tov made their first contribution in https://github.com/algorand/py-algorand-sdk/pull/438
* @bbroder-algo made their first contribution in https://github.com/algorand/py-algorand-sdk/pull/445

**Full Changelog**: https://github.com/algorand/py-algorand-sdk/compare/v2.0.0...v2.0.1

# v2.0.0

## What's Changed
Expand Down
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
UNIT_TAGS := "$(subst :, or ,$(shell awk '{print $2}' tests/unit.tags | paste -s -d: -))"
INTEGRATION_TAGS := "$(subst :, or ,$(shell awk '{print $2}' tests/integration.tags | paste -s -d: -))"

generate-init:
python -m scripts.generate_init

check-generate-init:
python -m scripts.generate_init --check

black:
black --check .

mypy:
mypy algosdk

sdist-check:
python setup.py check -s
python setup.py check -s 2>&1 | (! grep -qEi 'error|warning')

lint: check-generate-init black mypy sdist-check

pytest-unit:
pytest tests/unit_tests

unit:
behave --tags=$(UNIT_TAGS) tests -f progress2

Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,25 @@ Set up the Algorand Sandbox based test-harness without running the tests

* `make harness`

Format code:
Format code

* `black .`

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

* `mypy algosdk`
* `make generate-init`

Lint types

* `make mypy` (or `mypy algosdk`)

Check all lints required by the C.I. process

* `make lint`

Run non-test-harness related unit tests

* `make pytest-unit`

## Quick start

Expand Down
62 changes: 46 additions & 16 deletions algosdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,48 @@
from . import abi
from . import account
from . import auction
from . import constants
from . import dryrun_results
from . import encoding
from . import error
from . import kmd
from . import logic
from . import mnemonic
from . import transaction
from . import util
from . import v2client
from . import wallet
from . import wordlist
from . import source_map
from . import (
abi,
account,
auction,
constants,
dryrun_results,
encoding,
error,
kmd,
logic,
mnemonic,
source_map,
transaction,
util,
v2client,
wallet,
wordlist,
)

from .abi import __all__ as abi_all
from .v2client import __all__ as v2client_all

# begin __all__
__all__ = (
abi_all
+ v2client_all
+ [
"abi",
"account",
"auction",
"constants",
"dryrun_results",
"encoding",
"error",
"kmd",
"logic",
"mnemonic",
"source_map",
"transaction",
"util",
"v2client",
"wallet",
"wordlist",
]
) # type: ignore
# end __all__

name = "algosdk"
68 changes: 68 additions & 0 deletions algosdk/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
## File generated from scripts/generate_init.py.
## DO NOT EDIT DIRECTLY

from . import (
abi,
account,
auction,
constants,
dryrun_results,
encoding,
error,
kmd,
logic,
mnemonic,
source_map,
transaction,
util,
v2client,
wallet,
wordlist,
)

from .abi import __all__ as abi_all
from .v2client import __all__ as v2client_all

__all__ = [
"ABIReferenceType",
"ABITransactionType",
"ABIType",
"AddressType",
"Argument",
"ArrayDynamicType",
"ArrayStaticType",
"BoolType",
"ByteType",
"Contract",
"Interface",
"Method",
"NetworkInfo",
"Returns",
"StringType",
"TupleType",
"UfixedType",
"UintType",
"abi",
"account",
"algod",
"auction",
"check_abi_transaction_type",
"constants",
"dryrun_results",
"encoding",
"error",
"indexer",
"is_abi_reference_type",
"is_abi_transaction_type",
"kmd",
"logic",
"mnemonic",
"source_map",
"transaction",
"util",
"v2client",
"wallet",
"wordlist",
]

name = "algosdk"
46 changes: 35 additions & 11 deletions algosdk/abi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
from algosdk.abi.uint_type import UintType
from algosdk.abi.ufixed_type import UfixedType
from algosdk.abi.base_type import ABIType
from algosdk.abi.bool_type import BoolType
from algosdk.abi.byte_type import ByteType
from algosdk.abi.address_type import AddressType
from algosdk.abi.string_type import StringType
from algosdk.abi.array_dynamic_type import ArrayDynamicType
from algosdk.abi.array_static_type import ArrayStaticType
from algosdk.abi.tuple_type import TupleType
from algosdk.abi.method import Method, Argument, Returns
from algosdk.abi.interface import Interface
from algosdk.abi.base_type import ABIType
from algosdk.abi.bool_type import BoolType
from algosdk.abi.byte_type import ByteType
from algosdk.abi.contract import Contract, NetworkInfo
from algosdk.abi.interface import Interface
from algosdk.abi.method import Argument, Method, Returns
from algosdk.abi.reference import ABIReferenceType, is_abi_reference_type
from algosdk.abi.string_type import StringType
from algosdk.abi.transaction import (
ABITransactionType,
is_abi_transaction_type,
check_abi_transaction_type,
is_abi_transaction_type,
)
from algosdk.abi.reference import ABIReferenceType, is_abi_reference_type
from algosdk.abi.tuple_type import TupleType
from algosdk.abi.ufixed_type import UfixedType
from algosdk.abi.uint_type import UintType

__all__ = [
"ABIReferenceType",
"ABITransactionType",
"ABIType",
"AddressType",
"Argument",
"ArrayDynamicType",
"ArrayStaticType",
"BoolType",
"ByteType",
"check_abi_transaction_type",
"Contract",
"Interface",
"Method",
"NetworkInfo",
"Returns",
"StringType",
"TupleType",
"UfixedType",
"UintType",
"is_abi_reference_type",
"is_abi_transaction_type",
]

name = "abi"
1 change: 1 addition & 0 deletions algosdk/abi/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

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


# In Python 3.11+ the following classes should be combined using `NotRequired`
class InterfaceDict_Optional(TypedDict, total=False):
desc: str
Expand Down
1 change: 1 addition & 0 deletions algosdk/abi/method.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from algosdk import abi, constants, error


# In Python 3.11+ the following classes should be combined using `NotRequired`
class MethodDict_Optional(TypedDict, total=False):
desc: str
Expand Down
Loading

0 comments on commit a539d60

Please sign in to comment.