-
Notifications
You must be signed in to change notification settings - Fork 43
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
Use regex-based version casting that accept #658
Changes from 3 commits
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 |
---|---|---|
|
@@ -101,17 +101,9 @@ def test_invalid_version(version, expected_error): | |
@pytest.mark.parametrize( | ||
["version", "expected_warning"], | ||
[ | ||
[ | ||
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. Still keep this? 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. (Those should fail) 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. Above, you could add that the versions |
||
"1.2.x", | ||
"Version doesn't follow MAJOR.MINOR.PATCH: 1.2.x.", | ||
], | ||
[ | ||
"...123", | ||
"Version doesn't follow MAJOR.MINOR.PATCH: ...123.", | ||
], | ||
[ | ||
"a.b.c", | ||
"Version doesn't follow MAJOR.MINOR.PATCH: a.b.c", | ||
"Version contains non-numeric characters: a.b.c", | ||
], | ||
], | ||
) | ||
|
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.
Keeping the warning for non-numeric versioning. Reasonable? Or shall I remove this as well?
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.
We could fully implement the semantic versioning standard.
semver
is a python library that does exactly this. However it seems we only need to check the compatibility with the standard, so we could also just reuse their regular expression.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.
Also, I think that it's worth mentioning the semantic versioning standard: https://semver.org/spec/v2.0.0.html, and that minor and patch can be omitted.