gristlabs_grist-core/sandbox
Alex Hall 599545fb11 (core) Fuller guessing of type and options when adding first data to blank columns
Summary:
Adds `common/ValueGuesser.ts` with logic for guessing column type and widget options (only for dates/datetimes) from an array of strings, and converting the strings to the guessed type in a lossless manner, so that converting back to Text gives the original values.

Changes `_ensure_column_accepts_data` in Python to call an exported JS method using the new logic where possible.

Test Plan: Added `test/common/ValueGuesser.ts` to unit test the core guessing logic and a DocApi end-to-end test for what happens to new columns.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3290
2022-03-01 22:00:45 +02:00
..
docker (core) support python3 in grist-core, and running engine via docker and/or gvisor 2021-07-28 09:02:32 -04:00
grist (core) Fuller guessing of type and options when adding first data to blank columns 2022-03-01 22:00:45 +02:00
gen_js_schema.py (core) Use GristObjCode in CellValue 2021-10-11 14:11:32 +02:00
install_tz.js (core) move data engine code to core 2020-07-29 08:57:25 -04:00
requirements3.txt (core) Upgrade chardet 2021-10-21 18:29:17 +02:00
requirements.txt (core) Upgrade chardet 2021-10-21 18:29:17 +02:00