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
Allow Modifying Transaction in Dry Run and Other Improvements #9
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tzaffi
commented
Apr 14, 2022
@@ -57,4 +68,4 @@ gh-sandbox-test: | |||
|
|||
gh-blackbox-smoke: blackbox-smoke-prefix gh-sandbox-test | |||
|
|||
gh-blackbox: gh-blackbox-smoke integration-test | |||
gh-blackbox: gh-blackbox-smoke integration-test notebooks-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing jupyter notebooks as well
tzaffi
commented
Apr 14, 2022
@@ -126,16 +133,16 @@ def line_or_err(i, ln): | |||
), f"mismatch of lengths in tls v. stacks ({N} v. {len(stacks)})" | |||
|
|||
# process scratch var's | |||
scratches = [ | |||
_scr1 = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed to rename throw-away variables to make mypy
happy
tzaffi
changed the title
WIP: Allow Modifying Transaction in Dry Run
Allow Modifying Transaction in Dry Run and Other Improvements
Apr 20, 2022
tzaffi
commented
Apr 21, 2022
tzaffi
commented
Apr 21, 2022
TODO: delete branch after #17 merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
.github/workflows/build.yml
+Makefile
:graviton/blackbox.py
:mypy
graviton/dryrun.py
:mypy
graviton/deprecated_dry_run.py
: new module that contains functionality mostly used by the now deprecatedDryRunTestCaseMixin
graviton/deprecated_dryrun_mixin.py
: where the now deprecatedDryRunTestCaseMixin
is definedgraviton/dryrun.py
:mypy
passpprint()
now returns a string, in addition to printinggraviton/invariant.py
: makemypy
passgraviton/models.py
: new module that contains lightweight models such as theApp
andLSig
dataclassesmypy.ini
: needed by mypynotebooks
: new directory for Jupyter notebooks. It contains:IMAGES.md
: a static file that shows examples of 3D graphs of dry-runsnotebooks/notebooks_test.ipynb
: explains how to test notebooks withpytest
notebooks/quadratic_factoring_game.ipynb
: Blackbox demosetup.py
: new Jupyter notebooks requirements, and declaration for receiving projects that this package is typedtests/integration/algod_test.py
: separate out the test thatalgod
is alive and well into a seperate integration test, for easier debuggingtests/integration/algod_test.py
: small refactoring, mostly formypy
tests/integration/dryrun_mixin_docs_test.py
: refactoring mostly due to deprecationstests/integration/lsig_test.py
: New logic sig only test. THIS NEEDS A CLEANUP.adding
pytest-xdist
for faster integration testing.Comparison on github:
(58.19 secs for python 3.10)
(37.64 secs for python 3.10)
Local test comparison:
Runniing with a single thread:
❯ make integration-test NUM_PROCS=1 ... ================================================================== slowest 10 durations =================================================================== 16.47s call tests/integration/blackbox_test.py::test_app_with_report[app_slow_fibonacci] 8.85s call tests/integration/blackbox_test.py::test_logicsig_with_report[lsig_slow_fibonacci] 5.03s call tests/integration/blackbox_test.py::test_logicsig_with_report[lsig_string_mult] 4.83s call tests/integration/blackbox_test.py::test_app_with_report[app_string_mult] 4.70s call tests/integration/lsig_test.py::test_factorizer_game_version_report[V4] 4.25s call tests/integration/lsig_test.py::test_factorizer_game_version_report[V3] 3.90s call tests/integration/lsig_test.py::test_factorizer_report_with_pymnt 3.56s call tests/integration/lsig_test.py::test_factorizer_game_version_report[V2] 2.43s call tests/integration/lsig_test.py::test_factorizer_game_version_report[V1] 1.49s call tests/integration/dryrun_mixin_docs_test.py::ExampleTestCase::test_factorial ========= 1737 passed in 82.38s (0:01:22) =========
With
❯ make integration-test ... ================================================================== slowest 10 durations =================================================================== 38.58s call tests/integration/blackbox_test.py::test_app_with_report[app_slow_fibonacci] 25.53s call tests/integration/blackbox_test.py::test_logicsig_with_report[lsig_slow_fibonacci] 19.45s call tests/integration/lsig_test.py::test_factorizer_game_version_report[V4] 18.16s call tests/integration/lsig_test.py::test_factorizer_game_version_report[V3] 18.12s call tests/integration/blackbox_test.py::test_app_with_report[app_string_mult] 16.77s call tests/integration/blackbox_test.py::test_logicsig_with_report[lsig_string_mult] 6.77s call tests/integration/dryrun_mixin_docs_test.py::ExampleTestCase::test_factorial 5.49s call tests/integration/lsig_test.py::test_factorizer_report_with_pymnt 4.59s call tests/integration/lsig_test.py::test_factorizer_game_version_report[V1] 3.27s call tests/integration/lsig_test.py::test_factorizer_game_version_report[V2] ========= 1737 passed in 44.31s =========