-
Notifications
You must be signed in to change notification settings - Fork 10
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]: support for non PEP 440 spec versions #493
Conversation
rudra-iitm
commented
Jan 11, 2024
- Implemented support for versions that do not adhere to the PEP 440 standard. PEP 440 dictates that version numbers should follow the format 'N.N[.N]', whereas the example "debian/20200505dfsg0-2" does not comply with this standard.
- This pull request addresses the error/warning captured in the attached screenshot.
And that's why I separated major, minor and revision: because that way, if the version number is like that, we could just use "major" ;-) |
Can you add an unitary test for this, and fix that test error, please? |
|
Mmm... I think that pkg_resources is being deprecated. Maybe that's the problem... (but don't take this for granted, I'm not sure). |
@sergio-costas I'm relatively new to open-source development and currently navigating the process of adding a unit test for the aforementioned code. I'm encountering some challenges in this regard. I would appreciate it if you could provide some guidance or ideas on how I can successfully implement the unit test. |
@rudra-iitm Of course. Exactly where are you having trouble? |
I mean... I presume that you know about the |
@sergio-costas |
I would create an instance of ProcessVersion, and do some calls to _getVersion() passing a %v (and others, like XXXX/%v) as format string, and several version strings with and without that format, to ensure that it detects them correctly. |
@sergio-costas, could you kindly review my recent commit that includes tests for version variation and beta releases in the unit tests? |
Looks good, but I thing that it would be a good idea to add other formats not supported. For example, passing as format "debian%V" and as version "1.2.3". |
Thus to check that it doesn't try to parse entries that should be rejected. |
@sergio-costas Included tests for version variations and beta releases that are considered invalid. |
Looks good. Thanks! |