sqlmath 2023.7.21 → 2023.8.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,8 +1,39 @@
1
1
  # Changelog
2
2
 
3
3
  # Todo
4
+ - sqlmath - Optimize cosfit-calculation of amplitude-prm WinCosfit.caa to one-step instead of nnn-steps.
4
5
  - none
5
6
 
7
+ # v2023.8.20
8
+ - jslint - Update jslint to v2023.8.20.
9
+ - chart - Add technical-chart tradebot_technical_sinefit.
10
+ - sqlmath - bugfix - Fix buffer-overflow in c-function sql3_win_sinefit2_step().
11
+ - sqlmath - Rename c-struct Vector99 to Doublewin.
12
+ - sqlmath - Add sql-function fmod().
13
+ - sqlmath - Rename sql-functions xxx_cosfit_xxx() to xxx_sinefit_xxx().
14
+ - sqlmath - Revamp sql-function win_cosfit2() to 1) find frequency cww from dft, and then 2) find phase cpp from linear equation y=b*cos(w*t)+c*sin(w*t).
15
+ - sqlmath - Update sql-function win_cosfit2() to use sine() instead of cosine() for better phase-continuity of initial guesses of phase at cpp=0.
16
+ - sqlmath - Update sql-agg-function stdev() to aggregate over running-window.
17
+ - sqlmath - Update sql-function win_cosfit2_refitlast() to be able to update cosine-fit as well.
18
+ - sqlmath - Merge sql-functions win_cosfit2_predict(), win_cosfit2_extract() into sql-function cosfit_extract().
19
+ - sqlmath - Add c-helper-functions doubleAbs(), doubleMax(), doubleMin().
20
+ - sqlmath - merge c-struct WinCosfitInternal, WinCosfitResult into c-struct WinCosfit.
21
+ - sqlmath - Update sql-functions win_cosfit2(), win_emax(), win_quantilex() to move variable-length arguments to last position.
22
+ - sqlmath - Update sql-function win_cosfit2() with additional argument modeNoCsf.
23
+ - sqlmath - Merge sql-functions win_slr2(), win_slrcos2() into sql-function win_cosfit2().
24
+ - sqlmath - Streamline sql-function win_slr2_step() to only update last datapoint.
25
+ - sqlmath - Update sql-function win_quantile2(), win_slr2() to input/output doublearray instead of json for better performance.
26
+ - sqlmath - Add test-file test_data_cosfit.csv.
27
+ - sqlmath - Add sql-function win_slrcos2().
28
+ - sqlmath - Update sql-function win_slr2() to input/output doublearray instead of json for better performance.
29
+ - sqlmath - Rename sql-functions jsonfromdoublearray() to doublearray_jsonto(), jsontodoublearray() to doublearray_jsonfrom().
30
+ - sqlmath - Remove unused sql-functions:
31
+ btobase64(), btotext()
32
+ jenks_blob(), jenks_concat(), jenks_json()
33
+ vec_concat()
34
+ - betadog - Migrate sql-functions matrix2d_concat() from sqlmath to betadog.
35
+ - sqlmath - Add sql-function win_slr2_step() to incrementally step from last slr-state.
36
+
6
37
  # v2023.7.21
7
38
  - sqlmath - Update sql-function win_slr2() to additionally return predicted y-value and rmse.
8
39
  - betadog - Migrate market-indicator from spy to spx.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  # Status
5
- | Branch | [master<br>(v2023.7.21)](https://github.com/sqlmath/sqlmath/tree/master) | [beta<br>(Web Demo)](https://github.com/sqlmath/sqlmath/tree/beta) | [alpha<br>(Development)](https://github.com/sqlmath/sqlmath/tree/alpha) |
5
+ | Branch | [master<br>(v2023.8.20)](https://github.com/sqlmath/sqlmath/tree/master) | [beta<br>(Web Demo)](https://github.com/sqlmath/sqlmath/tree/beta) | [alpha<br>(Development)](https://github.com/sqlmath/sqlmath/tree/alpha) |
6
6
  |--:|:--:|:--:|:--:|
7
7
  | CI | [![ci](https://github.com/sqlmath/sqlmath/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/sqlmath/sqlmath/actions?query=branch%3Amaster) | [![ci](https://github.com/sqlmath/sqlmath/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/sqlmath/sqlmath/actions?query=branch%3Abeta) | [![ci](https://github.com/sqlmath/sqlmath/actions/workflows/ci.yml/badge.svg?branch=alpha)](https://github.com/sqlmath/sqlmath/actions?query=branch%3Aalpha) |
8
8
  | Coverage | [![coverage](https://sqlmath.github.io/sqlmath/branch-master/.artifact/coverage/coverage_badge.svg)](https://sqlmath.github.io/sqlmath/branch-master/.artifact/coverage/index.html) | [![coverage](https://sqlmath.github.io/sqlmath/branch-beta/.artifact/coverage/coverage_badge.svg)](https://sqlmath.github.io/sqlmath/branch-beta/.artifact/coverage/index.html) | [![coverage](https://sqlmath.github.io/sqlmath/branch-alpha/.artifact/coverage/coverage_badge.svg)](https://sqlmath.github.io/sqlmath/branch-alpha/.artifact/coverage/index.html) |
@@ -107,7 +107,6 @@ PORT=8080 sh jslint_ci.sh shHttpFileServer
107
107
  - JSLint is under [Unlicense License](https://github.com/jslint-org/jslint/blob/master/LICENSE).
108
108
  - [cpplint.py](cpplint.py) is under [BSD 3-clause license](https://github.com/cpplint/cpplint/blob/develop/LICENSE).
109
109
  - [indent.exe](indent.exe) is under [GPLv3 License](https://www.gnu.org/licenses/gpl-3.0.txt).
110
- - [sqlmath_jenks.c](sqlmath_jenks.c) is derived from [GPLv3 licensed CalcNaturalBreaks](https://www.geodms.nl/CalcNaturalBreaks).
111
110
  - Everything else is under MIT License.
112
111
 
113
112
 
@@ -120,9 +119,9 @@ PORT=8080 sh jslint_ci.sh shHttpFileServer
120
119
  ```shell
121
120
  python -m build
122
121
  #
123
- twine upload --repository testpypi dist/sqlmath-2023.7.21*
124
- py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2023.7.21
122
+ twine upload --repository testpypi dist/sqlmath-2023.8.20*
123
+ py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2023.8.20
125
124
  #
126
- twine upload dist/sqlmath-2023.7.21*
127
- pip install sqlmath==2023.7.21
125
+ twine upload dist/sqlmath-2023.8.20*
126
+ pip install sqlmath==2023.8.20
128
127
  ```
package/jslint.mjs CHANGED
@@ -25,8 +25,6 @@
25
25
  // OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26
26
  // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
27
  // OTHER DEALINGS IN THE SOFTWARE.
28
- //
29
- // For more information, please refer to <https://unlicense.org/>
30
28
 
31
29
 
32
30
  // jslint(source, option_dict, global_list) is a function that takes 3
@@ -165,7 +163,7 @@ let jslint_charset_ascii = (
165
163
  + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
166
164
  + "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
167
165
  );
168
- let jslint_edition = "v2023.6.21";
166
+ let jslint_edition = "v2023.8.20";
169
167
  let jslint_export; // The jslint object to be exported.
170
168
  let jslint_fudge = 1; // Fudge starting line and starting
171
169
  // ... column to 1.
package/package.json CHANGED
@@ -38,5 +38,5 @@
38
38
  },
39
39
  "shCiArtifactUpload": 1,
40
40
  "shCiNpmPublish": 1,
41
- "version": "2023.7.21"
41
+ "version": "2023.8.20"
42
42
  }
package/sqlmath.mjs CHANGED
@@ -60,7 +60,6 @@ let SQLITE_OPEN_TEMP_JOURNAL = 0x00001000; /* VFS only */
60
60
  let SQLITE_OPEN_TRANSIENT_DB = 0x00000400; /* VFS only */
61
61
  let SQLITE_OPEN_URI = 0x00000040; /* Ok for sqlite3_open_v2() */
62
62
  let SQLITE_OPEN_WAL = 0x00080000; /* VFS only */
63
- let SQLITE_WIN_SLR_ELEM_SIZE = 10;
64
63
  let cModule;
65
64
  let cModulePath;
66
65
  let consoleError = console.error;
@@ -98,7 +97,7 @@ let {
98
97
  let sqlMessageDict = {}; // dict of web-worker-callbacks
99
98
  let sqlMessageId = 0;
100
99
  let sqlWorker;
101
- let version = "v2023.7.21";
100
+ let version = "v2023.8.20";
102
101
 
103
102
  function assertJsonEqual(aa, bb, message) {
104
103
 
@@ -358,8 +357,7 @@ async function ciBuildExt1NodejsConfigure({
358
357
  "conditions": [
359
358
  [
360
359
  "OS == \u0027win\u0027",
361
- {"defines": ["WIN32"]},
362
- {"defines": ["HAVE_UNISTD_H"]}
360
+ {"defines": ["WIN32"]}
363
361
  ]
364
362
  ],
365
363
  // https://github.com/nodejs/node-gyp/blob/v9.3.1/gyp/pylib/gyp/MSVSSettings.py
@@ -533,26 +531,6 @@ function dbExecAndReturnLastBlobAsync({
533
531
  });
534
532
  }
535
533
 
536
- async function dbExecAndReturnLastJsonAsync(option) {
537
-
538
- // This function will exec <sql> in <db> and return last value retrieved
539
- // from execution as raw text.
540
-
541
- return JSON.parse(
542
- await dbExecAndReturnLastTextAsync(option)
543
- );
544
- }
545
-
546
- async function dbExecAndReturnLastTextAsync(option) {
547
-
548
- // This function will exec <sql> in <db> and return last value retrieved
549
- // from execution as raw text.
550
-
551
- return new TextDecoder().decode(
552
- await dbExecAndReturnLastBlobAsync(option)
553
- );
554
- }
555
-
556
534
  async function dbExecAsync({
557
535
  bindList = [],
558
536
  db,
@@ -1357,7 +1335,6 @@ export {
1357
1335
  SQLITE_OPEN_TRANSIENT_DB,
1358
1336
  SQLITE_OPEN_URI,
1359
1337
  SQLITE_OPEN_WAL,
1360
- SQLITE_WIN_SLR_ELEM_SIZE,
1361
1338
  assertJsonEqual,
1362
1339
  assertNumericalEqual,
1363
1340
  assertOrThrow,
@@ -1365,8 +1342,6 @@ export {
1365
1342
  ciBuildExt,
1366
1343
  dbCloseAsync,
1367
1344
  dbExecAndReturnLastBlobAsync,
1368
- dbExecAndReturnLastJsonAsync,
1369
- dbExecAndReturnLastTextAsync,
1370
1345
  dbExecAsync,
1371
1346
  dbFileExportAsync,
1372
1347
  dbFileImportAsync,