FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.
C++ ai-agentsalgorithmic-tradingbloomberg-terminalcppfinancefinancial-marketsfintechgood-first-issueinvestmentinvestment-researchmachine-learningopensourcepythonqtquantitative-financestock-markettrading
Add pre-release support to build-artifacts workflow for auto-update testing
tilakpatel2218e59f6033c1
diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.ymlindex e8ca5d595..2d5513a6f 100644--- a/.github/workflows/build-artifacts.yml+++ b/.github/workflows/build-artifacts.yml@@ -7,6 +7,10 @@ on:description: 'Build all platform artifacts for testing (replicates release pipeline)'required: falsedefault: 'Test build for all platforms'+ tag_name:+ description: 'Tag name for the pre-release (e.g. v3.3.1-rc.1). Leave empty to auto-generate.'+ required: false+ default: ''jobs:build:@@ -219,3 +223,113 @@ jobs:name: build-${{ matrix.os_name }}-${{ matrix.arch }}path: release-artifacts/retention-days: 30++ create-prerelease:+ needs: build+ runs-on: ubuntu-latest+ permissions:+ contents: write++ steps:+ - name: Checkout repository+ uses: actions/checkout@v4++ - name: Get version and determine tag+ id: get_version+ run: |+ VERSION=$(grep '^version = ' fincept-terminal-desktop/src-tauri/Cargo.toml | head -n1 | cut -d '"' -f2)+ echo "version=$VERSION" >> $GITHUB_OUTPUT++ INPUT_TAG="${{ github.event.inputs.tag_name }}"+ if [ -n "$INPUT_TAG" ]; then+ TAG_NAME="$INPUT_TAG"+ else+ TAG_NAME="v${VERSION}-rc.${{ github.run_number }}"+ fi+ echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT++ - name: Download all build artifacts+ uses: actions/download-artifact@v4+ with:+ path: all-artifacts++ - name: Setup Python for JSON processing+ uses: actions/setup-python@v5+ with:+ python-version: '3.12'++ - name: Organize release files and generate latest.json+ id: organize+ run: |+ mkdir -p release-files++ VERSION="${{ steps.get_version.outputs.version }}"+ TAG_NAME="${{ steps.get_version.outputs.tag_name }}"+ REPO_URL="https://github.com/${{ github.repository }}"++ echo "=== All downloaded artifacts ==="+ find all-artifacts -type f | sort++ # Copy installer files+ find all-artifacts -type f -name "*.dmg" -exec cp {} release-files/ \;+ find all-artifacts -type f -name "*.msi" -exec cp {} release-files/ \;+ find all-artifacts -type f -name "*.AppImage" -exec cp {} release-files/ \;+ find all-artifacts -type f -name "*.deb" -exec cp {} release-files/ \;++ # Copy updater archives and signatures+ find all-artifacts -type f \( -name "*-darwin.app.tar.gz" -o -name "*-linux.AppImage.tar.gz" -o -name "*-windows.nsis.zip" \) -exec cp {} release-files/ \;+ find all-artifacts -type f \( -name "*-darwin.app.tar.gz.sig" -o -name "*-linux.AppImage.tar.gz.sig" -o -name "*-windows.nsis.zip.sig" \) -exec cp {} release-files/ \;++ echo "=== Release files ==="+ ls -lh release-files/++ # Generate unified latest.json+ VERSION="${VERSION}" TAG_NAME="${TAG_NAME}" REPO_URL="${REPO_URL}" python3 scripts/generate_latest_json.py++ # Validate generated JSON+ python3 -c 'import json; data = json.load(open("release-files/latest.json")); p = data.get("platforms", {}); print(f"Valid latest.json with {len(p)} platforms"); assert p, "No platforms!"'++ echo "=== Final Release Files ==="+ ls -lh release-files/++ file_count=$(find release-files -type f | wc -l)+ [ "$file_count" -eq 0 ] && { echo "Error: No release files found"; exit 1; }+ echo "file_count=$file_count" >> $GITHUB_OUTPUT++ - name: Create pre-release+ if: steps.organize.outputs.file_count > 0+ run: |+ TAG_NAME="${{ steps.get_version.outputs.tag_name }}"++ # Delete existing release/tag if it exists (for re-runs)+ gh release delete "$TAG_NAME" --yes 2>/dev/null || true+ git push origin ":refs/tags/$TAG_NAME" 2>/dev/null || true++ gh release create "$TAG_NAME" \+ --title "FinceptTerminal ${TAG_NAME} (Pre-release)" \+ --notes "Auto-update test build from workflow run #${{ github.run_number }}.++ **This is a pre-release for testing auto-update only.**++ To test: point your updater endpoint to:+ \`https://github.com/${{ github.repository }}/releases/download/${TAG_NAME}/latest.json\`" \+ --prerelease \+ release-files/*+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}++ - name: Print updater test instructions+ run: |+ TAG_NAME="${{ steps.get_version.outputs.tag_name }}"+ echo ""+ echo "============================================"+ echo " PRE-RELEASE CREATED: ${TAG_NAME}"+ echo "============================================"+ echo ""+ echo "To test auto-update, update your tauri.conf.json updater endpoint to:"+ echo ""+ echo " https://github.com/${{ github.repository }}/releases/download/${TAG_NAME}/latest.json"+ echo ""+ echo "Then install an OLDER version of the app and launch it."+ echo "The updater should detect ${TAG_NAME} and prompt to update."+ echo "============================================"diff --git a/fincept-terminal-desktop/src-tauri/resources/scripts/Analytics/gs_quant_wrapper/worker_handler.py b/fincept-terminal-desktop/src-tauri/resources/scripts/Analytics/gs_quant_wrapper/worker_handler.pyindex 75e97b85a..a39bf9990 100644--- a/fincept-terminal-desktop/src-tauri/resources/scripts/Analytics/gs_quant_wrapper/worker_handler.py+++ b/fincept-terminal-desktop/src-tauri/resources/scripts/Analytics/gs_quant_wrapper/worker_handler.py@@ -6,12 +6,19 @@ Pattern: main(args) dispatches [operation, json_data]."""import sys+import osimport jsonimport tracebackimport numpy as npimport pandas as pdfrom datetime import datetime+# Add parent directory to path for absolute imports when run as script+_script_dir = os.path.dirname(os.path.abspath(__file__))+_parent_dir = os.path.dirname(_script_dir)+if _parent_dir not in sys.path:+ sys.path.insert(0, _parent_dir)+def _series_from_list(values, dates=None, name="series"):"""Helper: Convert list of values (+ optional dates) to pd.Series."""@@ -38,7 +45,7 @@ def _df_from_dict(data_dict, dates=None):def op_performance_analysis(data):"""Full performance analysis: returns, risk, distribution metrics."""- from .timeseries_analytics import TimeseriesAnalytics, TimeseriesConfig+ from gs_quant_wrapper.timeseries_analytics import TimeseriesAnalytics, TimeseriesConfigprices = data.get("prices", [])benchmark_prices = data.get("benchmark_prices", [])@@ -62,7 +69,7 @@ def op_performance_analysis(data):def op_technical_analysis(data):"""Technical indicators summary: SMA, EMA, RSI, MACD, Bollinger Bands, ATR."""- from .timeseries_analytics import TimeseriesAnalytics, TimeseriesConfig+ from gs_quant_wrapper.timeseries_analytics import TimeseriesAnalytics, TimeseriesConfigprices = data.get("prices", [])high = data.get("high", [])@@ -82,7 +89,7 @@ def op_technical_analysis(data):def op_risk_metrics(data):"""Comprehensive risk metrics: volatility, VaR, CVaR, drawdown, ratios."""- from . import ts_risk_measures as risk+ from gs_quant_wrapper import ts_risk_measures as riskreturns_list = data.get("returns", [])risk_free_rate = data.get("risk_free_rate", 0.0)@@ -127,7 +134,7 @@ def op_risk_metrics(data):def op_portfolio_analytics(data):"""Portfolio analytics with benchmark comparison."""- from . import ts_portfolio_analytics as port+ from gs_quant_wrapper import ts_portfolio_analytics as portreturns_list = data.get("returns", [])benchmark_list = data.get("benchmark_returns", [])@@ -169,7 +176,7 @@ def op_portfolio_analytics(data):def op_volatility_surface(data):"""Forward volatility and variance term structure."""- from . import ts_risk_measures as risk+ from gs_quant_wrapper import ts_risk_measures as riskreturns_list = data.get("returns", [])tenors = data.get("tenors", [21, 63, 126, 252])@@ -201,7 +208,7 @@ def op_volatility_surface(data):def op_statistics(data):"""Descriptive statistics: mean, std, skew, kurtosis, percentiles, z-scores."""- from . import ts_math_statistics as ms+ from gs_quant_wrapper import ts_math_statistics as msvalues = data.get("values", [])dates = data.get("dates")@@ -230,7 +237,7 @@ def op_statistics(data):def op_correlation_analysis(data):"""Correlation, beta, R-squared between two series."""- from . import ts_math_statistics as ms+ from gs_quant_wrapper import ts_math_statistics as msx_values = data.get("x", [])y_values = data.get("y", [])@@ -250,7 +257,7 @@ def op_correlation_analysis(data):def op_backtest(data):"""Run a backtest strategy: buy-and-hold, momentum, mean-reversion, rebalancing."""- from .backtest_analytics import BacktestEngine, BacktestConfig+ from gs_quant_wrapper.backtest_analytics import BacktestEngine, BacktestConfigprices_dict = data.get("prices", {})strategy = data.get("strategy", "buy_and_hold")@@ -309,7 +316,7 @@ def op_backtest(data):def op_basket_backtest(data):"""Basket/composite portfolio backtest."""- from . import ts_portfolio_analytics as port+ from gs_quant_wrapper import ts_portfolio_analytics as portcomponents_dict = data.get("components", {})weights = data.get("weights")@@ -333,7 +340,7 @@ def op_basket_backtest(data):def op_datetime_utils(data):"""Date/time utilities: business days, day count fractions, date ranges."""- from .datetime_utils import DateTimeUtils+ from gs_quant_wrapper.datetime_utils import DateTimeUtilsdt = DateTimeUtils()operation = data.get("sub_operation", "business_days")@@ -369,7 +376,7 @@ def op_datetime_utils(data):def op_greeks(data):"""Calculate Greeks for a derivative instrument."""- from .risk_analytics import RiskAnalytics, RiskConfig+ from gs_quant_wrapper.risk_analytics import RiskAnalytics, RiskConfigrisk = RiskAnalytics(RiskConfig())@@ -386,7 +393,7 @@ def op_greeks(data):def op_var_analysis(data):"""Value at Risk analysis: parametric, historical, Monte Carlo, CVaR."""- from .risk_analytics import RiskAnalytics, RiskConfig+ from gs_quant_wrapper.risk_analytics import RiskAnalytics, RiskConfigreturns_list = data.get("returns", [])confidence = data.get("confidence", 0.95)@@ -421,7 +428,7 @@ def op_var_analysis(data):def op_stress_test(data):"""Stress testing with standard market scenarios."""- from .risk_analytics import RiskAnalytics, RiskConfig+ from gs_quant_wrapper.risk_analytics import RiskAnalytics, RiskConfigreturns_list = data.get("returns", [])position_value = data.get("position_value", 1000000)@@ -453,7 +460,7 @@ def op_stress_test(data):def op_instrument_create(data):"""Create and summarize a financial instrument."""- from .instrument_wrapper import InstrumentFactory+ from gs_quant_wrapper.instrument_wrapper import InstrumentFactoryfactory = InstrumentFactory()instrument_type = data.get("instrument_type", "equity")@@ -503,7 +510,7 @@ def op_instrument_create(data):def op_comprehensive_risk_report(data):"""Full risk report combining Greeks, VaR, scenarios."""- from .risk_analytics import RiskAnalytics, RiskConfig+ from gs_quant_wrapper.risk_analytics import RiskAnalytics, RiskConfigreturns_list = data.get("returns", [])position_value = data.get("position_value", 1000000)@@ -541,7 +548,7 @@ def op_comprehensive_risk_report(data):def op_historical_simulation(data):"""Historical simulation for PnL estimation."""- from . import ts_portfolio_analytics as port+ from gs_quant_wrapper import ts_portfolio_analytics as portreturns_list = data.get("returns", [])position_value = data.get("position_value", 1000000)diff --git a/fincept-terminal-desktop/vite.config.ts b/fincept-terminal-desktop/vite.config.tsindex 889937db7..c5012e028 100644--- a/fincept-terminal-desktop/vite.config.ts+++ b/fincept-terminal-desktop/vite.config.ts@@ -136,7 +136,7 @@ export default defineConfig({extensions: ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json', '.cjs']},optimizeDeps: {- exclude: ['@mapbox/node-pre-gyp', 'mock-aws-s3', 'aws-sdk', 'nock'],+ exclude: ['@mapbox/node-pre-gyp', 'mock-aws-s3', 'aws-sdk', 'nock', '@loaders.gl/draco'],// Force these to be pre-bundled and ensure they have proper globalsinclude: ['buffer',@@ -185,7 +185,8 @@ export default defineConfig({'path','node:path','os',- 'node:os'+ 'node:os',+ '@loaders.gl/draco'],output: {manualChunks: {