-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add Python validation APIs and unit tests #227
Conversation
9828dab
to
4e6abbb
Compare
1bfe56b
to
2383f8b
Compare
@adityasaky Given the discussion in in-toto/in-toto#570 about |
I think option 1 probably makes sense for compatibility. FWIW, we should test across implementations as soon as we implement statements. cc @PradyumnaKrishna who's beginning to look at cross implementation compatibility for in-toto |
I suggest we proceed with this PR without supporting anything specific re signing. If in-toto/in-toto implements an intermediate class for the Statement that builds on what's provided here, it can use the existing |
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.
Thanks Marcela!
LGTM! |
f5cbace
to
92f1948
Compare
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.
Could we add type annotations to the public methods (especially constructors)? 🙏
92f1948
to
2a8a992
Compare
c0739a2
to
8a947a0
Compare
8a947a0
to
e5f2403
Compare
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.
Couple of thoughts I'd missed before, apologies.
@@ -0,0 +1,59 @@ | |||
''' |
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.
Can this go in a tests/
directory in /python
? So all the Python code is contained in the python
dir, similar to how the Go tests are in the go
dir with the corresponding packages.
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.
Yep, this sounds good.
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.
Not related to this PR, but should we also move the examples/go
dir into the go/
directory at some point? I've been thinking (in general) about where to house any existing and future examples for in-toto attestation use cases.
@joshuagl Can you please re-review to see if I've addressed your previous comments? There are a few (unopened) PRs that depend on this PR being merged. |
Signed-off-by: Marcela Melara <marcela.melara@intel.com>
Signed-off-by: Marcela Melara <marcela.melara@intel.com>
Signed-off-by: Marcela Melara <marcela.melara@intel.com>
* Make parameters explicit in constructors; use in tests * Add type annotations in functions * Update constructors based on in-toto#257 and in-toto#263 Signed-off-by: Marcela Melara <marcela.melara@intel.com>
Signed-off-by: Marcela Melara <marcela.melara@intel.com>
084f207
to
95592b1
Compare
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.
LGTM!
Requested changes have been addressed.
This PR introduces basic wrapper APIs for the Python language bindings for the Statement layer. I also adds basic tests and documentation for testing the Python language bindings.
Fixes #176