Releases: HazelnutParadise/insyra
Pier-2 v0.2.16
Pier-2 v0.2.15
v0.2.15
- Added Insyra Agent Skills (located in the
skillsdirectory). - Introduced the Insyra CLI.
- Added topic-guided documentation.
DataList
- The
Rankfunction now accepts an optionalascendingparameter.
v0.2.15
- 新增 Insyra 的 Agent Skills(位於 skills 資料夾下)。
- 新增 Insyra CLI。
- 新增主題引導式文件。
DataList
Rank函數接受可選的ascending參數。
Pier-2 v0.2.14
v0.2.14
- Added the
pdpackage to enable interoperability between Insyra and gpandas. - Introduced the
enginepackage to expose useful internal algorithms and data structures, allowing other developers to reuse them more flexibly.
py
PipInstall,PipUninstall,PipList, andPipFreezenow execute without showing any window.
gplot
- Updated the API to pass data as function parameters instead of embedding it internally.
v0.2.14
- 新增
pd包以實現 Insyra 和 gpandas 之間的互通性。 - 新增
engine將實用的內部演算法和結構導出,供其它開發者靈活應用。
py
PipInstall、PipUninstall、PipList、PipFreeze執行時現在都會隱藏視窗。
gplot
- 更改 API,將資料改為函數的參數。
Pier-2 v0.2.13
v0.2.13
- All command executions no longer spawn a terminal window.
- Improved documentation for better readability and clarity.
Error Handling
1. New ErrorInfo structure (error_buffer.go)
type ErrorInfo struct {
Level LogLevel
PackageName string
FuncName string
Message string
Timestamp time.Time
}- Implements the
errorinterface via theError()method. - Added
LogLevel.String().
2. Enhanced global error buffer (error_buffer.go)
New convenience methods:
HasError()/HasErrorAboveLevel(level)– check whether errors existPeekError(mode)– inspect errors without removing themGetAllErrors()– retrieve all errorsGetErrorsByLevel(level)/GetErrorsByPackage(pkg)– filter errorsPopAllErrors()/PopErrorInfo(mode)– retrieve and remove errors
3. Instance-level error tracking (datatable.go, datalist.go)
- Added
lastError *ErrorInfofield - Added
Err()– retrieve the last error - Added
ClearErr()– clear the error and return the instance (supports chaining) - Added
setError()– assign an instance-level error - Added helper
warn()– calls bothLogWarningandsetError
CCL
- Fixed an eager-evaluation issue in expressions such as
IF(# > 0, ['date'].(#-1) - ['date'], NULL), where IF arguments were evaluated prematurely. - Dates and date strings can now be subtracted, returning
time.Duration. - Added
DAY,HOUR,MINUTE, andSECONDfunctions.
DataList
Appendnow returnsDataList, enabling chained calls.
DataTable
- Introduced a new
BiIndexstructure for storing row names, improving lookup performance. Mergenow supports left join and right join, and theonparameter can accept two column names (left and right tables).- Improved performance of conversions between column indices and numeric indices.
plot
- Added refined and visually pleasing default color palettes.
py
- Python code execution now uses temporary files to avoid command-line length limitations.
- Python results are now returned via IPC (Windows Named Pipes / Unix Domain Sockets).
datafetch
- Added Yahoo Finance data support using
github.com/wnjoon/go-yfinance.
v0.2.13
- 將所有指令執行改成不彈出終端機視窗。
- 改善文件,提升易讀性。
錯誤處理
- 新增 ErrorInfo 結構 (error_buffer.go)
type ErrorInfo struct {
Level LogLevel
PackageName string
FuncName string
Message string
Timestamp time.Time
}- 實作 error 介面的 Error() 方法
- 新增 LogLevel.String() 方法
- 全域錯誤緩衝區增強 (error_buffer.go)
新增便捷方法:
- HasError() / HasErrorAboveLevel(level) - 檢查是否有錯誤
- PeekError(mode) - 查看錯誤但不移除
- GetAllErrors() - 取得所有錯誤
- GetErrorsByLevel(level) / GetErrorsByPackage(pkg) - 篩選錯誤
- PopAllErrors() / PopErrorInfo(mode) - 取出並移除錯誤
- 實例級別錯誤追蹤 (datatable.go, datalist.go)
- 新增 lastError *ErrorInfo 欄位
- 新增 Err() - 取得最後一個錯誤
- 新增 ClearErr() - 清除錯誤並返回自身(支持鏈式呼叫)
- 新增 setError() - 設定實例錯誤
- 新增 warn() 輔助方法 - 同時呼叫 LogWarning 和 setError
CCL
- 修正像 IF(#>0, ['date'].(#-1) - ['date'], NULL) 這類表達式時,IF 的參數會被 eager evaluate 的問題。
- 日期及日期字串可以計算(回傳 time.Duration)。
- 新增
DAY、HOUR、MINUTE、SECOND函數。
DataList
Append方法回傳 DataList,方便鏈式呼叫。
DataTable
- 使用新的
BiIndex結構來儲存列名,提升查詢速度。 Merge支援 left join 和 right join,並且 on 參數可接受兩個欄名(左表與右表)。- 提升欄索引和數字索引的轉換性能。
plot
- 提供精美的預設配色。
py
- 改為使用暫存檔執行 Python 程式碼,避免命令列指令長度限制。
- 回傳 Python 結果改用 IPC(Windows Named Pipe / Unix Domain Socket)。
datafetch
- 新增 Yahoo Finance 資料,使用 github.com/wnjoon/go-yfinance。
Pier-2 v0.2.12
v0.2.12
py
-
Fixed the Python result-receiving server to listen on
localhostonly. -
When Python returns a
DataFrameorSeries, the Go side can now receive them asDataTableorDataList.- One-dimensional lists or tuples can be received as
DataList. - Two-dimensional lists, dictionaries, or lists of dictionaries can be received as
DataTable.
- One-dimensional lists or tuples can be received as
-
Added
PipListandPipFreezeto retrieve the list of installed packages in the current Python environment. -
PipInstallandPipUninstallnow return errors instead of failing silently. -
Added
RunCodeContext,RunCodefContext,RunFileContext, andRunFilefContextto allow users to cancel running Python code via context control. -
Added
RunCodeWithTimeout, which automatically cancels Python execution after a timeout. -
Environment initialization failures now return errors instead of calling
Fatal(except for server initialization failures).
v0.2.12
py
- 將接收 Python 結果的伺服器修正為只聽 localhost。
- Python 端回傳 DataFrame 或 Series 時,Go 端現在可由 DataTable 或 DataList 接收。一維串列或元組也可以用 DataList 接收;二維串列或字典或字典串列可以用 DataTable 接收。
- 新增
PipList和PipFreeze,用來取得目前 Python 環境中的套件清單。 PipInstall和PipUninstall現在會回傳錯誤。- 新增
RunCodeContext、RunCodefContext、RunFileContext、RunFilefContext方便使用者取消執行 Python 程式碼。 - 新增
RunCodeWithTimeout自動在超時後取消執行 Python。 - 環境初始化失敗將回傳錯誤,不再 Fatal(伺服器初始化失敗除外)。
Pier-2 v0.2.11
v0.2.11
parquet
- Introduced a new package for reading
.parquetfiles and exportingDataTableto Parquet format.
DataList
ReplaceFirst,ReplaceLast, andReplaceAllnow return the modifiedDataList, enabling chained calls.- Replace-series methods now support
NaN. - Drop-series methods now support
NaN. DropIfContainshas been fixed to accept a substring.- Find-series methods now support
NaN. Countnow supportsNaN.- Added
Concatto concatenate with anotherDataListand return a newDataList. - Added
AppendDataListto append anotherDataListdirectly to the current one. - The
Showoutput now displays strings wrapped in single quotes ('), and numeric values are right-aligned.
DataTable
-
DropColsContainandDropRowsContainnow supportNaN. -
Added replacement-related methods:
Replace,ReplaceNaNsWith,ReplaceNilsWith,ReplaceNaNsAndNilsWithReplaceInRow,ReplaceNaNsInRow,ReplaceNilsInRow,ReplaceNaNsAndNilsInRowReplaceInCol,ReplaceNaNsInCol,ReplaceNilsInCol,ReplaceNaNsAndNilsInCol
-
Countnow supportsNaN. -
SetRowNameByIndexnow supports chained calls. -
Added
Mergeto combine two DataTables and return a new merged DataTable. -
Fixed the
Showmethod to correctly handle extreme cases with very long column names; strings are now shown with single quotes ('), and numbers are right-aligned. -
Added
NumRowsandNumCols.
CCL
- Added support for the
niltype. - Added
ISNAandIFNAfunctions for checkingNaNand Excel error values. - Introduced the
.operator to reference a specific row within a column. - Introduced the
@operator to represent all columns;@.0refers to the first row. - Added aggregate functions:
SUM,AVG,COUNT,MAX, andMIN. - Added the row index operator
#to retrieve the current row index. - Added the range operator
:.
plot
- Removed the Liquid Chart due to design limitations in
go-echarts. - Redesigned the entire package to improve usability.
v0.2.11
parquet
此次更新新增的包,用於讀取 .parquet 檔,並且能將 DataTable 轉為 parquet。
DataList
ReplaceFirst、ReplaceLast、ReplaceAll現在都會回傳修改後的 DataList,方便鏈式呼叫。- Replace 系列方法支援 NaN。
- Drop 系列方法支援 NaN。
DropIfContains修正為接收一個子字串。- Find 系列方法支援 NaN。
Count支援 NaN。- 新增
Concat方法,可和另一個 DataLsit 連接並回傳新 DataList。 - 新增
AppendDataList,用於直接將另一個 DataList 加進目前 DataList。 Show方法字串現在會顯示單引號',數字會靠右對齊。
DataTable
DropColsContain、DropRowsContain支援 NaN。- 新增
Replace、ReplaceNaNsWith、ReplaceNilsWith、ReplaceNaNsAndNilsWith、ReplaceInRow、ReplaceNaNsInRow、ReplaceNilsInRow、ReplaceNaNsAndNilsInRow、ReplaceInCol、ReplaceNaNsInCol、ReplaceNilsInCol、ReplaceNaNsAndNilsInCol。 Count支援 NaN。SetRowNameByIndex現在可鏈式呼叫。- 新增
Merge方法,用於合併兩個 DataTable,並回傳合併好的新 DataTable。 - 修正
Show方法,讓欄名很長的極端情況也能正常顯示。並且字串現在會顯示單引號',數字會靠右對齊。 - 新增
NumRows和NumCols。
CCL
- 支援 nil 型別。
- 新增
ISNA和IFNA函數,用於檢查 NaN 和 Excel 錯誤。 - 新增
.運算子來指定欄中的某一列。 - 新增
@運算子來代表所有欄,@.0可指定第一列。 - 新增聚合函數
SUM、AVG、COUNT、MAX、MIN。 - 新增列索引運算子
#,用於取得目前列索引。 - 新增範圍運算子
:。
plot
- 由於 go-echarts 的設計缺陷,我們決定移除液體圖。
- 重新設計整個包,使其更容易使用。
Pier-2 v0.2.10
v0.2.10
ReadCSV_Filenow supports specifying the file encoding; if not provided, the encoding will be automatically detected to support formats beyond UTF-8.- Added
ReadExcelSheet, allowing Excel worksheets to be read directly into a DataTable. - Updated dependencies.
DataList
- Added
ReplaceNaNsAndNilsWith,ReplaceNilsWith,ReplaceNaNsWith,ClearNilsAndNaNs, andClearNils.
DataTable
- Added
GetRowIndexByName,DropColsContainNaN, andDropRowsContainNaN. - Refactored the naming and return values of the Drop-series methods for better consistency and improved support for chained calls.
GetRowIndexByNameandGetRowNameByIndexnow return a boolean value for more convenient usage.
isr
- Added
Ofas an alias forFrom, providing a shorter and more ergonomic syntax. - Added
DT.CCLfor executing CCL statements directly on a DataTable. CSV_inOptsnow includes an encoding option.- Added an
Excelstruct, which can be used withDT.OforDT.Fromto import Excel worksheets into a DataTable.
mkt
- Fixed the F calculation logic in
RFMso that, within the same time scale, each customer is counted only once. - Corrected time-difference calculations in
RFMandCAIto properly respect the specified time scale.
csvxl
- All functions now return errors to make error handling more explicit and consistent.
- Moved
DetectEncodingto the coreinsyrapackage. - Added
ReadCsvToStringto read CSV files directly into a string.
plot
- Fixed the internal logic of
SavePNG.
v0.2.10
ReadCSV_File現在可以指定編碼,若無指定則自動偵測,以支援 utf-8 以外的格式。- 新增
ReadExcelSheet,可直接將 Excel 工作表讀取成 DataTable。 - 更新依賴套件。
DataList
- 新增
ReplaceNaNsAndNilsWith、ReplaceNilsWith、ReplaceNaNsWith、ClearNilsAndNaNs、ClearNils。
DataTable
- 新增
GetRowIndexByName、DropColsContainNaN、DropRowsContainNaN。 - 調整 Drop 系列方法的函數名稱和回傳值,使命名更統一並方便鏈式呼叫。
GetRowIndexByName和GetRowNameByIndex方法現在會回傳布林值,更方便使用。
isr
- 新增
Of方法作為From的別名,提供更短的語法糖。 - 新增
DT.CCL方法以執行 CCL 語句。 CSV_inOpts提供編碼選項。- 新增
Excel結構體,與DT.Of或DT.From搭配可將 Excel 工作表匯入 DataTable。
mkt
- 修正
RFM的 F 計算邏輯,同會員同一時間尺度下只計算一次。 - 修正
RFM和CAI的時間差計算,使其符合給定的時間尺度。
csvxl
- 所有函數改為回傳錯誤,讓錯誤處理更容易。
- 將
DetectEncoding移到 insyra 核心包。 - 新增
ReadCsvToString,可將 CSV 檔讀取成字串。
plot
- 修正
SavePNG的內部邏輯。
v0.2.10-a.3: Merge pull request #112 from HazelnutParadise/dev
更新版本號至 0.2.10-a.3,修正填充區域透明度設置為 opts.Float(0.5)
v0.2.10-a.2: Merge pull request #111 from HazelnutParadise/dev
Dev
v0.2.10-a.1: Merge pull request #110 from HazelnutParadise/dev
0.2.10-a.1