sqlmath 2023.7.21 → 2023.9.19
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 +41 -0
- package/README.md +5 -6
- package/jslint.mjs +1 -3
- package/package.json +3 -3
- package/sqlmath.mjs +39 -38
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
# Todo
|
|
4
|
+
- python - Revamp python-c-extension to support cp312.
|
|
5
|
+
- sqlmath - Optimize cosfit-calculation of amplitude-prm WinCosfit.caa to one-step instead of nnn-steps.
|
|
4
6
|
- none
|
|
5
7
|
|
|
8
|
+
# v2023.9.19
|
|
9
|
+
- ci - Update ci-workflow publish to auto-publish pypi-package.
|
|
10
|
+
- ci - Add ci-workflow publish_pypi_test.
|
|
11
|
+
- python - Remove setuptools dependency. - part1
|
|
12
|
+
- python - Update ci to build python-manylinux wheel.
|
|
13
|
+
- sqlmath - Add sql-function sqrtwithsign(), and remove redundant sql-function sign().
|
|
14
|
+
- sqlmath - Update function win_quantile2() to accept different quantile-arg for each icol.
|
|
15
|
+
- sqlmath - Update function win_sinefit() to allow outputting gaussian-normalized y-value gyy.
|
|
16
|
+
|
|
17
|
+
# v2023.8.20
|
|
18
|
+
- jslint - Update jslint to v2023.8.20.
|
|
19
|
+
- chart - Add technical-chart tradebot_technical_sinefit.
|
|
20
|
+
- sqlmath - bugfix - Fix buffer-overflow in c-function sql3_win_sinefit2_step().
|
|
21
|
+
- sqlmath - Rename c-struct Vector99 to Doublewin.
|
|
22
|
+
- sqlmath - Add sql-function fmod().
|
|
23
|
+
- sqlmath - Rename sql-functions xxx_cosfit_xxx() to xxx_sinefit_xxx().
|
|
24
|
+
- 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).
|
|
25
|
+
- sqlmath - Update sql-function win_cosfit2() to use sine() instead of cosine() for better phase-continuity of initial guesses of phase at cpp=0.
|
|
26
|
+
- sqlmath - Update sql-agg-function stdev() to aggregate over running-window.
|
|
27
|
+
- sqlmath - Update sql-function win_cosfit2_refitlast() to be able to update cosine-fit as well.
|
|
28
|
+
- sqlmath - Merge sql-functions win_cosfit2_predict(), win_cosfit2_extract() into sql-function cosfit_extract().
|
|
29
|
+
- sqlmath - Add c-helper-functions doubleAbs(), doubleMax(), doubleMin().
|
|
30
|
+
- sqlmath - merge c-struct WinCosfitInternal, WinCosfitResult into c-struct WinCosfit.
|
|
31
|
+
- sqlmath - Update sql-functions win_cosfit2(), win_emax(), win_quantilex() to move variable-length arguments to last position.
|
|
32
|
+
- sqlmath - Update sql-function win_cosfit2() with additional argument modeNoCsf.
|
|
33
|
+
- sqlmath - Merge sql-functions win_slr2(), win_slrcos2() into sql-function win_cosfit2().
|
|
34
|
+
- sqlmath - Streamline sql-function win_slr2_step() to only update last datapoint.
|
|
35
|
+
- sqlmath - Update sql-function win_quantile2(), win_slr2() to input/output doublearray instead of json for better performance.
|
|
36
|
+
- sqlmath - Add test-file test_data_cosfit.csv.
|
|
37
|
+
- sqlmath - Add sql-function win_slrcos2().
|
|
38
|
+
- sqlmath - Update sql-function win_slr2() to input/output doublearray instead of json for better performance.
|
|
39
|
+
- sqlmath - Rename sql-functions jsonfromdoublearray() to doublearray_jsonto(), jsontodoublearray() to doublearray_jsonfrom().
|
|
40
|
+
- sqlmath - Remove unused sql-functions:
|
|
41
|
+
btobase64(), btotext()
|
|
42
|
+
jenks_blob(), jenks_concat(), jenks_json()
|
|
43
|
+
vec_concat()
|
|
44
|
+
- betadog - Migrate sql-functions matrix2d_concat() from sqlmath to betadog.
|
|
45
|
+
- sqlmath - Add sql-function win_slr2_step() to incrementally step from last slr-state.
|
|
46
|
+
|
|
6
47
|
# v2023.7.21
|
|
7
48
|
- sqlmath - Update sql-function win_slr2() to additionally return predicted y-value and rmse.
|
|
8
49
|
- 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.
|
|
5
|
+
| Branch | [master<br>(v2023.9.19)](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 | [](https://github.com/sqlmath/sqlmath/actions?query=branch%3Amaster) | [](https://github.com/sqlmath/sqlmath/actions?query=branch%3Abeta) | [](https://github.com/sqlmath/sqlmath/actions?query=branch%3Aalpha) |
|
|
8
8
|
| Coverage | [](https://sqlmath.github.io/sqlmath/branch-master/.artifact/coverage/index.html) | [](https://sqlmath.github.io/sqlmath/branch-beta/.artifact/coverage/index.html) | [](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.
|
|
124
|
-
py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2023.
|
|
122
|
+
twine upload --repository testpypi dist/sqlmath-2023.9.19*
|
|
123
|
+
py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2023.9.19
|
|
125
124
|
#
|
|
126
|
-
twine upload dist/sqlmath-2023.
|
|
127
|
-
pip install sqlmath==2023.
|
|
125
|
+
twine upload dist/sqlmath-2023.9.19*
|
|
126
|
+
pip install sqlmath==2023.9.19
|
|
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.
|
|
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
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"engines": {
|
|
12
12
|
"node": ">=14"
|
|
13
13
|
},
|
|
14
|
-
"fileCount":
|
|
14
|
+
"fileCount": 40,
|
|
15
15
|
"homepage": "https://github.com/sqlmath/sqlmath",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"data-science",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"test2": "sh jslint_ci.sh shCiBase"
|
|
38
38
|
},
|
|
39
39
|
"shCiArtifactUpload": 1,
|
|
40
|
-
"
|
|
41
|
-
"version": "2023.
|
|
40
|
+
"shCiPublishNpm": 1,
|
|
41
|
+
"version": "2023.9.19"
|
|
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.
|
|
100
|
+
let version = "v2023.9.19";
|
|
102
101
|
|
|
103
102
|
function assertJsonEqual(aa, bb, message) {
|
|
104
103
|
|
|
@@ -351,6 +350,13 @@ async function ciBuildExt1NodejsConfigure({
|
|
|
351
350
|
|
|
352
351
|
// This function will setup posix/win32 env for building c-extension.
|
|
353
352
|
|
|
353
|
+
let cflagsNowarning = [
|
|
354
|
+
"-Wno-all",
|
|
355
|
+
"-Wno-extra",
|
|
356
|
+
"-Wno-implicit-fallthrough",
|
|
357
|
+
"-Wno-int-conversion",
|
|
358
|
+
"-Wno-unused-parameter"
|
|
359
|
+
];
|
|
354
360
|
consoleError(`ciBuildExt1Nodejs - configure binding.gyp`);
|
|
355
361
|
await fsWriteFileUnlessTest("binding.gyp", JSON.stringify({
|
|
356
362
|
"target_defaults": {
|
|
@@ -358,8 +364,7 @@ async function ciBuildExt1NodejsConfigure({
|
|
|
358
364
|
"conditions": [
|
|
359
365
|
[
|
|
360
366
|
"OS == \u0027win\u0027",
|
|
361
|
-
{"defines": ["WIN32"]}
|
|
362
|
-
{"defines": ["HAVE_UNISTD_H"]}
|
|
367
|
+
{"defines": ["WIN32"]}
|
|
363
368
|
]
|
|
364
369
|
],
|
|
365
370
|
// https://github.com/nodejs/node-gyp/blob/v9.3.1/gyp/pylib/gyp/MSVSSettings.py
|
|
@@ -372,11 +377,7 @@ async function ciBuildExt1NodejsConfigure({
|
|
|
372
377
|
},
|
|
373
378
|
"targets": [
|
|
374
379
|
{
|
|
375
|
-
"cflags":
|
|
376
|
-
"-Wno-all",
|
|
377
|
-
"-Wno-implicit-fallthrough",
|
|
378
|
-
"-Wno-unused-parameter"
|
|
379
|
-
],
|
|
380
|
+
"cflags": cflagsNowarning,
|
|
380
381
|
"sources": [
|
|
381
382
|
"build/SRC_ZLIB_BASE.c",
|
|
382
383
|
"build/SRC_SQLITE_BASE.c",
|
|
@@ -384,11 +385,7 @@ async function ciBuildExt1NodejsConfigure({
|
|
|
384
385
|
],
|
|
385
386
|
"target_name": "SRC_SQLITE_BASE",
|
|
386
387
|
"type": "static_library",
|
|
387
|
-
"xcode_settings": {"OTHER_CFLAGS":
|
|
388
|
-
"-Wno-all",
|
|
389
|
-
"-Wno-implicit-fallthrough",
|
|
390
|
-
"-Wno-unused-parameter"
|
|
391
|
-
]}
|
|
388
|
+
"xcode_settings": {"OTHER_CFLAGS": cflagsNowarning}
|
|
392
389
|
},
|
|
393
390
|
{
|
|
394
391
|
"sources": [
|
|
@@ -403,8 +400,27 @@ async function ciBuildExt1NodejsConfigure({
|
|
|
403
400
|
"SQLMATH_CUSTOM",
|
|
404
401
|
"SRC_SQLITE_BASE"
|
|
405
402
|
],
|
|
406
|
-
"sources": [
|
|
403
|
+
"sources": [
|
|
404
|
+
"sqlmath_base.c"
|
|
405
|
+
],
|
|
407
406
|
"target_name": "binding"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"cflags": cflagsNowarning,
|
|
410
|
+
"defines": [
|
|
411
|
+
"SQLITE3_SHELL_C2"
|
|
412
|
+
],
|
|
413
|
+
"dependencies": [
|
|
414
|
+
"SQLMATH_CUSTOM",
|
|
415
|
+
"SRC_SQLITE_BASE"
|
|
416
|
+
],
|
|
417
|
+
"sources": [
|
|
418
|
+
"sqlmath_base.c",
|
|
419
|
+
"build/SRC_SQLITE_SHELL.c"
|
|
420
|
+
],
|
|
421
|
+
"target_name": "shell",
|
|
422
|
+
"type": "executable",
|
|
423
|
+
"xcode_settings": {"OTHER_CFLAGS": cflagsNowarning}
|
|
408
424
|
}
|
|
409
425
|
]
|
|
410
426
|
}, undefined, 4) + "\n");
|
|
@@ -451,6 +467,14 @@ async function ciBuildExt2NodejsBuild({
|
|
|
451
467
|
rm -rf build/Release/obj/SQLMATH_CUSTOM/
|
|
452
468
|
node "${binNodegyp}" build --release
|
|
453
469
|
mv build/Release/binding.node "${cModulePath}"
|
|
470
|
+
if [ "${process.platform}" = "win32" ]
|
|
471
|
+
then
|
|
472
|
+
mv build/Release/shell \
|
|
473
|
+
"_sqlmath.shell_${process.platform}_${process.arch}.exe"
|
|
474
|
+
else
|
|
475
|
+
mv build/Release/shell \
|
|
476
|
+
"_sqlmath.shell_${process.platform}_${process.arch}"
|
|
477
|
+
fi
|
|
454
478
|
)
|
|
455
479
|
`)
|
|
456
480
|
],
|
|
@@ -533,26 +557,6 @@ function dbExecAndReturnLastBlobAsync({
|
|
|
533
557
|
});
|
|
534
558
|
}
|
|
535
559
|
|
|
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
560
|
async function dbExecAsync({
|
|
557
561
|
bindList = [],
|
|
558
562
|
db,
|
|
@@ -1357,7 +1361,6 @@ export {
|
|
|
1357
1361
|
SQLITE_OPEN_TRANSIENT_DB,
|
|
1358
1362
|
SQLITE_OPEN_URI,
|
|
1359
1363
|
SQLITE_OPEN_WAL,
|
|
1360
|
-
SQLITE_WIN_SLR_ELEM_SIZE,
|
|
1361
1364
|
assertJsonEqual,
|
|
1362
1365
|
assertNumericalEqual,
|
|
1363
1366
|
assertOrThrow,
|
|
@@ -1365,8 +1368,6 @@ export {
|
|
|
1365
1368
|
ciBuildExt,
|
|
1366
1369
|
dbCloseAsync,
|
|
1367
1370
|
dbExecAndReturnLastBlobAsync,
|
|
1368
|
-
dbExecAndReturnLastJsonAsync,
|
|
1369
|
-
dbExecAndReturnLastTextAsync,
|
|
1370
1371
|
dbExecAsync,
|
|
1371
1372
|
dbFileExportAsync,
|
|
1372
1373
|
dbFileImportAsync,
|