| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- ``ns.LOCALE``/``humansorted`` now accounts for thousands separators.
- Refactored entire codebase to be more functional (as in use functions
as units). Previously, the code was rather monolithic and difficult
to follow. The goal is that with the code existing in smaller units
contributing will be easier.
- Deprecated ``ns.TYPESAFE`` option as it is now always on (due to a new
iterator-based algorithm, the typesafe function is now cheap).
- Increased speed of execution (came for free with the new functional
approach because the new factory function paradigm eliminates most
``if`` branches during execution).
- For the most cases, the code is 30-40% faster than version 4.0.4.
- If using ``ns.LOCALE`` or ``humansorted``, the code is 1100% faster
than version 4.0.4.
- Improved clarity of documentaion with regards to locale-aware sorting.
- Added a new ``chain_functions`` function for convenience in creating
a complex user-given ``key`` from several existing functions.
|
| |
|
| |
|
| |
|
|
|
|
| |
"PyICU" is deprecated.
|
|
|
|
|
| |
Added more clarification, made quick start more navigable, and added
more locale information.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
LOCALENUM is also now dependent on FLOAT.
Additionally, it was found that the broken locale problem extends
to the thousands separator character. A lookup table has been
implemented for locales with known problems.
This closes issue #36.
|
|
|
|
| |
This is so users can control if they want numeric modifications or not.
|
|
|
|
|
| |
The remaining function, locale_convert_function, was replaced by
get_strxfrm from natsort.compat.locale.
|
|
|
|
|
|
| |
This function has been moved to utils.
Additionally, the python version checking has been unified.
|
|
|
|
|
|
| |
This is turned on with LOCALE. Unfortunately, the thousands separators
are not reliable with the OSX implementation of locale (of course),
by PyICU is still good. Need to add more tests and documentation.
|
|
|
|
| |
Also removed a stray print.
|
| |
|
|
|
|
|
|
| |
With the LOCALE | CAPITALFIRST options there was a type mismatch
between numbers and strings. This has been resolved by replacing
"null_sep" with ''.
|
|
|
|
|
| |
This new method essentially hard-codes the chained function
using eval.
|
|
|
|
|
|
|
| |
PATH or LOCALE and CAPITALFIRST modify the output. The output will
be modified appropriately for numbers.
Improved ns enum documentation.
|
| |
|
|
|
|
|
| |
These tests are not entirely thorough, but they demonstrate the
function well enough. The rest of the testing is good.
|
| |
|
| |
|
|
|
|
|
|
| |
The testing files were getting too long, so they have been split
into more targeted files. This will make further development less
daunting.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required changing the input to be the functions created by
all the function factories that have been recently committed. This
had a cascading effect that required a re-write of several unit tests,
as well as the top level natsort_keygen function, which now has the
job of creating the appropriate functions on the fly to pass to
_natsort_key.
A future commit will add more testing to natsort_keygen.
For the moment, handling of locale-specific numbers is disabled, but
will be added back in a future commit.
|
|
|
|
|
| |
It now returns the appropriate function for the given configuration
to do the locale conversion. No unnecessary if statements.
|
|
|
|
|
| |
The function returned from _post_string_parse_function had an
unneeded if statement within it. It has been removed.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The main sorting functions had some code to handle TYPECAFE addition.
This is no longer needed since TYPESAFE is default.
Further, calls to _kwargs_to_alg are pushed to natsort_keygen.
|
|
|
|
|
| |
The new definition returns a function with no if statement in an
attempt to micro-optimize this function.
|
| |
|
|
|
|
| |
These complete the required components to make natsort more functional.
|
|
|
|
| |
The work of this function is now being done elsewhere.
|
| |
|
| |
|
| |
|
|
|
|
| |
It is now called _post_string_parse_function.
|
|
|
|
|
| |
This is a factory function that will return a function to parse
a bytes string in the appropriate manner according user options.
|
|
|
|
|
| |
This is a factory function that will return a function to parse
a number in the appropriate manner according user options.
|
|
|
|
| |
This will only be used in Python2.
|
| |
|