From 0cf7df42e535fa827e10817a912e2da588775fbe Mon Sep 17 00:00:00 2001 From: bortexz Date: Fri, 30 Sep 2022 11:52:03 +0200 Subject: [PATCH] fix timeseries/keep-latest docstring --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- build.clj | 2 +- src/bortexz/tacos/timeseries.clj | 3 +-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 924a1bb..10abe26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log All notable changes to this project will be documented in this file. +## 0.0.2 - 2022-09-30 +### Fix +- docstring of `timeseries.keep-latest` to be consistent with code behaviour. + ## 0.0.1 Initial release \ No newline at end of file diff --git a/README.md b/README.md index aa696ae..54c212b 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,12 @@ Collection of timeseries technical analysis indicators as [graphcom](https://git ### Clojure CLI/deps.edn ```clojure -io.github.bortexz/graphcom {:mvn/version "0.0.1"} +io.github.bortexz/graphcom {:mvn/version "0.0.2"} ``` ### Leiningen/Boot ```clojure -[io.github.bortexz/graphcom "0.0.1"] +[io.github.bortexz/graphcom "0.0.2"] ``` ## Description diff --git a/build.clj b/build.clj index f3c10f9..1931de5 100644 --- a/build.clj +++ b/build.clj @@ -3,7 +3,7 @@ (:require [org.corfield.build :as bb])) (def lib 'io.github.bortexz/tacos) -(def version "0.0.1") +(def version "0.0.2") (defn- gha-output [k v] diff --git a/src/bortexz/tacos/timeseries.clj b/src/bortexz/tacos/timeseries.clj index d6ab66e..a2cdde0 100644 --- a/src/bortexz/tacos/timeseries.clj +++ b/src/bortexz/tacos/timeseries.clj @@ -208,8 +208,7 @@ (defn keep-latest "Keeps only `n` latest values of timeseries `coll`. Same as `(create (tail coll n))`, but faster when number of items - to be removed is small (currently < 10), as it dissoc's the earliest items instead of creating a new timeseries. - When number of items to remove is >= 10, falls back to `(create (tail coll n))`." + to be removed is small (currently < 5), as it dissoc's the earliest items instead of creating a new timeseries." [coll n] (let [size (count coll)] (if (> size n)