summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix final transform tests.clarify-code-and-simplify-testsSeth M Morton2018-09-021-2/+3
|
* Attempt to fix locale/PyICU inconsistency.Seth M Morton2018-09-021-11/+11
| | | | | | The ordering of accented A's and a's was not the same between them - the accent has been made the same in an attempt to improve the situation.
* Correct stupid mistake in final transform test.Seth M Morton2018-09-021-1/+4
| | | | Missing call to swapcase. Copy/paste error.
* Ensure all tests using LOCALE have a locale set.Seth M Morton2018-09-022-0/+3
|
* Small typos and clarifications.Seth M Morton2018-09-022-4/+4
|
* Fix Python 2 bugs introduced in refactoring.Seth M Morton2018-09-022-2/+6
|
* Refactor test_final_data_transform_factory.py.Seth M Morton2018-09-021-62/+37
| | | | Consolidate into parametrized tests.
* Refactor test_natsort_cmp.py.Seth M Morton2018-09-021-76/+55
| | | | | | | All tests have been put into a class so that only one skipif clause is needed (no tests are run on Python 3+). Refactor test that ensures an error is raised to use pytest.raises.
* Add test_regex.py.Seth M Morton2018-09-021-0/+100
| | | | | | This is intended to replace the purpose slow_splitters.py, by checking several different types of input against all the regular expressions used by natsort to split strings into numbers/non-numbers.
* Refactor test_parse_string_function.py.Seth M Morton2018-09-023-665/+66
| | | | | | | | | Much unneeded duplication has been removed. Most of the work in this file had been going into validating the regular expressions - this will be added elsewhere in a future commit. slow_splitters.py has been removed. Docs have been updated to remove the reference to slow_splitters.py.
* Refactor test_natsort_keygen.py.Seth M Morton2018-08-291-144/+145
| | | | | Consolidated tests into a smaller number of tests using parametrization. Also improved warning testing.
* Refactor test_string_component_transform_factory.py.Seth M Morton2018-08-292-121/+53
| | | | | | | | All tests have been consolidated into a single parametrized test. Much nicer. Additionally, some updates to the fake_fastnumbers were added as they were noticed during refactoring.
* Refactor test_input_string_transform_factory.py.Seth M Morton2018-08-271-179/+74
| | | | | Better use of fixtures and parameterization, less unnecessary hypothesis testing.
* Refactor test_natsort_key.py.Seth M Morton2018-08-261-66/+15
| | | | Remove many unnecessary tests and details.
* Refactor test_parse_number_function.py.Seth M Morton2018-08-251-53/+28
| | | | Reduced code to two parameterized functions.
* Add DEFAULT to the ns enum.Seth M Morton2018-08-255-24/+23
| | | | | This makes the default value in argument lists clearer, as well as making unit tests more clear to read.
* Refactor test_parse_bytes_function.py.Seth M Morton2018-08-251-41/+15
| | | | All tests have been consolidated into a single parameterized test.
* Refactor test_natsorted_convenience.py.Seth M Morton2018-08-251-60/+61
| | | | Eliminate some code duplication with fixtures, clarify variable names.
* Refactor test_natsorted.py.Seth M Morton2018-08-251-417/+189
| | | | | This refactor uses parametrize wherever possible, and also places expected output into an "expected" variable for clarity.
* Remove leading underscore on most functions in utils.py.Seth M Morton2018-08-2211-252/+237
| | | | | All of the functions that are to be used outside of utils.py have had their leading underscore removed.
* Silence more PyCharm warnings.Seth M Morton2018-08-223-6/+17
| | | | | | | | | The class of warnings that have been silenced are: - shadowing names in outer scope - incorrect docstring - invalid type (where inspection was bad) - unresolved references (in Python2/3 compat code)
* Refactor test_main.py.Seth M Morton2018-08-222-164/+105
| | | | | The refactoring uses parameterizations to reduce copy/paste. It also uses more modern pytest functionality to check exception details.
* Refactor test_utils.py.Seth M Morton2018-08-203-156/+115
| | | | | | - Utils functions are now accessed as part of the utils namespace. - Use of parametrize where appropriate. - Remove use of slow splitters utility functions.
* Refactor test_natsort.compat into fixtures.Seth M Morton2018-08-1213-236/+212
| | | | | | These have been moved to conftest.py, or now use the pytest-mocker third-party plugin. Some tests have been re-written to account for the change.
* Refactor regex_chooser into a function.Seth M Morton2018-08-116-89/+125
| | | | | | | Previously, many module-level regular expressions were created, then accessed through a dictionary. The regular expressions are now encapsulated in a class, and the user access the dictionary through a function call which can better handle cleaning up the key accessor.
* Run isort on all (most) imports.Seth M Morton2018-08-1126-150/+163
| | | | Only the modules with odd import mechanics have been left out.
* Refactor ns enum as a namedtuple.Seth M Morton2018-08-109-55/+107
| | | | | | | | | | | | | The reasons for doing this were as follows: 1. The fields could be added programmatically and thus be able to be made more clearer by placing into well-named variables. 2. Better follow style guide by having the instance be all lower case and not the class itself. Additionally, the _DUMB field was removed and made an internal module-level value, so that it is certainly not exposed to the user and the code need not access the private attribute of the ns class.
* Add .venv to .gitignore.Seth M Morton2018-08-101-0/+1
|
* Refactor fastnumbers version checking.Seth M Morton2018-08-101-3/+3
| | | | | | The new implementation has only one import statement, and blocks PyCharm from warning against fastnumbers not being installed (since it is optional this is preferred).
* Remove unneeded except block.Seth M Morton2018-08-101-2/+0
| | | | Its only purpose was to raise the given error, which is not necessary.
* Simplify _normalize_input_factory function.Seth M Morton2018-08-101-11/+3
| | | | The small differences between Python 3 and Python 2 are now clearer.
* Reformat doc source code.Seth M Morton2018-08-103-55/+57
|
* Improve docstrings for development.Seth M Morton2018-08-1011-169/+504
| | | | | | | | | Many of the utility functions had terse docstrings. All functions now have full docstrings that should help developers who want to contribute better understand what is going on. Some function names or arguments have been changed if it improved self-documentation.
* Blacken code.Seth M Morton2018-08-1033-1354/+3361
| | | | | | | | As part of the blackening, the huge tuple of hex literals that represent unicode numerals has been placed into its own file, and the _version.py contents has been moved to __init__.py. PEP8 checks are updated to conform to black's style.
* Bump version: 5.3.2 → 5.3.35.3.3Seth M Morton2018-07-075-5/+5
|
* Update changelog.Seth M Morton2018-07-071-0/+7
|
* Merge branch 'travis-py37'Seth M Morton2018-07-071-19/+42
|\ | | | | | | | | | | It was important to me to get CI running on Python 3.7 before I made a fully Python 3.7 compatible release as requested in issue #62.
| * Remove extras testing from 3.7.Seth M Morton2018-07-071-10/+0
| | | | | | | | | | | | This is because fastnumbers has a python 3.7 bug, so there is no point using it for the tests if it fails. A future commit will revert this change.
| * Looks like .travis.yml just got more verbose.Seth M Morton2018-07-071-12/+40
| | | | | | | | | | | | It seems like once one introduces a matrix, implicit matrices no longer work. So I now have to spell out the with and without extras stuff.
| * Add a matrix that *should* run Py 3.7.Seth M Morton2018-07-071-7/+12
|/ | | | | Apparently, the ubuntu trusty distribution cannot run python 3.7, but xenial will. For 3.7 we have to specify xenial.
* Create a FAQ section in the README/intro.Seth M Morton2018-07-022-103/+121
| | | | This holds the previously created "How it works" section.
* Revert "Add Python 3.7 to Travis-CI testing."Seth M Morton2018-07-021-1/+0
| | | | This reverts commit b25949f157fa163a378701f5eca8a8cf1b02820a.
* Update list of unicode numbers for Python 3.7.Seth M Morton2018-07-011-85/+110
|
* Fix StopIteration error on Python 3.7.Seth M Morton2018-07-011-1/+4
|
* Fix docstring errors.Seth M Morton2018-07-012-4/+4
|
* Update README with a "How It Works".Seth M Morton2018-07-012-1/+120
| | | | | | | | This gives a high-level description of how natsort works, and also some caveats so that users have a better idea of what natsort is doing under the hood. This address and closes issue #60.
* Add Python 3.7 to Travis-CI testing.Seth M Morton2018-07-011-0/+1
|
* Make correction in CHANGELOG.Seth M Morton2018-05-182-2/+4
|
* Add *.sh to MANIFEST.in.Seth M Morton2018-05-171-0/+1
|
* Bump version: 5.3.1 → 5.3.25.3.2Seth M Morton2018-05-175-45/+45
|