docs: add exotic option API docs, stubs, and changelog entries #41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # PyQuantLib: Python bindings for QuantLib | |
| # Copyright (c) 2025 Yassine Idyiahia | |
| # | |
| # QuantLib is Copyright (c) 2000-2025 The QuantLib Authors | |
| # QuantLib is free software under a modified BSD license. | |
| # See http://quantlib.org/ for more information. | |
| # | |
| # Source: https://github.com/quantales/pyquantlib | |
| # Licensed under the BSD 3-Clause License. See LICENSE file for details. | |
| name: Windows build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "include/**" | |
| - "CMakeLists.txt" | |
| - "pyproject.toml" | |
| - ".github/workflows/windows.yml" | |
| pull_request: | |
| paths: | |
| - "src/**" | |
| - "include/**" | |
| - "CMakeLists.txt" | |
| - "pyproject.toml" | |
| - ".github/workflows/windows.yml" | |
| env: | |
| QUANTLIB_VERSION: "1.40" | |
| BOOST_VERSION: "1.86.0" | |
| BOOST_VERSION_UNDERSCORE: "1_86_0" | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Cache Boost headers | |
| id: cache-boost | |
| uses: actions/cache@v4 | |
| with: | |
| path: C:/boost | |
| key: boost-headers-${{ env.BOOST_VERSION }}-windows-v1 | |
| - name: Download Boost headers | |
| if: steps.cache-boost.outputs.cache-hit != 'true' | |
| run: | | |
| Write-Host "Downloading Boost $env:BOOST_VERSION headers..." | |
| $url = "https://archives.boost.io/release/$env:BOOST_VERSION/source/boost_$env:BOOST_VERSION_UNDERSCORE.zip" | |
| Invoke-WebRequest -Uri $url -OutFile boost.zip | |
| Write-Host "Extracting Boost headers..." | |
| Expand-Archive -Path boost.zip -DestinationPath C:/boost-temp | |
| mkdir C:/boost/include -Force | |
| Move-Item "C:/boost-temp/boost_$env:BOOST_VERSION_UNDERSCORE/boost" "C:/boost/include/boost" | |
| Remove-Item -Recurse -Force C:/boost-temp, boost.zip | |
| Write-Host "Boost headers installed to C:/boost/include" | |
| - name: Cache QuantLib | |
| id: cache-quantlib | |
| uses: actions/cache@v4 | |
| with: | |
| path: C:/quantlib-install | |
| key: quantlib-${{ env.QUANTLIB_VERSION }}-std-windows-v3 | |
| restore-keys: | | |
| quantlib-${{ env.QUANTLIB_VERSION }}-std-windows- | |
| - name: Build QuantLib from source | |
| if: steps.cache-quantlib.outputs.cache-hit != 'true' | |
| run: | | |
| Write-Host "Downloading QuantLib $env:QUANTLIB_VERSION..." | |
| Invoke-WebRequest -Uri "https://github.com/lballabio/QuantLib/releases/download/v$env:QUANTLIB_VERSION/QuantLib-$env:QUANTLIB_VERSION.tar.gz" -OutFile QuantLib.tar.gz | |
| tar xzf QuantLib.tar.gz | |
| cd "QuantLib-$env:QUANTLIB_VERSION" | |
| mkdir build -Force | Out-Null | |
| cd build | |
| Write-Host "Configuring QuantLib with std:: flags..." | |
| cmake .. -G "Visual Studio 17 2022" -A x64 ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| -DCMAKE_INSTALL_PREFIX=C:/quantlib-install ` | |
| -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL ` | |
| -DQL_USE_STD_SHARED_PTR=ON ` | |
| -DQL_USE_STD_OPTIONAL=ON ` | |
| -DQL_USE_STD_ANY=ON ` | |
| -DQL_BUILD_EXAMPLES=OFF ` | |
| -DQL_BUILD_TEST_SUITE=OFF ` | |
| -DQL_BUILD_BENCHMARK=OFF ` | |
| -DBoost_INCLUDE_DIR=C:/boost/include | |
| Write-Host "Building QuantLib..." | |
| cmake --build . --config Release --parallel | |
| Write-Host "Installing QuantLib..." | |
| cmake --install . --config Release | |
| - name: Verify QuantLib configuration | |
| run: | | |
| Write-Host "Checking QuantLib config.hpp for std:: flags..." | |
| Get-Content "C:\quantlib-install\include\ql\config.hpp" | Select-String -Pattern "QL_USE_STD" | |
| - name: Install Python build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| - name: Build package with dev dependencies | |
| run: | | |
| pip install -e .[dev] -v | |
| env: | |
| QuantLib_ROOT: C:/quantlib-install | |
| Boost_INCLUDE_DIR: C:/boost/include | |
| - name: Run tests | |
| run: | | |
| pytest -v |