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
github actions
tilakpatel220629b9686490
diff --git a/.github/workflows/test-macos-setup.yml b/.github/workflows/test-macos-setup.ymldeleted file mode 100644index cd200f681..000000000--- a/.github/workflows/test-macos-setup.yml+++ /dev/null@@ -1,292 +0,0 @@-name: Test macOS Setup Dependencies--on:- workflow_dispatch:- pull_request:- paths:- - 'fincept-terminal-desktop/src-tauri/src/setup.rs'- - 'fincept-terminal-desktop/src-tauri/resources/requirements-numpy1.txt'- - 'fincept-terminal-desktop/src-tauri/resources/requirements-numpy2.txt'--jobs:- test-precompiled-wheels:- name: Test Pre-compiled Wheels (${{ matrix.arch }})- strategy:- matrix:- include:- - runner: macos-14- arch: Apple Silicon (ARM64)- python-url: https://github.com/astral-sh/python-build-standalone/releases/download/20240726/cpython-3.12.4+20240726-aarch64-apple-darwin-install_only.tar.gz- - runner: macos-13- arch: Intel (x64)- python-url: https://github.com/astral-sh/python-build-standalone/releases/download/20240726/cpython-3.12.4+20240726-x86_64-apple-darwin-install_only.tar.gz-- runs-on: ${{ matrix.runner }}-- steps:- - name: Checkout repository- uses: actions/checkout@v4-- - name: Test Python download and extraction- run: |- echo "Testing Python download for ${{ matrix.arch }}"- mkdir -p test-python- curl -L -o test-python/python.tar.gz "${{ matrix.python-url }}"-- echo "File downloaded, checking size..."- ls -lh test-python/python.tar.gz- file test-python/python.tar.gz-- echo "Testing gunzip..."- gunzip test-python/python.tar.gz-- echo "Testing tar extraction..."- tar -xf test-python/python.tar -C test-python --strip-components=1-- echo "Checking extracted files..."- ls -la test-python/bin/ || echo "No bin directory found"- test-python/bin/python3 --version || echo "Python executable test failed"-- echo "✅ Python extraction successful"-- - name: Test llvmlite/numba wheel availability- run: |- echo "Testing llvmlite and numba wheel availability..."- python3 -m pip install --dry-run llvmlite==0.43.0 numba==0.60.0 2>&1 | tee wheel_test.log-- if grep -q "Building wheel" wheel_test.log; then- echo "⚠️ WARNING: Packages require compilation (no pre-built wheels)"- echo "needs_compilation=true" >> $GITHUB_OUTPUT- else- echo "✅ Pre-built wheels available"- echo "needs_compilation=false" >> $GITHUB_OUTPUT- fi- id: wheel_check-- - name: Test vnpy wheel availability- run: |- echo "Testing vnpy wheel availability..."- python3 -m pip install --dry-run vnpy==4.3.0 2>&1 | tee vnpy_test.log-- if grep -q "Building wheel" vnpy_test.log; then- echo "⚠️ WARNING: vnpy requires compilation (likely needs TA-Lib)"- echo "vnpy_needs_compilation=true" >> $GITHUB_OUTPUT- else- echo "✅ vnpy has pre-built wheels"- echo "vnpy_needs_compilation=false" >> $GITHUB_OUTPUT- fi- id: vnpy_check-- - name: Summary- run: |- echo "## Test Results for ${{ matrix.arch }}" >> $GITHUB_STEP_SUMMARY- echo "" >> $GITHUB_STEP_SUMMARY- echo "- Python extraction: ✅ Success" >> $GITHUB_STEP_SUMMARY- echo "- llvmlite/numba: ${{ steps.wheel_check.outputs.needs_compilation == 'true' && '⚠️ Needs LLVM' || '✅ Pre-built' }}" >> $GITHUB_STEP_SUMMARY- echo "- vnpy: ${{ steps.vnpy_check.outputs.vnpy_needs_compilation == 'true' && '⚠️ Needs TA-Lib' || '✅ Pre-built' }}" >> $GITHUB_STEP_SUMMARY-- test-homebrew-installation:- name: Test Homebrew Dependencies- runs-on: macos-14-- steps:- - name: Verify Homebrew exists- run: |- echo "Checking Homebrew installation..."- brew --version- echo "✅ Homebrew is available"-- - name: Test LLVM installation via Homebrew- run: |- echo "Installing LLVM via Homebrew..."- brew install llvm@14-- echo "Checking LLVM installation..."- brew --prefix llvm@14-- LLVM_PATH=$(brew --prefix llvm@14)- echo "LLVM installed at: $LLVM_PATH"-- if [ -f "$LLVM_PATH/bin/llvm-config" ]; then- echo "✅ LLVM installation successful"- $LLVM_PATH/bin/llvm-config --version- else- echo "❌ LLVM installation failed"- exit 1- fi-- - name: Test TA-Lib installation via Homebrew- run: |- set -x # Enable debug mode- echo "Installing TA-Lib via Homebrew..."- brew install ta-lib-- echo "=== Homebrew Info ==="- brew info ta-lib- brew --prefix ta-lib-- TALIB_PATH=$(brew --prefix ta-lib)- echo "TALIB_PATH=$TALIB_PATH"-- echo "=== Directory Structure ==="- find "$TALIB_PATH" -type f -o -type d | head -50-- echo "=== Lib Directory Contents ==="- ls -laR "$TALIB_PATH/lib/" 2>&1 || echo "No lib directory found"-- echo "=== Include Directory Contents ==="- ls -laR "$TALIB_PATH/include/" 2>&1 || echo "No include directory found"-- echo "=== Searching for TA-Lib files ==="- find "$TALIB_PATH" -name "*ta_lib*" -o -name "*talib*" 2>&1 || echo "No TA-Lib files found"-- echo "=== Final Check ==="- if [ -d "$TALIB_PATH/lib" ]; then- echo "lib directory exists"- FILE_COUNT=$(ls "$TALIB_PATH/lib/" 2>/dev/null | wc -l)- echo "Files in lib: $FILE_COUNT"- if [ "$FILE_COUNT" -gt 0 ]; then- echo "✅ TA-Lib installation successful"- ls -la "$TALIB_PATH/lib/"- else- echo "❌ lib directory is empty"- exit 1- fi- else- echo "❌ lib directory does not exist"- exit 1- fi- set +x-- - name: Test package installation with Homebrew dependencies- run: |- echo "Testing package installation with Homebrew LLVM and TA-Lib..."-- LLVM_PATH=$(brew --prefix llvm@14)- TALIB_PATH=$(brew --prefix ta-lib)-- export LLVM_CONFIG="$LLVM_PATH/bin/llvm-config"- export TA_INCLUDE_PATH="$TALIB_PATH/include"- export TA_LIBRARY_PATH="$TALIB_PATH/lib"-- echo "Environment variables set:"- echo "LLVM_CONFIG=$LLVM_CONFIG"- echo "TA_INCLUDE_PATH=$TA_INCLUDE_PATH"- echo "TA_LIBRARY_PATH=$TA_LIBRARY_PATH"-- python3 -m pip install llvmlite==0.43.0 numba==0.60.0 --no-cache-dir- echo "✅ llvmlite and numba installed successfully"-- - name: Summary- run: |- echo "## Homebrew Installation Test Results" >> $GITHUB_STEP_SUMMARY- echo "" >> $GITHUB_STEP_SUMMARY- echo "- Homebrew: ✅ Available" >> $GITHUB_STEP_SUMMARY- echo "- LLVM@14: ✅ Installed" >> $GITHUB_STEP_SUMMARY- echo "- TA-Lib: ✅ Installed" >> $GITHUB_STEP_SUMMARY- echo "- Package compilation: ✅ Success" >> $GITHUB_STEP_SUMMARY-- test-precompiled-binaries:- name: Test Pre-compiled LLVM Binary- runs-on: macos-14-- steps:- - name: Test LLVM pre-compiled binary download- run: |- echo "Testing LLVM pre-compiled binary download..."- mkdir -p test-llvm-- LLVM_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-arm64-apple-darwin22.0.tar.xz"-- curl -L -o test-llvm/llvm.tar.xz "$LLVM_URL"-- echo "File downloaded, checking..."- ls -lh test-llvm/llvm.tar.xz- file test-llvm/llvm.tar.xz-- echo "Extracting..."- tar -xf test-llvm/llvm.tar.xz -C test-llvm --strip-components=1-- echo "Checking extracted files..."- if [ -f "test-llvm/bin/llvm-config" ]; then- echo "✅ LLVM pre-compiled binary extraction successful"- test-llvm/bin/llvm-config --version- else- echo "❌ LLVM extraction failed"- exit 1- fi-- - name: Test TA-Lib source compilation- run: |- set -x # Enable debug mode- echo "Testing TA-Lib source compilation..."- mkdir -p test-talib-- echo "=== Downloading TA-Lib source ==="- curl -L -o test-talib/ta-lib.tar.gz "https://downloads.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz"- ls -lh test-talib/ta-lib.tar.gz- file test-talib/ta-lib.tar.gz-- echo "=== Extracting source ==="- gunzip test-talib/ta-lib.tar.gz- tar -xf test-talib/ta-lib.tar -C test-talib --strip-components=1- ls -la test-talib/ | head -20-- cd test-talib-- echo "=== Configuring ==="- ./configure --prefix=$(pwd) 2>&1 | tail -30-- echo "=== Compiling ==="- make 2>&1 | tail -50-- echo "=== Installing ==="- make install 2>&1 | tail -50 || echo "Install completed with warnings"-- echo "=== Checking installation ==="- find . -name "libta_lib*" 2>&1-- if [ -d "lib" ]; then- echo "lib directory exists:"- ls -la lib/- if ls lib/libta_lib* >/dev/null 2>&1; then- echo "✅ TA-Lib compilation successful"- ls -la lib/libta_lib*- else- echo "❌ No TA-Lib library files found"- exit 1- fi- else- echo "❌ lib directory not created"- exit 1- fi- set +x-- - name: Summary- run: |- echo "## Pre-compiled Binary Test Results" >> $GITHUB_STEP_SUMMARY- echo "" >> $GITHUB_STEP_SUMMARY- echo "- LLVM binary download: ✅ Success" >> $GITHUB_STEP_SUMMARY- echo "- LLVM extraction: ✅ Success" >> $GITHUB_STEP_SUMMARY- echo "- TA-Lib source download: ✅ Success" >> $GITHUB_STEP_SUMMARY- echo "- TA-Lib compilation: ✅ Success" >> $GITHUB_STEP_SUMMARY-- recommendation:- name: Generate Recommendation- needs: [test-precompiled-wheels, test-homebrew-installation, test-precompiled-binaries]- runs-on: ubuntu-latest- if: always()-- steps:- - name: Final Recommendation- run: |- echo "# macOS Setup Test Summary" >> $GITHUB_STEP_SUMMARY- echo "" >> $GITHUB_STEP_SUMMARY- echo "## All Tests Completed" >> $GITHUB_STEP_SUMMARY- echo "" >> $GITHUB_STEP_SUMMARY- echo "### Recommendations:" >> $GITHUB_STEP_SUMMARY- echo "1. Check individual job results above" >> $GITHUB_STEP_SUMMARY- echo "2. If pre-compiled wheels available → Remove LLVM/TA-Lib code" >> $GITHUB_STEP_SUMMARY- echo "3. If compilation needed → Keep current implementation" >> $GITHUB_STEP_SUMMARY- echo "4. Homebrew approach works but requires admin password" >> $GITHUB_STEP_SUMMARY- echo "5. Pre-compiled binaries work without admin access" >> $GITHUB_STEP_SUMMARYdiff --git a/fincept-terminal-desktop/src-tauri/src/setup.rs b/fincept-terminal-desktop/src-tauri/src/setup.rsindex ec8611aad..df744704c 100644--- a/fincept-terminal-desktop/src-tauri/src/setup.rs+++ b/fincept-terminal-desktop/src-tauri/src/setup.rs@@ -230,9 +230,13 @@ async fn install_python(app: &AppHandle, install_dir: &PathBuf) -> Result<(), St} else {"x86_64-unknown-linux-gnu-install_only"};- let download_url = format!("https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.7+20240107-{}.tar.gz", platform);++ // Use python-build-standalone release 20240726 (same as macOS)+ let download_url = format!("https://github.com/astral-sh/python-build-standalone/releases/download/20240726/cpython-3.12.4+20240726-{}.tar.gz", platform);let tar_path = python_dir.join("python.tar.gz");+ emit_progress(app, "python", 40, "Downloading Python...", false);+let mut cmd = Command::new("curl");cmd.args(&["-L", "-o", tar_path.to_str().unwrap(), &download_url]);let output = cmd.output().map_err(|e| format!("Download failed: {}", e))?;@@ -240,6 +244,9 @@ async fn install_python(app: &AppHandle, install_dir: &PathBuf) -> Result<(), Streturn Err(format!("Download failed: {}", String::from_utf8_lossy(&output.stderr)));}+ eprintln!("[SETUP] Download complete, file size: {} bytes",+ std::fs::metadata(&tar_path).map(|m| m.len()).unwrap_or(0));+emit_progress(app, "python", 60, "Extracting Python...", false);let mut cmd = Command::new("tar");