./textproc/py-natsort, Natural sorting for python

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 7.1.1, Package name: py38-natsort-7.1.1, Maintainer: kamelderouiche

When you try to sort a list of strings that contain numbers, the
normal python sort algorithm sorts lexicographically, so you might
not get the results that you expect:

>>> a = ['a2', 'a9', 'a1', 'a4', 'a10']
>>> sorted(a)
['a1', 'a10', 'a2', 'a4', 'a9']

Notice that it has the order ('1', '10', '2') - this is because the
list is being sorted in lexicographical order, which sorts numbers
like you would letters (i.e. 'b', 'ba', 'c').

natsort provides a function natsorted that helps sort lists
"naturally", either as real numbers (i.e. signed/unsigned floats
or ints), or as versions. Using natsorted is simple:

>>> from natsort import natsorted
>>> a = ['a2', 'a9', 'a1', 'a4', 'a10']
>>> natsorted(a)
['a1', 'a2', 'a4', 'a9', 'a10']

natsorted identifies numbers anywhere in a string and sorts them
naturally.


Required to run:
[devel/py-setuptools] [lang/python37]

Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: 9341cd524336de9bb2450d13637b3cdc5fd2df06
RMD160: c2fcbd5905f516d0458aaa13fd58b475985c471d
Filesize: 139.403 KB

Version history: (Expand)


CVS history: (Expand)


   2021-02-01 10:35:56 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-natsort: updated to 7.1.1

7.1.1:
Changed
- Use GitHub Actions instead of Travis-CI
- No longer pin testing dependencies

Fixed
- Correct a minor typo
   2020-12-06 12:40:27 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-natsort: updated to 7.1.0

7.1.0:
Added
 - ``os_sorted``, ``os_sort_keygen``, and ``os_sort_key`` to better support
   sorting like the file browser on the current operating system - this
   closes the long-standing issue
 - Support for Python 3.9

Changed
 - MacOS unit tests run on native Python
 - Treate `None` like `NaN` internally to avoid `TypeError`
 - No longer fail tests every time a new Python version is released

Fixed
 - Various typos, missing figures, and out-of-date information in the "How \ 
it works"
 - Fix typo in CHANGELOG
 - Updated "How it works" to account for Pandas updates
   2020-04-29 15:53:31 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-natsort: updated to 7.0.1

7.0.1:

Fixed
Bug where that caused incorrect sorting when using locales that have a \ 
"." character as the thousands separator.

7.0.0:

Added
Ability to deploy directly from TravisCI
Release checklist in RELEASING.md

Changed
Updated auxillary shell scripts to be written in python, and added ability to \ 
call these from tox
Improved Travis-CI experience
Update testing dependency versions

Removed
Support for Python 2
   2019-11-14 11:06:56 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-natsort: updated to 6.2.0

6.2.0:
Added
 - Support for Python 3.8

Changed
 - `index_natsorted` internally now uses tuples for index-element pairs
   instead of lists
 - Added a TOC to the README
 - Python 3.4 is no longer included in testing

Fixed
 - Pin testing dependencies to prevent CI breaking due to third-party
   library changes

Removed
 - Introduction page in documentation
   2019-11-13 16:09:01 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-natsort: updated to 6.1.0

6.1.0:
Added
 - Expose `numeric_regex_chooser` as a public function for ease in making
   key functions
 - Example in the documentation on how to sort numbers with units
 - Automated testing support for macos and Windows

Changed
 - Update CHANGELOG format to style from https://keepachangelog.com/

Fixed
 - Removed dependency on `sudo` in TravisCI configuration
 - Documentation typos
   2019-02-08 11:52:03 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-natsort: updated to 6.0.0

6.0.0:
Drop support for Python 2.6 and 3.3
Remove deprecated APIs (kwargs number_type, signed, exp, as_path, py3_safe; \ 
enums ns.TYPESAFE, ns.DIGIT, ns.VERSION; functions versorted, index_versorted)
Remove pipenv as a dependency for building
Simply Travis-CI configuration
Fix README rendering in PyPI
   2018-11-27 17:19:05 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-natsort: updated to 5.5.0

5.5.0
- Formally deprecated old or misleading APIs
- Documentation, packaging, and CI cleanup
- Consolidate API documentation into a single page
- Add a CHANGELOG.rst to the top-level of the repository
- Add back support for very old versions of setuptools
   2018-09-24 11:43:26 by Adam Ciarcinski | Files touched by this commit (4) | Package updated
Log message:
py-natsort: updated to 5.4.1

5.4.1:
Fix error in a newly added test.
Changed code format and quality checking infrastructure.

5.4.0:
Re-expose natsort_key as "public" and remove the associated \ 
DepricationWarning.
Add better developer documentation.
Refactor tests.
Bump allowed fastnumbers version.