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

Test against Py 3.11 + Break out non-DryRun-executing functions in blackbox.py into new script inspector.py #48

Merged
merged 8 commits into from
Jan 13, 2023

Conversation

tzaffi
Copy link
Contributor

@tzaffi tzaffi commented Jan 12, 2023

In an attempt to make PR #45 easier to follow, I'm front running this one in first.

No new functionality is being introduced.

C.I. Improvements

Originally, graviton introduced an algod for the purposes of dry run testing. Later, PyTeal improved on it by bringing wwinder's nightly docker build. Now, the chickens have come home to roost and it's time to bring the PyTeal improved C.I. process back to graviton.

Related issues - to be resolved:

@tzaffi tzaffi changed the title Test against Py 11 + Reordering of Classes in blackbox.py Test against Py 3.11 + Reordering of Classes in blackbox.py Jan 12, 2023
@tzaffi tzaffi changed the title Test against Py 3.11 + Reordering of Classes in blackbox.py Test against Py 3.11 + Reorg of Classes in blackbox.py Jan 12, 2023
@@ -46,222 +35,6 @@
MAX_APP_ARG_LIMIT = atc.AtomicTransactionComposer.MAX_APP_ARG_LIMIT


class DryRunProperty(Enum):
Copy link
Contributor Author

@tzaffi tzaffi Jan 12, 2023

Choose a reason for hiding this comment

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

This, and several other non-DryRun-execution related code has been broken out to inspector.py

Choose a reason for hiding this comment

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

much better

@@ -0,0 +1,847 @@
from base64 import b64decode
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All this code came from blackbox.py. No changes other than the re-location.

@tzaffi tzaffi changed the title Test against Py 3.11 + Reorg of Classes in blackbox.py Test against Py 3.11 + Break out non-executing functions in blackbox.py into new script inspector.py Jan 12, 2023
tzaffi pushed a commit to tzaffi/graviton that referenced this pull request Jan 13, 2023
inspector.max_stack_height() == 2
inspector.status() == ("REJECT" if x == 0 else "PASS")
inspector.final_scratch() == ({} if x == 0 else {0: x})
assert inspector.stack_top() == x**2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

for some reason, assertions were dropped. So I'm resuscitating these.

@tzaffi tzaffi changed the title Test against Py 3.11 + Break out non-executing functions in blackbox.py into new script inspector.py Test against Py 3.11 + Break out non-DryRun-executing functions in blackbox.py into new script inspector.py Jan 13, 2023
with:
config: ${{ env.SANDBOX_CONFIG }}
- name: Start algod
run: make algod-start

Choose a reason for hiding this comment

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

nice

Copy link
Contributor

Choose a reason for hiding this comment

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

nice x2

)
from graviton.blackbox import ExecutionMode
from graviton.inspector import DryRunInspector, DryRunProperty, mode_has_property
from graviton.models import PyTypes

Choose a reason for hiding this comment

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

much better

@bbroder-algo
Copy link

i like it, good move forward

@tzaffi
Copy link
Contributor Author

tzaffi commented Jan 13, 2023

i like it, good move forward

Can i haz thummms up pleez

Copy link
Contributor

@ahangsu ahangsu left a comment

Choose a reason for hiding this comment

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

generally lgtm, just moving classes from blackbox.py to inspector.py, and renamed BlackboxResults to DryRunResults. Together with a much simpler build.yml using Will's algod image.

@tzaffi tzaffi merged commit 4486987 into algorand:main Jan 13, 2023
@tzaffi tzaffi deleted the prelude-to-45 branch January 13, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants