-
Notifications
You must be signed in to change notification settings - Fork 997
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
Combine specs and test-generators #851
Conversation
Co-authored-by: Chih Cheng Liang <[email protected]> Co-authored-by: Danny Ryan <[email protected]> Co-authored-by: Dmitrii Shmatko <[email protected]> Co-authored-by: Jannik Luhn <[email protected]> Co-authored-by: Paul Hauner <[email protected]> Co-authored-by: protolambda <[email protected]>
Waiting for a review from @djrtwo on the CI script. I updated it to make use of the new makefile commands, but I have no access to the settings panel to make any changes, or verify if it runs. Since the code is heavy on python configuration, I would appreciate a review from @hwwhww and @ChihChengLiang, and anyone else from Trinity, to make sure it meets their standards. Anyone that loves writing make files, please comment as well. I tried to improve on the old one by creating the necessary aliases, auto detection of generators, and make good use of dependencies. But there may be room for improvement still. The base-test-generator was discussed and reviewed before in ethereum/eth2.0-test-generators#31, but I'm still open for improvements on it. Every review request aside, I can't wait to see the |
Also; the old YAML generators still work, and should output the same format as earlier. The new base generator aims at standardizing the header format, as described in ethereum/eth2.0-test-generators#29 (comment) (See section: test-suites > format). Other parts of that proposal are not included, but I would want to see more standardization, and see PRs for pyspec+base-gen based test generators. Note: The test-format proposal is a bit out-of-date, as we (suggestion by Danny) are looking to make "operations" (previously "transactions") tested individually, rather than testing the sub-transition of the block that processes multiple at a time. |
Closing and reopening to trigger circleci |
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.
My strong wish about module naming conflicts 😅: Py-EVM (Trinity) is using eth2
namespace and we may upload it to pypi; any chance that you can rename eth2
directory to pyspec
? That means:
pyspec/ # project name
pyspec/pyspec/ # pyspec is the module name
pyspec/pyspec/phase0/state_transtion.py` # import path: pyspec.phase0.state_transition
And, great work! 👍
@hwwhww Yes, was thinking about that. Just wanted to not duplicate folder names. |
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.
Great job! Could I provide a bit of feedback as I'm working with tests in our team.
Hope it will be merged soon
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
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.
Looks great!
Noted a bunch of very minor things. Generally happy with the structure as discussed in our many conversations irl
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
Co-Authored-By: protolambda <[email protected]>
Looks like this PR is finally ready to be merged. 🎉 If anyone wants more time to review, this is the time. However, I've been extensively discussing testing with Danny IRL here in Sydney, and I'm sure we could fix any remaining typos or style improvements later. Next up:
Possibly next up, depending on status (need confirmation on target SSZ version, and PR status):
Future steps:
Future ideas:
Release plan:
|
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.
Considering the scope of this huge PR, I think we can merge it ASAP to avoiding more conflicts (especially many files are renamed/moved), and iterate the details later. :)
Co-Authored-By: protolambda <[email protected]>
See Issue #836 for motivation and reasoning on basic structure.
Blocked by #877(Supporting new format, work in progress, see comment)specs
The specs directory, unchanged. Where the markdown specs live.
test_generators
Full documentation on generators can be found in
/test_generators/README.md
.If there is anything magic to remember, it's that you run
make gen_yaml_tests
to run the generators, the makefile will handle virtual environments/dependencies etc.py-tests
Py-tests are meant to validate basic consistency and sanity expectations of the spec itself.
Documentation can be found here:
/pytests/README.md
. Generally not used by client teams, it just helps to make sure a PR is valid.scripts
This contains the (basic, no dependencies) code to generate the pyspec from the markdown version.
test_libs
This contains all the python packages that one may use during any kind of testing (pyspec, test-generator utilities, and more in the future)
pyspec
Most of the pyspec is rather static, it is just the
eth2/phase0/spec.py
file being dynamically generated from the markdown for now. This file is git-ignored. The other files are just kept in place, to keep the build system simple. You runmake pyspec
to build the pyspec from the markdown.More documentation in
/test_libs/pyspec/README.md
gen_helpers
This is just a module to require in your yaml generator to make use of the base generator etc. Documentation can be found in
/test_generators/README.md
..circleci
The Circle CI configuration. Similar to before, but updated to handle yaml test generation, and make use of the new makefile commands.