-
Notifications
You must be signed in to change notification settings - Fork 8
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 node version filtering for sampling #74
Changes from all commits
f35724e
5a0c1b4
9a4ca14
ee9ee47
ef31aee
f735076
619ea94
2c9a5e9
1c22001
bd537c6
78f0d93
702334a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
NonNegativeInteger, | ||
PositiveInteger, | ||
StringList, | ||
VersionString, | ||
) | ||
from porter.fields.exceptions import InvalidArgumentCombo, InvalidInputData | ||
from porter.fields.retrieve import CapsuleFrag, RetrievalKit | ||
|
@@ -125,6 +126,18 @@ class GetUrsulas(BaseSchema): | |
), | ||
) | ||
|
||
min_version = VersionString( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to update the README to add this optional parameter. Filed #75 which can be addressed in a separate PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added small note in README for get_ursulas |
||
required=False, | ||
load_only=True, | ||
click=click.option( | ||
"--min-version", | ||
"-mv", | ||
help="Minimum acceptable version of Ursula", | ||
type=click.STRING, | ||
required=False, | ||
), | ||
) | ||
|
||
# output | ||
ursulas = marshmallow_fields.List(marshmallow_fields.Nested(UrsulaInfoSchema), dump_only=True) | ||
|
||
|
@@ -369,6 +382,18 @@ class BucketSampling(BaseSchema): | |
), | ||
) | ||
|
||
min_version = VersionString( | ||
required=False, | ||
load_only=True, | ||
click=click.option( | ||
"--min-version", | ||
"-mv", | ||
help="Minimum acceptable version of Ursula", | ||
type=click.STRING, | ||
required=False, | ||
), | ||
) | ||
|
||
# output | ||
ursulas = marshmallow_fields.List(UrsulaChecksumAddress, dump_only=True) | ||
block_number = marshmallow_fields.Int(dump_only=True) |
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.
Nice!