Skip to content

Commit

Permalink
4.0.0
Browse files Browse the repository at this point in the history
Upgrade to dfx 0.21.0

Print versions of wasi2ic, ic-wasi-polyfill & mingw64 (on Windows)
  • Loading branch information
icppWorld committed Jul 18, 2024
1 parent 0b3499e commit ae391b0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions scripts/all_canister_deploy_local_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def main() -> int:
run_dfx_cmd("deploy", cwd=canister_path)

typer.echo(f"--\nRun pytest on {test_api_path}")
run_shell_cmd(f"pytest --network=local {test_api_path}", cwd=ROOT_PATH)
run_shell_cmd(f"pytest -vv --network=local {test_api_path}", cwd=ROOT_PATH)

typer.echo("--\nStop the local network")
run_dfx_cmd("stop")
Expand Down Expand Up @@ -73,7 +73,7 @@ def main() -> int:
run_dfx_cmd("deploy", cwd=canister_path)

typer.echo(f"--\nRun pytest on {test_api_path}")
run_shell_cmd(f"pytest --network=local {test_api_path}", cwd=ROOT_PATH)
run_shell_cmd(f"pytest -vv --network=local {test_api_path}", cwd=ROOT_PATH)

typer.echo("--\nStop the local network")
run_dfx_cmd("stop")
Expand Down
20 changes: 16 additions & 4 deletions src/icpp/options_main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
"""Callback functions of our icpp typer app"""

import platform
from typing import Optional
import typer
from icpp.__main__ import app
from icpp import __version__, __version_wasi_sdk__, __version_rust__
from icpp import (
__version__,
__version_wasi_sdk__,
__version_rust__,
__version_mingw64__,
__version_ic_wasi_polyfill__,
__version_wasi2ic__,
)


def version_callback(value: bool) -> None:
Expand All @@ -12,9 +20,13 @@ def version_callback(value: bool) -> None:
When the user issues the command `icpp --version`, this callback is called.
"""
if value:
typer.echo(f"icpp-pro version: {__version__}")
typer.echo(f"wasi-sdk version: {__version_wasi_sdk__}")
typer.echo(f"rust version : {__version_rust__}")
typer.echo(f"icpp-pro version: {__version__}")
typer.echo(f"wasi-sdk version: {__version_wasi_sdk__}")
typer.echo(f"wasi2ic version: {__version_wasi2ic__}")
typer.echo(f"ic-wasi-polyfill version: {__version_ic_wasi_polyfill__}")
typer.echo(f"rust version: {__version_rust__}")
if platform.win32_ver()[0]:
typer.echo(f"mingw64 version: {__version_mingw64__}")
raise typer.Exit()


Expand Down
2 changes: 1 addition & 1 deletion src/icpp/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
https://packaging.python.org/guides/single-sourcing-package-version/
"""

__version__ = "4.0.0rc1"
__version__ = "4.0.0"
14 changes: 1 addition & 13 deletions test/canisters/canister_1/test/test_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def test__roundtrip_text_to_json_to_text__negative_2(
canister_argument=text_in,
network=network,
)
assert "trapped explicitly" in response
assert "Failed call to api" in response


def test__roundtrip_reserved(network: str, principal: str) -> None:
Expand Down Expand Up @@ -1727,11 +1727,6 @@ def test__trap_wrong_number_of_args(network: str, principal: str) -> None:
network=network,
)
assert "Failed call to api" in response
assert "trapped explicitly" in response
assert (
"ERROR: Done with all the expected args, but there is an additional non Opt arg on the wire."
in response
)


# Verify that a canister traps if from_wire is called more than once
Expand All @@ -1747,10 +1742,6 @@ def test__trap_multiple_calls_from_wire(network: str, principal: str) -> None:
network=network,
)
assert "Failed call to api" in response
assert "trapped explicitly" in response
assert (
"ERROR: The canister is calling ic_api.from_wire() more than once." in response
)


# Verify that a canister traps if to_wire is called more than once
Expand All @@ -1766,8 +1757,6 @@ def test__trap_multiple_calls_to_wire(network: str, principal: str) -> None:
network=network,
)
assert "Failed call to api" in response
assert "trapped explicitly" in response
assert "ERROR: The canister is calling ic_api.to_wire() more than once." in response


# Verify that a record traps if one of the records's id (hash) on wire does not match expected
Expand All @@ -1783,4 +1772,3 @@ def test__trap_roundtrip_record(network: str, principal: str) -> None:
network=network,
)
assert "Failed call to api" in response
assert "trapped explicitly" in response

0 comments on commit ae391b0

Please sign in to comment.