Releases: psolin/cleanco
2.3
2.2
2.1
- Support Python 3.6 - 3.9
- Fix basename() so it works deterministically
- Improve basename() so it ignores punctuation for matching terms
- Fix normalization of some Unicode characters
- Fix an error when basename() is invoked with middle=True kwarg
- Drop Travis CI in favour of Github actions
2.0.1
PyPI release (1.1)
There is now a PyPI release at https://pypi.python.org/pypi/cleanco.
It is unlikely further releases will be made here; please see PyPI instead from now on.
Production version
I finally settled on the algorithm that I wanted, which is not only far more efficient, but allows people to add or remove whatever they want from each category without worry. The code is extremely compact but works the same as when it was 1,000 lines long.
The algorithm for removing suffixes was enhanced by sorting them in a single stack by length in descending order. This allows for the removal of items like "& co." first rather than "co.", so that the "&" would not be left behind.
Leading spaces before the suffixes in the list were removed in favor of this being added on later during a loop, meaning there is a lot more consistency to the data stored in the module, and less information stored in memory.
Finally, the 'short' function was removed in favor of only one to remove extraneous items in a company name.
There may be one or two more things to clean up, but it is efficient enough to call it a 1.0 version without hesitation.