Skip to content

Releases: HazelnutParadise/insyra

Pier-2 v0.2.16

07 Apr 02:40
7b1c2c3

Choose a tag to compare

  • Fixed an issue where the CLI main program was mistakenly ignored by .gitignore in the previous version.

Pier-2 v0.2.15

06 Mar 11:46
b1e4bde

Choose a tag to compare

v0.2.15

  • Added Insyra Agent Skills (located in the skills directory).
  • Introduced the Insyra CLI.
  • Added topic-guided documentation.

DataList

  • The Rank function now accepts an optional ascending parameter.

v0.2.15

  • 新增 Insyra 的 Agent Skills(位於 skills 資料夾下)。
  • 新增 Insyra CLI。
  • 新增主題引導式文件。

DataList

  • Rank 函數接受可選的 ascending 參數。

Pier-2 v0.2.14

07 Feb 04:12
4a120db

Choose a tag to compare

v0.2.14

  • Added the pd package to enable interoperability between Insyra and gpandas.
  • Introduced the engine package to expose useful internal algorithms and data structures, allowing other developers to reuse them more flexibly.

py

  • PipInstall, PipUninstall, PipList, and PipFreeze now 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

  • PipInstallPipUninstallPipListPipFreeze 執行時現在都會隱藏視窗。

gplot

  • 更改 API,將資料改為函數的參數。

Pier-2 v0.2.13

10 Jan 07:32
69fc7f2

Choose a tag to compare

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 error interface via the Error() method.
  • Added LogLevel.String().

2. Enhanced global error buffer (error_buffer.go)

New convenience methods:

  • HasError() / HasErrorAboveLevel(level) – check whether errors exist
  • PeekError(mode) – inspect errors without removing them
  • GetAllErrors() – retrieve all errors
  • GetErrorsByLevel(level) / GetErrorsByPackage(pkg) – filter errors
  • PopAllErrors() / PopErrorInfo(mode) – retrieve and remove errors

3. Instance-level error tracking (datatable.go, datalist.go)

  • Added lastError *ErrorInfo field
  • 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 both LogWarning and setError

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, and SECOND functions.

DataList

  • Append now returns DataList, enabling chained calls.

DataTable

  • Introduced a new BiIndex structure for storing row names, improving lookup performance.
  • Merge now supports left join and right join, and the on parameter 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

  • 將所有指令執行改成不彈出終端機視窗。
  • 改善文件,提升易讀性。

錯誤處理

  1. 新增 ErrorInfo 結構 (error_buffer.go)
  type ErrorInfo struct {
      Level       LogLevel
      PackageName string
      FuncName    string
      Message     string
      Timestamp   time.Time
  }
  • 實作 error 介面的 Error() 方法
  • 新增 LogLevel.String() 方法
  1. 全域錯誤緩衝區增強 (error_buffer.go)

新增便捷方法:

  • HasError() / HasErrorAboveLevel(level) - 檢查是否有錯誤
  • PeekError(mode) - 查看錯誤但不移除
  • GetAllErrors() - 取得所有錯誤
  • GetErrorsByLevel(level) / GetErrorsByPackage(pkg) - 篩選錯誤
  • PopAllErrors() / PopErrorInfo(mode) - 取出並移除錯誤
  1. 實例級別錯誤追蹤 (datatable.go, datalist.go)
  • 新增 lastError *ErrorInfo 欄位
  • 新增 Err() - 取得最後一個錯誤
  • 新增 ClearErr() - 清除錯誤並返回自身(支持鏈式呼叫)
  • 新增 setError() - 設定實例錯誤
  • 新增 warn() 輔助方法 - 同時呼叫 LogWarning 和 setError

CCL

  • 修正像 IF(#>0, ['date'].(#-1) - ['date'], NULL) 這類表達式時,IF 的參數會被 eager evaluate 的問題。
  • 日期及日期字串可以計算(回傳 time.Duration)。
  • 新增 DAYHOURMINUTESECOND 函數。

DataList

  • Append 方法回傳 DataList,方便鏈式呼叫。

DataTable

  • 使用新的 BiIndex 結構來儲存列名,提升查詢速度。
  • Merge 支援 left join 和 right join,並且 on 參數可接受兩個欄名(左表與右表)。
  • 提升欄索引和數字索引的轉換性能。

plot

  • 提供精美的預設配色。

py

  • 改為使用暫存檔執行 Python 程式碼,避免命令列指令長度限制。
  • 回傳 Python 結果改用 IPC(Windows Named Pipe / Unix Domain Socket)。

datafetch

Pier-2 v0.2.12

03 Jan 04:55
909742d

Choose a tag to compare

v0.2.12

py

  • Fixed the Python result-receiving server to listen on localhost only.

  • When Python returns a DataFrame or Series, the Go side can now receive them as DataTable or DataList.

    • One-dimensional lists or tuples can be received as DataList.
    • Two-dimensional lists, dictionaries, or lists of dictionaries can be received as DataTable.
  • Added PipList and PipFreeze to retrieve the list of installed packages in the current Python environment.

  • PipInstall and PipUninstall now return errors instead of failing silently.

  • Added RunCodeContext, RunCodefContext, RunFileContext, and RunFilefContext to 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 接收。
  • 新增 PipListPipFreeze,用來取得目前 Python 環境中的套件清單。
  • PipInstallPipUninstall 現在會回傳錯誤。
  • 新增 RunCodeContextRunCodefContextRunFileContextRunFilefContext 方便使用者取消執行 Python 程式碼。
  • 新增 RunCodeWithTimeout 自動在超時後取消執行 Python。
  • 環境初始化失敗將回傳錯誤,不再 Fatal(伺服器初始化失敗除外)。

Pier-2 v0.2.11

31 Dec 10:05
4a9a5e5

Choose a tag to compare

v0.2.11

parquet

  • Introduced a new package for reading .parquet files and exporting DataTable to Parquet format.

DataList

  • ReplaceFirst, ReplaceLast, and ReplaceAll now return the modified DataList, enabling chained calls.
  • Replace-series methods now support NaN.
  • Drop-series methods now support NaN.
  • DropIfContains has been fixed to accept a substring.
  • Find-series methods now support NaN.
  • Count now supports NaN.
  • Added Concat to concatenate with another DataList and return a new DataList.
  • Added AppendDataList to append another DataList directly to the current one.
  • The Show output now displays strings wrapped in single quotes ('), and numeric values are right-aligned.

DataTable

  • DropColsContain and DropRowsContain now support NaN.

  • Added replacement-related methods:

    • Replace, ReplaceNaNsWith, ReplaceNilsWith, ReplaceNaNsAndNilsWith
    • ReplaceInRow, ReplaceNaNsInRow, ReplaceNilsInRow, ReplaceNaNsAndNilsInRow
    • ReplaceInCol, ReplaceNaNsInCol, ReplaceNilsInCol, ReplaceNaNsAndNilsInCol
  • Count now supports NaN.

  • SetRowNameByIndex now supports chained calls.

  • Added Merge to combine two DataTables and return a new merged DataTable.

  • Fixed the Show method to correctly handle extreme cases with very long column names; strings are now shown with single quotes ('), and numbers are right-aligned.

  • Added NumRows and NumCols.

CCL

  • Added support for the nil type.
  • Added ISNA and IFNA functions for checking NaN and Excel error values.
  • Introduced the . operator to reference a specific row within a column.
  • Introduced the @ operator to represent all columns; @.0 refers to the first row.
  • Added aggregate functions: SUM, AVG, COUNT, MAX, and MIN.
  • 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

  • ReplaceFirstReplaceLastReplaceAll 現在都會回傳修改後的 DataList,方便鏈式呼叫。
  • Replace 系列方法支援 NaN。
  • Drop 系列方法支援 NaN。
  • DropIfContains 修正為接收一個子字串。
  • Find 系列方法支援 NaN。
  • Count 支援 NaN。
  • 新增 Concat 方法,可和另一個 DataLsit 連接並回傳新 DataList。
  • 新增 AppendDataList,用於直接將另一個 DataList 加進目前 DataList。
  • Show 方法字串現在會顯示單引號 ',數字會靠右對齊。

DataTable

  • DropColsContainDropRowsContain 支援 NaN。
  • 新增 ReplaceReplaceNaNsWithReplaceNilsWithReplaceNaNsAndNilsWithReplaceInRowReplaceNaNsInRowReplaceNilsInRowReplaceNaNsAndNilsInRowReplaceInColReplaceNaNsInColReplaceNilsInColReplaceNaNsAndNilsInCol
  • Count 支援 NaN。
  • SetRowNameByIndex 現在可鏈式呼叫。
  • 新增 Merge 方法,用於合併兩個 DataTable,並回傳合併好的新 DataTable。
  • 修正 Show 方法,讓欄名很長的極端情況也能正常顯示。並且字串現在會顯示單引號 ',數字會靠右對齊。
  • 新增 NumRowsNumCols

CCL

  • 支援 nil 型別。
  • 新增 ISNAIFNA 函數,用於檢查 NaN 和 Excel 錯誤。
  • 新增 . 運算子來指定欄中的某一列。
  • 新增 @ 運算子來代表所有欄,@.0 可指定第一列。
  • 新增聚合函數 SUMAVGCOUNTMAXMIN
  • 新增列索引運算子 #,用於取得目前列索引。
  • 新增範圍運算子 :

plot

  • 由於 go-echarts 的設計缺陷,我們決定移除液體圖。
  • 重新設計整個包,使其更容易使用。

Pier-2 v0.2.10

21 Dec 15:53
937ed0b

Choose a tag to compare

v0.2.10

  • ReadCSV_File now 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, and ClearNils.

DataTable

  • Added GetRowIndexByName, DropColsContainNaN, and DropRowsContainNaN.
  • Refactored the naming and return values of the Drop-series methods for better consistency and improved support for chained calls.
  • GetRowIndexByName and GetRowNameByIndex now return a boolean value for more convenient usage.

isr

  • Added Of as an alias for From, providing a shorter and more ergonomic syntax.
  • Added DT.CCL for executing CCL statements directly on a DataTable.
  • CSV_inOpts now includes an encoding option.
  • Added an Excel struct, which can be used with DT.Of or DT.From to import Excel worksheets into a DataTable.

mkt

  • Fixed the F calculation logic in RFM so that, within the same time scale, each customer is counted only once.
  • Corrected time-difference calculations in RFM and CAI to properly respect the specified time scale.

csvxl

  • All functions now return errors to make error handling more explicit and consistent.
  • Moved DetectEncoding to the core insyra package.
  • Added ReadCsvToString to 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

  • 新增 ReplaceNaNsAndNilsWithReplaceNilsWithReplaceNaNsWithClearNilsAndNaNsClearNils

DataTable

  • 新增 GetRowIndexByNameDropColsContainNaNDropRowsContainNaN
  • 調整 Drop 系列方法的函數名稱和回傳值,使命名更統一並方便鏈式呼叫。
  • GetRowIndexByNameGetRowNameByIndex 方法現在會回傳布林值,更方便使用。

isr

  • 新增 Of 方法作為 From 的別名,提供更短的語法糖。
  • 新增 DT.CCL 方法以執行 CCL 語句。
  • CSV_inOpts 提供編碼選項。
  • 新增 Excel 結構體,與 DT.OfDT.From 搭配可將 Excel 工作表匯入 DataTable。

mkt

  • 修正 RFM 的 F 計算邏輯,同會員同一時間尺度下只計算一次。
  • 修正 RFMCAI 的時間差計算,使其符合給定的時間尺度。

csvxl

  • 所有函數改為回傳錯誤,讓錯誤處理更容易。
  • DetectEncoding 移到 insyra 核心包。
  • 新增 ReadCsvToString,可將 CSV 檔讀取成字串。

plot

  • 修正 SavePNG 的內部邏輯。

v0.2.10-a.3: Merge pull request #112 from HazelnutParadise/dev

20 Dec 10:51
a2969a5

Choose a tag to compare

更新版本號至 0.2.10-a.3,修正填充區域透明度設置為 opts.Float(0.5)

v0.2.10-a.2: Merge pull request #111 from HazelnutParadise/dev

20 Dec 10:40
bb46c56

Choose a tag to compare

v0.2.10-a.1: Merge pull request #110 from HazelnutParadise/dev

20 Dec 10:15
7d68c78

Choose a tag to compare