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

Sort output of eb --search in natural order (respecting numbers) #3609

Merged
merged 6 commits into from
Mar 16, 2021

Conversation

Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Mar 12, 2021

This makes the output of eb --search more approachable by sorting versions in natural order. I.e. Foo-10.1 comes *after Foo-9.2

Had to create and move a test file to add a test for natural_keys

Code is based on https://stackoverflow.com/a/5967539/1930508 which is based on http://nedbatchelder.com/blog/200712/human_sorting.html

Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Flamefire You also need to include the new test subsuite to the general test/suite.py, or those tests will not be run in CI, cfr. Flamefire#5

@Flamefire
Copy link
Contributor Author

Thanks. I'm too used to pytest which makes writing unit tests so much easier...

@boegel boegel added this to the next release (4.3.4?) milestone Mar 16, 2021
@boegel boegel merged commit 644dcd9 into easybuilders:develop Mar 16, 2021
@Flamefire Flamefire deleted the naturalSortSearch branch March 16, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants