From 4bfbd4d72ad53eb1694868c19640c8b4a17d32cb Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Tue, 9 Aug 2022 14:56:15 +0200 Subject: feat(jumpavg): speed up, use Python 3.8 features + The main speedup comes from abandoning copy.deepcopy(), doing shallow list copies (at most) and introcuding copy_fast(). + Turn into dataclasses whenever possible, use type hints. + Simplify the partition search code, + It is now clearer the time complexity is O(N*(N+n)), where N is number of samples, and n is the average size of the last group of the current record glist. + Used black for formatting, so no u"" anymore. + Update metadata for 0.3.0 release. Change-Id: I302203b4d42aeb22be1128e2fe72353a44eae5d0 Signed-off-by: Vratko Polak --- PyPI/jumpavg/README.rst | 5 +++++ PyPI/jumpavg/setup.py | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'PyPI') diff --git a/PyPI/jumpavg/README.rst b/PyPI/jumpavg/README.rst index 3161988f69..f66ea9d39b 100644 --- a/PyPI/jumpavg/README.rst +++ b/PyPI/jumpavg/README.rst @@ -25,6 +25,11 @@ Change log TODO: Move into separate file? +0.3.0: Considerable speedup by avoiding unneeded copy. Dataclasses used. + Mostly API compatible, but repr looks different. + +0.2.0: API incompatible changes. Targeted to Python 3 now. + 0.1.3: Changed stdev computation to avoid negative variance due to rounding errors. 0.1.2: First version published in PyPI. diff --git a/PyPI/jumpavg/setup.py b/PyPI/jumpavg/setup.py index 28ddfcf0b1..129277a26e 100644 --- a/PyPI/jumpavg/setup.py +++ b/PyPI/jumpavg/setup.py @@ -16,7 +16,7 @@ with open(path.join(here, u"README.rst"), encoding=u"utf-8") as f: setup( name=u"jumpavg", - version=u"0.2.0", # This is currently the only place listing the version. + version=u"0.3.0", # This is currently the only place listing the version. description=( u"Library for locating changes in time series by grouping results." ), @@ -36,12 +36,12 @@ setup( u"License :: OSI Approved :: Apache Software License", u"Natural Language :: English", # TODO: Test which Python versions is the code compatible with. - u"Programming Language :: Python :: 2.7", + u"Programming Language :: Python :: 3.8", u"Topic :: Scientific/Engineering :: Information Analysis" ], keywords=u"progression regression anomaly detection statistics bits", packages=find_packages(exclude=[]), - python_requires="~=3.6", + python_requires="~=3.8", install_requires=[], # TODO: Include simulator and tests. extras_require={ -- cgit 1.2.3-korg