Skip to content
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 letter checking for release version #127

Open
braffes opened this issue Jul 2, 2021 · 6 comments
Open

Add letter checking for release version #127

braffes opened this issue Jul 2, 2021 · 6 comments

Comments

@braffes
Copy link
Contributor

braffes commented Jul 2, 2021

Hi again,

It should be interesting, if the comparison between version works with version which contains letter.

For example, currently I have:

2021-07-02 17:04:09,964 DEBUG [root][MainThread] found a release 4.1a
2021-07-02 17:04:09,964 DEBUG [root][MainThread] compare next release 4.1c
2021-07-02 17:04:09,964 DEBUG [root][MainThread] compare release major,minor,etc. : 4 >? 4
2021-07-02 17:04:09,964 DEBUG [root][MainThread] compare release major,minor,etc. : 1c >? 1a
2021-07-02 17:04:09,964 DEBUG [root][MainThread] compare next release 4.2a
2021-07-02 17:04:09,964 DEBUG [root][MainThread] compare release major,minor,etc. : 4 >? 4
2021-07-02 17:04:09,964 DEBUG [root][MainThread] compare release major,minor,etc. : 2a >? 1a
2021-07-02 17:04:09,964 DEBUG [root][MainThread] compare next release 4.2c
2021-07-02 17:04:09,964 DEBUG [root][MainThread] compare release major,minor,etc. : 4 >? 4
2021-07-02 17:04:09,964 DEBUG [root][MainThread] compare release major,minor,etc. : 2c >? 1a
2021-07-02 17:04:10,070 INFO  [root][MainThread] Workflow:DownloadService:CleanSession
2021-07-02 17:04:10,073 INFO  [root][MainThread] Session:RemoteRelease:4.1a
2021-07-02 17:04:10,073 INFO  [root][MainThread] Session:Release:4.1a
2021-07-02 17:04:10,073 INFO  [root][MainThread] Workflow:Start:download
2021-07-02 17:04:10,074 INFO  [root][MainThread] Workflow:wf_download

As we see, when the version contains letters, the verification doesn't work.

Thanks for you attention,

Brice

@osallou
Copy link
Contributor

osallou commented Jul 2, 2021

More complex to do.
Code was quite simple, comparing ints

Letters should be detected, and compared, in different patterns...

@braffes
Copy link
Contributor Author

braffes commented Jul 2, 2021

Maybe the following module can do the jobs:
https://packaging.pypa.io/en/latest/version.html

Without a new module, it should be more complicated ...

@osallou
Copy link
Contributor

osallou commented Jul 2, 2021

could be, will investiguate

now, anyway, will not work in all cases, if versions do not follow some patterns

@braffes
Copy link
Contributor Author

braffes commented Jul 5, 2021

It seems there is an other issue with the current algorithm.

2021-07-05 13:07:28,183 DEBUG [root][MainThread] found a release 2.1.1
2021-07-05 13:07:28,183 DEBUG [root][MainThread] compare next release 2.0.2
2021-07-05 13:07:28,183 DEBUG [root][MainThread] compare release major,minor,etc. : 2 >? 2
2021-07-05 13:07:28,183 DEBUG [root][MainThread] compare release major,minor,etc. : 0 >? 1
2021-07-05 13:07:28,183 DEBUG [root][MainThread] compare release major,minor,etc. : 2 >? 1
2021-07-05 13:07:28,183 DEBUG [root][MainThread] found newer release 2.0.2
2021-07-05 13:07:28,184 INFO  [root][MainThread] Workflow:DownloadService:CleanSession
2021-07-05 13:07:28,185 INFO  [root][MainThread] Session:RemoteRelease:2.0.2
2021-07-05 13:07:28,185 INFO  [root][MainThread] Session:Release:2.0.2

The good algorithm should stop after comparing 0 >?1, but this is not the case.

@osallou
Copy link
Contributor

osallou commented Jul 5, 2021

Hum, need complete recheck of the algo...
Was made quickly for a specific need

@osallou
Copy link
Contributor

osallou commented Jul 6, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants