diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f39fbc0c..42dba85a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ on: description: Enables GDB and Amalgam Fast Memory Integrity checks for all Linux/x86 Pytest jobs. type: boolean required: false - default: false + default: false workflow_call: inputs: build-type: @@ -42,7 +42,6 @@ defaults: shell: bash jobs: - metadata: uses: howsoai/.github/.github/workflows/set-metadata.yml@main secrets: inherit @@ -58,86 +57,85 @@ jobs: permissions: contents: write steps: - - - uses: actions/checkout@v4 - - - name: Download howso-engine - env: - GH_TOKEN: ${{ github.token }} - run: | - run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_id') - run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_type') - gh $run_type download -D howso/howso-engine/tmp -R "howsoai/howso-engine" -p "howso-engine-*" "$run_id" - # Needed because release/non-release downloads are different structure - cd howso/howso-engine/tmp && if [ ! -f *.tar.gz ]; then mv */*.tar.gz ./; fi && tar -xvzf *.tar.gz - - - name: Configure files - run: | - cd howso/howso-engine - mkdir -p migrations - mkdir -p trainee - mv tmp/howso.caml howso.caml - mv tmp/migrations/migrations.caml migrations/migrations.caml - mv tmp/version.json version.json - rm -rf tmp - - - name: Set workflow run info - run: | - cd howso/howso-engine - run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_id') - run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_type') - build_title=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".build_title') - build_date=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".build_date') - head_sha=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".head_sha') - url=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".url') - # Set the display title and build date info in version.json - if [[ -n 'build_title' ]]; then - jq --arg build_title "$build_title" '. |= . + {"display_title": $build_title}' version.json > temp.json && mv temp.json version.json - jq --arg build_date "$build_date" '. |= . + {"build_date": $build_date}' version.json > temp.json && mv temp.json version.json - fi - jq --arg head_sha "$head_sha" '. |= . + {"sha": $head_sha}' version.json > temp.json && mv temp.json version.json - jq --arg url "$url" '. |= . + {"url": $url}' version.json > temp.json && mv temp.json version.json - cat version.json - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Install pypa/build - run: >- - python3 -m - pip install - build - --user - - - name: Build a binary wheel and a source tarball - run: >- - python3 -m - build - --sdist - --wheel - --outdir dist/ - . - env: - SETUPTOOLS_SCM_PRETEND_VERSION: ${{ needs.metadata.outputs.version }} - - - name: Upload Tarball Artifact - uses: actions/upload-artifact@v4 - with: - name: howso_engine-${{ needs.metadata.outputs.version }} - path: dist/howso_engine-${{ needs.metadata.outputs.version }}.tar.gz - if-no-files-found: error - - - name: Upload Wheel Artifact - uses: actions/upload-artifact@v4 - with: - name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any - path: dist/howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any.whl - if-no-files-found: error + - uses: actions/checkout@v4 + + - name: Download howso-engine + env: + GH_TOKEN: ${{ github.token }} + run: | + run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_id') + run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_type') + gh $run_type download -D howso/howso-engine/tmp -R "howsoai/howso-engine" -p "howso-engine-*" "$run_id" + # Needed because release/non-release downloads are different structure + cd howso/howso-engine/tmp && if [ ! -f *.tar.gz ]; then mv */*.tar.gz ./; fi && tar -xvzf *.tar.gz + + - name: Configure files + run: | + cd howso/howso-engine + mkdir -p migrations + mkdir -p trainee + mv tmp/howso.caml howso.caml + mv tmp/migrations/migrations.caml migrations/migrations.caml + mv tmp/version.json version.json + rm -rf tmp + + - name: Set workflow run info + run: | + cd howso/howso-engine + run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_id') + run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_type') + build_title=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".build_title') + build_date=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".build_date') + head_sha=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".head_sha') + url=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".url') + # Set the display title and build date info in version.json + if [[ -n 'build_title' ]]; then + jq --arg build_title "$build_title" '. |= . + {"display_title": $build_title}' version.json > temp.json && mv temp.json version.json + jq --arg build_date "$build_date" '. |= . + {"build_date": $build_date}' version.json > temp.json && mv temp.json version.json + fi + jq --arg head_sha "$head_sha" '. |= . + {"sha": $head_sha}' version.json > temp.json && mv temp.json version.json + jq --arg url "$url" '. |= . + {"url": $url}' version.json > temp.json && mv temp.json version.json + cat version.json + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + run: >- + python3 -m + build + --sdist + --wheel + --outdir dist/ + . + env: + SETUPTOOLS_SCM_PRETEND_VERSION: ${{ needs.metadata.outputs.version }} + + - name: Upload Tarball Artifact + uses: actions/upload-artifact@v4 + with: + name: howso_engine-${{ needs.metadata.outputs.version }} + path: dist/howso_engine-${{ needs.metadata.outputs.version }}.tar.gz + if-no-files-found: error + + - name: Upload Wheel Artifact + uses: actions/upload-artifact@v4 + with: + name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any + path: dist/howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any.whl + if-no-files-found: error workflow-summary: - needs: ['metadata', 'build'] + needs: ["metadata", "build"] uses: "howsoai/.github/.github/workflows/workflow-summary.yml@main" secrets: inherit with: @@ -145,491 +143,493 @@ jobs: validate-amlg-versions: true pytest-linux-3-9-st: - needs: ['metadata', 'build'] + needs: ["metadata", "build"] uses: howsoai/.github/.github/workflows/pytest.yml@main secrets: inherit with: - platform: 'ubuntu-latest' - platform-pretty: 'Linux' - amalgam-plat-arch: 'linux-amd64' - python-version: '3.9' - config-fp: './config/latest-st-traces-howso.yml' - config-pretty: 'ST' - workers: 'auto' + platform: "ubuntu-latest" + platform-pretty: "Linux" + amalgam-plat-arch: "linux-amd64" + python-version: "3.9" + config-fp: "./config/latest-st-traces-howso.yml" + config-pretty: "ST" + workers: "auto" upstream-details: ${{ needs.metadata.outputs.upstream-details }} debug: ${{ inputs.debug-mode }} + # enable-pyright: true + enable-ruff: true pytest-linux-3-12-mt: - needs: ['metadata', 'build'] + needs: ["metadata", "build"] uses: howsoai/.github/.github/workflows/pytest.yml@main secrets: inherit with: - platform: 'ubuntu-latest' - platform-pretty: 'Linux' - amalgam-plat-arch: 'linux-amd64' - python-version: '3.12' - config-fp: './config/latest-mt-traces-howso.yml' - config-pretty: 'MT' + platform: "ubuntu-latest" + platform-pretty: "Linux" + amalgam-plat-arch: "linux-amd64" + python-version: "3.12" + config-fp: "./config/latest-mt-traces-howso.yml" + config-pretty: "MT" upstream-details: ${{ needs.metadata.outputs.upstream-details }} debug: ${{ inputs.debug-mode }} + # enable-pyright: true + enable-ruff: true pytest-windows-3-11-mt: - needs: ['metadata', 'build'] + needs: ["metadata", "build"] uses: howsoai/.github/.github/workflows/pytest.yml@main secrets: inherit with: - platform: 'windows-latest' - platform-pretty: 'Windows' - amalgam-plat-arch: 'windows-amd64' - python-version: '3.11' - config-fp: './config/latest-mt-traces-howso.yml' - config-pretty: 'MT' + platform: "windows-latest" + platform-pretty: "Windows" + amalgam-plat-arch: "windows-amd64" + python-version: "3.11" + config-fp: "./config/latest-mt-traces-howso.yml" + config-pretty: "MT" upstream-details: ${{ needs.metadata.outputs.upstream-details }} debug: ${{ inputs.debug-mode }} + # enable-pyright: true + enable-ruff: true pytest-macos-3-13-mt-arm64: - needs: ['metadata', 'build'] + needs: ["metadata", "build"] uses: howsoai/.github/.github/workflows/pytest.yml@main secrets: inherit with: - platform: 'macos-latest' - platform-pretty: 'MacOS' - amalgam-plat-arch: 'darwin-arm64' - python-version: '3.13' - config-fp: './config/latest-mt-traces-howso.yml' - config-pretty: 'MT' + platform: "macos-latest" + platform-pretty: "MacOS" + amalgam-plat-arch: "darwin-arm64" + python-version: "3.13" + config-fp: "./config/latest-mt-traces-howso.yml" + config-pretty: "MT" upstream-details: ${{ needs.metadata.outputs.upstream-details }} debug: ${{ inputs.debug-mode }} + # enable-pyright: true + enable-ruff: true pytest-macos-3-10-mt-amd64: - needs: ['metadata', 'build'] + needs: ["metadata", "build"] uses: howsoai/.github/.github/workflows/pytest.yml@main secrets: inherit with: - platform: 'macos-latest-large' - platform-pretty: 'MacOS' - amalgam-plat-arch: 'darwin-amd64' - python-version: '3.10' - config-fp: './config/latest-mt-noavx-traces-howso.yml' - config-pretty: 'MT' + platform: "macos-latest-large" + platform-pretty: "MacOS" + amalgam-plat-arch: "darwin-amd64" + python-version: "3.10" + config-fp: "./config/latest-mt-noavx-traces-howso.yml" + config-pretty: "MT" upstream-details: ${{ needs.metadata.outputs.upstream-details }} debug: ${{ inputs.debug-mode }} + # enable-pyright: true + enable-ruff: true install-verification-linux-amd64: - needs: ['metadata', 'build'] + needs: ["metadata", "build"] runs-on: ubuntu-latest steps: - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any - - - name: Download amalgam-lang-py - if: inputs.amalgam-lang-py-build != '' - env: - GH_TOKEN: ${{ github.token }} - run: | - run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') - run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') - gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" - # Needed because release/non-release downloads are different structure - cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Verify Howso install - run: | - echo "Installing Howso Engine..." - pip install howso_engine-*-py3-none-any.whl - if [ -d "tmp" ]; then - echo "Found custom amalgam-lang version; installing..." - pip uninstall amalgam-lang -y - pip install tmp/*.whl - fi - - echo "Running Howso verification..." - verify_howso_install - - - name: Display stacktrace files - if: always() - run: | - cat howso_stacktrace.txt || true + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any + + - name: Download amalgam-lang-py + if: inputs.amalgam-lang-py-build != '' + env: + GH_TOKEN: ${{ github.token }} + run: | + run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') + run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') + gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" + # Needed because release/non-release downloads are different structure + cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Verify Howso install + run: | + echo "Installing Howso Engine..." + pip install howso_engine-*-py3-none-any.whl + if [ -d "tmp" ]; then + echo "Found custom amalgam-lang version; installing..." + pip uninstall amalgam-lang -y + pip install tmp/*.whl + fi + + echo "Running Howso verification..." + verify_howso_install + + - name: Display stacktrace files + if: always() + run: | + cat howso_stacktrace.txt || true install-verification-linux-arm64: if: inputs.build-type != 'PR' - needs: ['metadata', 'build'] + needs: ["metadata", "build"] runs-on: ubuntu-24.04-arm steps: - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any - - - name: Download amalgam-lang-py - if: inputs.amalgam-lang-py-build != '' - env: - GH_TOKEN: ${{ github.token }} - run: | - run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') - run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') - gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" - # Needed because release/non-release downloads are different structure - cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi - - - name: Verify Howso install - run: | - set -e - - # Install python: - sudo apt-get install --no-install-recommends -y python3 python3-pip python-is-python3 - python --version - - echo "Installing Howso Engine..." - # This environment is considered "externally managed," so use --break-system-packages to bypass - # (safe in this use case) - pip install howso_engine-*-py3-none-any.whl --break-system-packages - if [ -d "tmp" ]; then - echo "Found custom amalgam-lang version; installing..." - pip uninstall amalgam-lang -y --break-system-packages - pip install tmp/*.whl --break-system-packages - fi - - echo "Running Howso verification..." - verify_howso_install - - - name: Display stacktrace files - if: always() - run: | - cat howso_stacktrace.txt || true + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any + + - name: Download amalgam-lang-py + if: inputs.amalgam-lang-py-build != '' + env: + GH_TOKEN: ${{ github.token }} + run: | + run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') + run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') + gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" + # Needed because release/non-release downloads are different structure + cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi + + - name: Verify Howso install + run: | + set -e + + # Install python: + sudo apt-get install --no-install-recommends -y python3 python3-pip python-is-python3 + python --version + + echo "Installing Howso Engine..." + # This environment is considered "externally managed," so use --break-system-packages to bypass + # (safe in this use case) + pip install howso_engine-*-py3-none-any.whl --break-system-packages + if [ -d "tmp" ]; then + echo "Found custom amalgam-lang version; installing..." + pip uninstall amalgam-lang -y --break-system-packages + pip install tmp/*.whl --break-system-packages + fi + + echo "Running Howso verification..." + verify_howso_install + + - name: Display stacktrace files + if: always() + run: | + cat howso_stacktrace.txt || true install-verification-linux-arm64_8a: if: inputs.build-type != 'PR' - needs: ['metadata', 'build'] + needs: ["metadata", "build"] runs-on: ubuntu-24.04-arm steps: - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any - - - name: Download amalgam-lang-py - if: inputs.amalgam-lang-py-build != '' - env: - GH_TOKEN: ${{ github.token }} - run: | - run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') - run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') - gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" - # Needed because release/non-release downloads are different structure - cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi - - - name: Verify Howso install - run: | - set -e - - # Install python: - sudo apt-get install --no-install-recommends -y python3 python3-pip python-is-python3 - python --version - - echo "Installing Howso Engine..." - # This environment is considered "externally managed," so use --break-system-packages to bypass - # (safe in this use case) - pip install howso_engine-*-py3-none-any.whl --break-system-packages - if [ -d "tmp" ]; then - echo "Found custom amalgam-lang version; installing..." - pip uninstall amalgam-lang -y --break-system-packages - pip install tmp/*.whl --break-system-packages - fi - - # Set local config to use single threaded because arm64_8a doesn't support multi-threading and set - # arm64_8a arch since that is not auto selected by the package currently: - echo " - howso: - client: howso.direct.HowsoDirectClient - client_extra_params: - amalgam: - arch: arm64_8a - library_postfix: -st - " > howso.yml - - echo "Running Howso verification..." - verify_howso_install - - - name: Display stacktrace files - if: always() - run: | - cat howso_stacktrace.txt || true + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any + + - name: Download amalgam-lang-py + if: inputs.amalgam-lang-py-build != '' + env: + GH_TOKEN: ${{ github.token }} + run: | + run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') + run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') + gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" + # Needed because release/non-release downloads are different structure + cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi + + - name: Verify Howso install + run: | + set -e + + # Install python: + sudo apt-get install --no-install-recommends -y python3 python3-pip python-is-python3 + python --version + + echo "Installing Howso Engine..." + # This environment is considered "externally managed," so use --break-system-packages to bypass + # (safe in this use case) + pip install howso_engine-*-py3-none-any.whl --break-system-packages + if [ -d "tmp" ]; then + echo "Found custom amalgam-lang version; installing..." + pip uninstall amalgam-lang -y --break-system-packages + pip install tmp/*.whl --break-system-packages + fi + + # Set local config to use single threaded because arm64_8a doesn't support multi-threading and set + # arm64_8a arch since that is not auto selected by the package currently: + echo " + howso: + client: howso.direct.HowsoDirectClient + client_extra_params: + amalgam: + arch: arm64_8a + library_postfix: -st + " > howso.yml + + echo "Running Howso verification..." + verify_howso_install + + - name: Display stacktrace files + if: always() + run: | + cat howso_stacktrace.txt || true install-verification-windows-bash-amd64: if: inputs.build-type != 'PR' - needs: ['metadata', 'build'] + needs: ["metadata", "build"] runs-on: windows-latest steps: - - - uses: actions/checkout@v4 - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any - - - name: Download amalgam-lang-py - if: inputs.amalgam-lang-py-build != '' - env: - GH_TOKEN: ${{ github.token }} - run: | - run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') - run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') - gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" - # Needed because release/non-release downloads are different structure - cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Download tz data - shell: pwsh - run: | - ./config/powershell/Download-Tzdata.ps1 - - - name: Remove Pip cache - shell: bash - run: rm -rf ~/AppData/Local/pip/cache - - - name: Verify Howso install - run: | - echo "Installing Howso Engine..." - pip install howso_engine-*-py3-none-any.whl - if [ -d "tmp" ]; then - echo "Found custom amalgam-lang version; installing..." - pip uninstall amalgam-lang -y - pip install tmp/*.whl - fi - - echo "Running Howso verification..." - PYTHONUTF8=1 verify_howso_install - - - name: Display stacktrace files - if: always() - run: | - cat howso_stacktrace.txt || true + - uses: actions/checkout@v4 + + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any + + - name: Download amalgam-lang-py + if: inputs.amalgam-lang-py-build != '' + env: + GH_TOKEN: ${{ github.token }} + run: | + run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') + run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') + gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" + # Needed because release/non-release downloads are different structure + cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Download tz data + shell: pwsh + run: | + ./config/powershell/Download-Tzdata.ps1 + + - name: Remove Pip cache + shell: bash + run: rm -rf ~/AppData/Local/pip/cache + + - name: Verify Howso install + run: | + echo "Installing Howso Engine..." + pip install howso_engine-*-py3-none-any.whl + if [ -d "tmp" ]; then + echo "Found custom amalgam-lang version; installing..." + pip uninstall amalgam-lang -y + pip install tmp/*.whl + fi + + echo "Running Howso verification..." + PYTHONUTF8=1 verify_howso_install + + - name: Display stacktrace files + if: always() + run: | + cat howso_stacktrace.txt || true install-verification-windows-cmd-amd64: - needs: ['metadata', 'build'] + needs: ["metadata", "build"] runs-on: windows-latest steps: - - - uses: actions/checkout@v4 - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any - - - name: Download amalgam-lang-py - if: inputs.amalgam-lang-py-build != '' - env: - GH_TOKEN: ${{ github.token }} - run: | - run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') - run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') - gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" - # Needed because release/non-release downloads are different structure - cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Download tz data - shell: pwsh - run: | - ./config/powershell/Download-Tzdata.ps1 - - - name: Remove Pip cache - shell: bash - run: rm -rf ~/AppData/Local/pip/cache - - - name: Verify Howso install - shell: cmd - run: | - @echo off - setlocal enabledelayedexpansion - echo Installing Howso Engine... - REM Globs don't work in cmd with pip - pip install howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any.whl - if exist "tmp" ( - echo Found custom amalgam-lang version, installing... - pip uninstall amalgam-lang -y - for %%i in (tmp\amalgam*.whl) do (set whlFile=%%~nxi) - pip install tmp/!whlFile! - ) - - echo Running Howso verification... - set PYTHONUTF8=1 - verify_howso_install - - - name: Display stacktrace files - if: always() - run: | - cat howso_stacktrace.txt || true + - uses: actions/checkout@v4 + + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any + + - name: Download amalgam-lang-py + if: inputs.amalgam-lang-py-build != '' + env: + GH_TOKEN: ${{ github.token }} + run: | + run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') + run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') + gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" + # Needed because release/non-release downloads are different structure + cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Download tz data + shell: pwsh + run: | + ./config/powershell/Download-Tzdata.ps1 + + - name: Remove Pip cache + shell: bash + run: rm -rf ~/AppData/Local/pip/cache + + - name: Verify Howso install + shell: cmd + run: | + @echo off + setlocal enabledelayedexpansion + echo Installing Howso Engine... + REM Globs don't work in cmd with pip + pip install howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any.whl + if exist "tmp" ( + echo Found custom amalgam-lang version, installing... + pip uninstall amalgam-lang -y + for %%i in (tmp\amalgam*.whl) do (set whlFile=%%~nxi) + pip install tmp/!whlFile! + ) + + echo Running Howso verification... + set PYTHONUTF8=1 + verify_howso_install + + - name: Display stacktrace files + if: always() + run: | + cat howso_stacktrace.txt || true install-verification-windows-pwsh-amd64: if: inputs.build-type != 'PR' - needs: ['metadata', 'build'] + needs: ["metadata", "build"] runs-on: windows-latest steps: - - - uses: actions/checkout@v4 - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any - - - name: Download amalgam-lang-py - if: inputs.amalgam-lang-py-build != '' - env: - GH_TOKEN: ${{ github.token }} - run: | - run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') - run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') - gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" - # Needed because release/non-release downloads are different structure - cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Download tz data - shell: pwsh - run: | - ./config/powershell/Download-Tzdata.ps1 - - - name: Remove Pip cache - shell: bash - run: rm -rf ~/AppData/Local/pip/cache - - - name: Verify Howso install - shell: pwsh - run: | - Write-Host "Installing Howso Engine..." - # Globs don't work in pwsh with pip - pip install howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any.whl - if (Test-Path -Path "tmp" -PathType Container) { - Write-Host "Found custom amalgam-lang version; installing.." - pip uninstall amalgam-lang -y - $whlFile = Get-ChildItem -Path ".\tmp\" -Filter *.whl - pip install $whlFile - } - - Write-Host "Running Howso verification..." - $env:PYTHONUTF8=1 - verify_howso_install - - - name: Display stacktrace files - if: always() - run: | - cat howso_stacktrace.txt || true + - uses: actions/checkout@v4 + + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any + + - name: Download amalgam-lang-py + if: inputs.amalgam-lang-py-build != '' + env: + GH_TOKEN: ${{ github.token }} + run: | + run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') + run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') + gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" + # Needed because release/non-release downloads are different structure + cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Download tz data + shell: pwsh + run: | + ./config/powershell/Download-Tzdata.ps1 + + - name: Remove Pip cache + shell: bash + run: rm -rf ~/AppData/Local/pip/cache + + - name: Verify Howso install + shell: pwsh + run: | + Write-Host "Installing Howso Engine..." + # Globs don't work in pwsh with pip + pip install howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any.whl + if (Test-Path -Path "tmp" -PathType Container) { + Write-Host "Found custom amalgam-lang version; installing.." + pip uninstall amalgam-lang -y + $whlFile = Get-ChildItem -Path ".\tmp\" -Filter *.whl + pip install $whlFile + } + + Write-Host "Running Howso verification..." + $env:PYTHONUTF8=1 + verify_howso_install + + - name: Display stacktrace files + if: always() + run: | + cat howso_stacktrace.txt || true install-verification-macos-amd64: - needs: ['metadata', 'build'] + needs: ["metadata", "build"] runs-on: macos-latest-large steps: - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any - - - name: Download amalgam-lang-py - if: inputs.amalgam-lang-py-build != '' - env: - GH_TOKEN: ${{ github.token }} - run: | - run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') - run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') - gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" - # Needed because release/non-release downloads are different structure - cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Verify Howso install - run: | - echo "Installing Howso Engine..." - pip install howso_engine-*-py3-none-any.whl - if [ -d "tmp" ]; then - echo "Found custom amalgam-lang version; installing..." - pip uninstall amalgam-lang -y - pip install tmp/*.whl - fi - - echo "Running Howso verification..." - verify_howso_install - - - name: Display stacktrace files - if: always() - run: | - cat howso_stacktrace.txt || true + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any + + - name: Download amalgam-lang-py + if: inputs.amalgam-lang-py-build != '' + env: + GH_TOKEN: ${{ github.token }} + run: | + run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') + run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') + gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" + # Needed because release/non-release downloads are different structure + cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Verify Howso install + run: | + echo "Installing Howso Engine..." + pip install howso_engine-*-py3-none-any.whl + if [ -d "tmp" ]; then + echo "Found custom amalgam-lang version; installing..." + pip uninstall amalgam-lang -y + pip install tmp/*.whl + fi + + echo "Running Howso verification..." + verify_howso_install + + - name: Display stacktrace files + if: always() + run: | + cat howso_stacktrace.txt || true install-verification-macos-arm64: - needs: ['metadata', 'build'] + needs: ["metadata", "build"] runs-on: macos-latest-xlarge steps: - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any - - - name: Download amalgam-lang-py - if: inputs.amalgam-lang-py-build != '' - env: - GH_TOKEN: ${{ github.token }} - run: | - run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') - run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') - gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" - # Needed because release/non-release downloads are different structure - cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Verify Howso install - run: | - echo "Installing Howso Engine..." - pip install howso_engine-*-py3-none-any.whl - if [ -d "tmp" ]; then - echo "Found custom amalgam-lang version; installing..." - pip uninstall amalgam-lang -y - pip install tmp/*.whl - fi - - echo "Running Howso verification..." - verify_howso_install - - - name: Display stacktrace files - if: always() - run: | - cat howso_stacktrace.txt || true + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any + + - name: Download amalgam-lang-py + if: inputs.amalgam-lang-py-build != '' + env: + GH_TOKEN: ${{ github.token }} + run: | + run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') + run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') + gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" + # Needed because release/non-release downloads are different structure + cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Verify Howso install + run: | + echo "Installing Howso Engine..." + pip install howso_engine-*-py3-none-any.whl + if [ -d "tmp" ]; then + echo "Found custom amalgam-lang version; installing..." + pip uninstall amalgam-lang -y + pip install tmp/*.whl + fi + + echo "Running Howso verification..." + verify_howso_install + + - name: Display stacktrace files + if: always() + run: | + cat howso_stacktrace.txt || true generate-changelog: if: inputs.build-type == 'release' @@ -664,41 +664,40 @@ jobs: - install-verification-macos-arm64 runs-on: ubuntu-latest steps: - - - name: Download Artifacts - uses: actions/download-artifact@v4 - with: - path: ./tmp - - - name: Create Release - uses: ncipollo/release-action@v1 - with: - tag: ${{ needs.metadata.outputs.version }} - commit: ${{ github.sha }} - name: ${{ github.event.repository.name }} ${{ needs.metadata.outputs.version }} - artifactErrorsFailBuild: true - body: ${{ needs.generate-changelog.outputs.changelog }} - makeLatest: legacy - artifacts: "./tmp/howso_engine-*/howso_engine-*.tar.gz,./tmp/howso_engine-*/howso_engine-*.whl" - artifactContentType: application/gzip - - - name: Clean up dir - run: | + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + path: ./tmp + + - name: Create Release + uses: ncipollo/release-action@v1 + with: + tag: ${{ needs.metadata.outputs.version }} + commit: ${{ github.sha }} + name: ${{ github.event.repository.name }} ${{ needs.metadata.outputs.version }} + artifactErrorsFailBuild: true + body: ${{ needs.generate-changelog.outputs.changelog }} + makeLatest: legacy + artifacts: "./tmp/howso_engine-*/howso_engine-*.tar.gz,./tmp/howso_engine-*/howso_engine-*.whl" + artifactContentType: application/gzip + + - name: Clean up dir + run: | mkdir -p dist find ./tmp -type f -name '*.whl' -exec cp -t ./dist {} + find ./tmp -type f -name '*.tar.gz' -exec cp -t ./dist {} + ls ./dist - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.11" + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" - - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - # Experimental feature not yet compatible with our workflow - attestations: False + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + # Experimental feature not yet compatible with our workflow + attestations: False init-devcontainers-release: if: inputs.build-type == 'release' diff --git a/.gitignore b/.gitignore index 2996c813..a95cc602 100644 --- a/.gitignore +++ b/.gitignore @@ -138,7 +138,13 @@ report.html howso/examples/output.csv # IDE files -.vscode +# VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets # Cache files .howso_recent_cache* diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..4dee7f7a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,22 @@ +{ + "cSpell.words": [ + "autouse", + "caml", + "camls", + "dateutil", + "finfo", + "howsoai", + "iinfo", + "isinstance", + "isoparse", + "issubdtype", + "itemsize", + "jsonifiable", + "pyright", + "pytest", + "setosa", + "SMAPE", + "subdtype", + "targetless" + ] +} diff --git a/howso/client/tests/test_client.py b/howso/client/tests/test_client.py index 4e08283e..5ee8bed9 100644 --- a/howso/client/tests/test_client.py +++ b/howso/client/tests/test_client.py @@ -460,7 +460,7 @@ def test_copy(self, trainee, trainee_builder): copy_features = self.client.get_feature_attributes(new_trainee.id) assert orig_features == copy_features - def test_trainee_conviction(self, trainee, trainee_builder): + def test_trainee_conviction(self, trainee): """ Test the /copy/{trainee_id} endpoint. diff --git a/howso/direct/client.py b/howso/direct/client.py index 6dabd9fc..1da51b93 100644 --- a/howso/direct/client.py +++ b/howso/direct/client.py @@ -138,7 +138,7 @@ def __init__( train_initial_batch_size: int = 100, verbose: bool = False, version_check: bool = True, - **kwargs + **kwargs # noqa ARG002 ): global _VERSION_CHECKED @@ -378,10 +378,10 @@ def _deserialize(self, label: str, payload: str | bytes | None) -> t.Any: return data except HowsoError: raise - except Exception: # noqa: Deliberately broad + except Exception: # Deliberately broad raise HowsoError('Failed to deserialize the Howso Engine response.') - def _resolve_trainee(self, trainee_id: str, **kwargs) -> DirectTrainee: + def _resolve_trainee(self, trainee_id: str, **kwargs) -> DirectTrainee: # noqa ARG002 """ Resolve a Trainee and acquire its resources. @@ -538,7 +538,7 @@ def _get_trainee_from_engine(self, trainee_id: str) -> DirectTrainee: file_size=file_size ) - def _get_trainee_thread_count(self, trainee_id: str) -> int: + def _get_trainee_thread_count(self, trainee_id: str) -> int: # noqa ARG002 """ Get the number of available cpu threads a Trainee has access to. @@ -612,7 +612,7 @@ def _trainee_size(self, filename: str) -> int | None: return None return path.stat().st_size - def execute(self, trainee_id: str, label: str, payload: t.Any, **kwargs) -> t.Any: + def execute(self, trainee_id: str, label: str, payload: t.Any, **kwargs) -> t.Any: # noqa ARG002 """ Execute a label in Howso engine. @@ -638,7 +638,7 @@ def execute(self, trainee_id: str, label: str, payload: t.Any, **kwargs) -> t.An raise HowsoError('Invalid payload - please check for infinity or NaN values') from err return self._deserialize(label, result) - def execute_sized(self, trainee_id: str, label: str, payload: t.Any, **kwargs) -> tuple[t.Any, int, int]: + def execute_sized(self, trainee_id: str, label: str, payload: t.Any, **kwargs) -> tuple[t.Any, int, int]: # noqa ARG002 """ Execute a label in Howso engine and return the request and response sizes. @@ -668,7 +668,7 @@ def execute_sized(self, trainee_id: str, label: str, payload: t.Any, **kwargs) - raise HowsoError('Invalid payload - please check for infinity or NaN values') from err return self._deserialize(label, result), len(json_payload), len(result) - def is_tracing_enabled(self, trainee_id: str) -> bool: + def is_tracing_enabled(self, trainee_id: str) -> bool: # noqa ARG002 """ Get if tracing is enabled for Trainee. @@ -747,7 +747,7 @@ def check_name_valid_for_save( ): return False, 'Cannot write to this path' - except Exception as e: # noqa: Deliberately broad + except Exception as e: # Deliberately broad return False, f'Exception {e} while checking file' else: return True, 'OK' @@ -759,13 +759,13 @@ def create_trainee( # noqa: C901 *, id: t.Optional[str | uuid.UUID] = None, library_type: t.Optional[LibraryType] = None, - max_wait_time: t.Optional[int | float] = None, + max_wait_time: t.Optional[int | float] = None, # noqa ARG002 metadata: t.Optional[MutableMapping[str, t.Any]] = None, overwrite_trainee: bool = False, persistence: Persistence = "allow", - project: t.Optional[str | Project] = None, + project: t.Optional[str | Project] = None, # noqa ARG002 resources: t.Optional[Mapping[str, t.Any]] = None, - runtime: t.Optional[TraineeRuntimeOptions] = None, + runtime: t.Optional[TraineeRuntimeOptions] = None, # noqa ARG002 ) -> Trainee: """ Create a Trainee on the Howso service. @@ -856,7 +856,7 @@ def create_trainee( # noqa: C901 self.configuration.verbose, f'Deleting existing Trainee "{trainee_id}" before creating.') self.amlg.destroy_entity(trainee_id) - except Exception: # noqa: Deliberately broad + except Exception: # Deliberately broad util.dprint( self.configuration.verbose, f'Unable to delete Trainee "{trainee_id}". Continuing.') @@ -1246,7 +1246,7 @@ def copy_trainee( *, library_type: t.Optional[LibraryType] = None, resources: t.Optional[Mapping[str, t.Any]] = None, - runtime: t.Optional[TraineeRuntimeOptions] = None + runtime: t.Optional[TraineeRuntimeOptions] = None # noqa ARG002 ) -> Trainee: """ Copies a trainee to a new trainee id in the Howso service. @@ -1349,7 +1349,7 @@ def acquire_trainee_resources( self, trainee_id: str, *, - max_wait_time: t.Optional[int | float] = None + max_wait_time: t.Optional[int | float] = None # noqa ARG002 ): """ Acquire resources for a trainee in the Howso service. @@ -1511,7 +1511,7 @@ def query_sessions( search_terms: t.Optional[str] = None, *, trainee: t.Optional[str | Trainee] = None, - **kwargs + **kwargs # noqa ARG002 ) -> list[Session]: """ Return a list of all accessible sessions. diff --git a/howso/engine/tests/test_engine.py b/howso/engine/tests/test_engine.py index b49fe7d2..9180ed5e 100644 --- a/howso/engine/tests/test_engine.py +++ b/howso/engine/tests/test_engine.py @@ -54,7 +54,7 @@ def test_pairwise_distances(self, trainee, from_values, to_values, expected): ([11, 41, 102], [[0, 0, 0], [0, 0, 0], [0, 0, 0]]), ], ) - def test_distances_same(self, trainee, features, case_indices, expected): + def test_distances_same(self, trainee, case_indices, expected): """ Test that get_distances returns values as expected. @@ -80,7 +80,7 @@ def test_distances_same(self, trainee, features, case_indices, expected): ([2, 3, 4], [[0, 0, 0], [0, 0, 0], [0, 0, 0]]), ], ) - def test_distances_different(self, trainee, features, case_indices, unexpected): + def test_distances_different(self, trainee, case_indices, unexpected): """ Test that get_distances returns values as expected. @@ -224,7 +224,7 @@ def test_load_status_message(self, mocker, monkeypatch, status_msg, expected_msg """Test load_trainee raises status message from Amalgam.""" file_path = Path(Path.cwd(), "test_load.caml") - monkeypatch.setattr(Path, "exists", lambda *args: True) + monkeypatch.setattr(Path, "exists", lambda *args: True) # noqa ARG005 mocker.patch( "amalgam.api.Amalgam.load_entity", return_value=SimpleNamespace(loaded=False, message=status_msg, version="") diff --git a/howso/engine/trainee.py b/howso/engine/trainee.py index 14f94b7a..8ab0425d 100644 --- a/howso/engine/trainee.py +++ b/howso/engine/trainee.py @@ -772,7 +772,7 @@ def set_auto_ablation_params( relative_prediction_threshold_map: t.Optional[Mapping[str, float]] = None, residual_prediction_features: t.Optional[Collection[str]] = None, tolerance_prediction_threshold_map: t.Optional[Mapping[str, tuple[float, float]]] = None, - **kwargs + **kwargs # noqa ARG002 ): """ Set trainee parameters for auto-ablation. @@ -1705,7 +1705,7 @@ def react( be used if the Trainee has them. use_regional_residuals : bool, default True When False, uses global residuals. When True, calculates and uses - regional residuals, which may increase runtime noticably. + regional residuals, which may increase runtime noticeably. weight_feature : str, optional Name of feature whose values to use as case weights. When left unspecified uses the internally managed case weight. diff --git a/howso/utilities/feature_attributes/abstract_data.py b/howso/utilities/feature_attributes/abstract_data.py index 330a07d9..01e97704 100644 --- a/howso/utilities/feature_attributes/abstract_data.py +++ b/howso/utilities/feature_attributes/abstract_data.py @@ -507,7 +507,7 @@ def _infer_datetime_attributes(self, feature_name: str) -> dict: 'date_time_format': dt_format, } - def _infer_date_attributes(self, feature_name: str) -> dict: + def _infer_date_attributes(self, feature_name: str) -> dict: # noqa ARG002 return { 'type': 'continuous', 'data_type': 'formatted_date_time', @@ -543,13 +543,13 @@ def _infer_time_attributes(self, feature_name: str, user_time_format: str = None 'date_time_format': time_format, } - def _infer_timedelta_attributes(self, feature_name: str) -> dict: + def _infer_timedelta_attributes(self, feature_name: str) -> dict: # noqa ARG002 return { 'type': 'continuous', 'data_type': 'number', } - def _infer_boolean_attributes(self, feature_name: str) -> dict: + def _infer_boolean_attributes(self, feature_name: str) -> dict: # noqa ARG002 return { 'type': 'nominal', 'data_type': 'boolean', @@ -628,7 +628,7 @@ def _infer_string_attributes(self, feature_name: str) -> dict: else: return self._infer_unknown_attributes(feature_name) - def _infer_unknown_attributes(self, feature_name: str) -> dict: + def _infer_unknown_attributes(self, feature_name: str) -> dict: # noqa ARG002 return { 'type': 'nominal', } diff --git a/howso/utilities/feature_attributes/base.py b/howso/utilities/feature_attributes/base.py index bb337390..435be61f 100644 --- a/howso/utilities/feature_attributes/base.py +++ b/howso/utilities/feature_attributes/base.py @@ -301,7 +301,7 @@ def _validate_dtype(self, data: pd.DataFrame, feature: str, # noqa: C901 if coerce: coerced_df[feature] = series is_valid = True - except Exception: # noqa: Intentionally broad + except Exception: # Intentionally broad pass elif expected_dtype == 'datetime64': try: @@ -317,7 +317,7 @@ def _validate_dtype(self, data: pd.DataFrame, feature: str, # noqa: C901 else: coerced_df[feature] = series is_valid = True - except Exception: # noqa: Intentionally broad + except Exception: # Intentionally broad pass else: # Else, compare the dtype directly @@ -334,7 +334,7 @@ def _validate_dtype(self, data: pd.DataFrame, feature: str, # noqa: C901 # If this happens, there is a null value, thus a float dtype is OK if pd.api.types.is_float_dtype(series): is_valid = True - except Exception: # noqa: Intentionally broad + except Exception: # Intentionally broad pass # Raise warnings if the types do not match @@ -617,7 +617,7 @@ def has_unsupported_data(self, feature_name: str) -> bool: """ return feature_name in self.unsupported - def to_dataframe(self, *, include_all: bool = False) -> pd.DataFrame: + def to_dataframe(self, *, include_all: bool = False) -> pd.DataFrame: # noqa ARG002 """ Return a DataFrame of the feature attributes. @@ -704,7 +704,7 @@ def _process(self, # noqa: C901 include_extended_nominal_probabilities: t.Optional[bool] = False, include_sample: bool = False, infer_bounds: bool = True, - max_workers: t.Optional[int] = None, + max_workers: t.Optional[int] = None, # noqa ARG002 mode_bound_features: t.Optional[Iterable[str]] = None, nominal_substitution_config: t.Optional[dict[str, dict]] = None, ordinal_feature_values: t.Optional[dict[str, list[str]]] = None, @@ -1228,7 +1228,7 @@ def _is_datetime(string: str): try: dt_parse(string) return True - except Exception: # noqa: Intentionally broad + except Exception: # Intentionally broad return False def _is_iso8601_datetime_column(self, feature: str) -> bool: @@ -1264,7 +1264,7 @@ def _is_iso8601_datetime_column(self, feature: str) -> bool: if not self._is_datetime(rand_val): return False isoparse(rand_val) - except Exception: # noqa: Intentionally broad + except Exception: # Intentionally broad return False # No issues; it's valid diff --git a/howso/utilities/feature_attributes/pandas.py b/howso/utilities/feature_attributes/pandas.py index c4841cc7..03d1a551 100644 --- a/howso/utilities/feature_attributes/pandas.py +++ b/howso/utilities/feature_attributes/pandas.py @@ -130,7 +130,7 @@ def _get_feature_names(self) -> list[str]: 'your DataFrame to use string column names.') return feature_names - def _has_unique_constraint(self, feature_name: str) -> bool: + def _has_unique_constraint(self, feature_name: str) -> bool: # noqa ARG002 # This always returns False for DataFrames, which don't support such # constraints. return False @@ -648,7 +648,7 @@ def _infer_datetime_attributes(self, feature_name: str) -> dict: 'date_time_format': dt_format, } - def _infer_date_attributes(self, feature_name: str) -> dict: + def _infer_date_attributes(self, feature_name: str) -> dict: # noqa ARG002 return { 'type': 'continuous', 'data_type': 'formatted_date_time', @@ -684,13 +684,13 @@ def _infer_time_attributes(self, feature_name: str, user_time_format: str = None 'date_time_format': time_format, } - def _infer_timedelta_attributes(self, feature_name: str) -> dict: + def _infer_timedelta_attributes(self, feature_name: str) -> dict: # noqa ARG002 return { 'type': 'continuous', 'data_type': 'number', } - def _infer_boolean_attributes(self, feature_name: str) -> dict: + def _infer_boolean_attributes(self, feature_name: str) -> dict: # noqa ARG002 return { 'type': 'nominal', 'data_type': 'boolean', @@ -770,7 +770,7 @@ def _infer_string_attributes(self, feature_name: str) -> dict: else: return self._infer_unknown_attributes(feature_name) - def _infer_unknown_attributes(self, feature_name: str) -> dict: + def _infer_unknown_attributes(self, feature_name: str) -> dict: # noqa ARG002 return { 'type': 'nominal', } diff --git a/howso/utilities/feature_attributes/relational.py b/howso/utilities/feature_attributes/relational.py index 1f5f5440..ceb63ddc 100644 --- a/howso/utilities/feature_attributes/relational.py +++ b/howso/utilities/feature_attributes/relational.py @@ -698,7 +698,7 @@ def _infer_timedelta_attributes(self, feature_name: str) -> dict: 'data_type': 'number', } - def _infer_boolean_attributes(self, feature_name: str) -> dict: + def _infer_boolean_attributes(self, feature_name: str) -> dict: # noqa ARG002 return { 'type': 'nominal', 'data_type': 'boolean', @@ -786,7 +786,7 @@ def _infer_string_attributes(self, feature_name: str) -> dict: else: return self._infer_unknown_attributes(feature_name) - def _infer_unknown_attributes(self, feature_name: str) -> dict: + def _infer_unknown_attributes(self, feature_name: str) -> dict: # noqa ARG002 return { 'type': 'nominal' } diff --git a/howso/utilities/features.py b/howso/utilities/features.py index 666db30d..e8668fc5 100644 --- a/howso/utilities/features.py +++ b/howso/utilities/features.py @@ -474,8 +474,11 @@ def format_time_column(cls, column: pd.Series, feature: Mapping # noqa: C901 return column.apply(partial(seconds_to_time, tzinfo=tz)) @classmethod - def format_boolean_column(cls, column: pd.Series, feature: Mapping - ) -> pd.Series: + def format_boolean_column( + cls, + column: pd.Series, + feature: Mapping # noqa ARG003 + ) -> pd.Series: """ Format boolean column. @@ -608,8 +611,11 @@ def format_numeric_column(cls, column: pd.Series, feature: Mapping return column @classmethod - def format_string_column(cls, column: pd.Series, feature: Mapping - ) -> pd.Series: + def format_string_column( + cls, + column: pd.Series, + feature: Mapping # noqa: ARG003 + ) -> pd.Series: """ Format string column. @@ -629,8 +635,11 @@ def format_string_column(cls, column: pd.Series, feature: Mapping return column @classmethod - def format_unknown_column(cls, column: pd.Series, feature: Mapping - ) -> pd.Series: + def format_unknown_column( + cls, + column: pd.Series, + feature: Mapping # noqa: ARG003 + ) -> pd.Series: """ Format unknown typed column. diff --git a/howso/utilities/installation_verification.py b/howso/utilities/installation_verification.py index fd44fc84..51d63272 100644 --- a/howso/utilities/installation_verification.py +++ b/howso/utilities/installation_verification.py @@ -576,7 +576,7 @@ def generate_dataframe(*, client: AbstractHowsoClient, return df, elapsed_time -def check_not_emulated(*, registry: InstallationCheckRegistry): +def check_not_emulated(*, registry: InstallationCheckRegistry): # noqa ARG001 """ Check that the installation is not running under emulation on MacOS. diff --git a/pyproject.toml b/pyproject.toml index 9a95c501..58d52e83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,16 +56,19 @@ dev = [ "flake8-docstrings", "flake8-import-order", "flake8~=3.0", + "flake8-unused-arguments", "mongomock", "pip-tools", "pipdeptree", "pmlb", "pycodestyle", "pylint", + "pyright", "pytest<8.0", "pytest-cov", "pytest-xdist", "pytest-mock~=1.0,<1.14.0", + "ruff", ] no-telemetry = [ "howso-engine-no-telemetry", @@ -112,3 +115,57 @@ split_penalty_for_added_line_split = 300 # version is managed by setuptools_scm [tool.setuptools_scm] + +# Linting and static analysis tools + +[tool.pyright] +typeCheckingMode = "strict" +reportMissingTypeStubs = "none" +reportUnknownArgumentType = "none" +reportUnknownMemberType = "none" +reportUnknownParameterType = "none" +reportUnknownVariableType = "none" +reportPrivateUsage = "none" + +[tool.ruff] +line-length = 119 +indent-width = 4 + +[tool.ruff.lint] +select = [ + # "E", # pycodestyle + # "W", # pycodestyle warnings + # "D", # pycodestyle docstrings + # "F", # Pyflakes + # "UP", # pyupgrade + # "B", # flake8-bugbear + # "SIM", # flake8-simplify + # flake-8-unused-args + "ARG", # Unused arguments + # "I", # isort Intentionally left out + # "C", # flake8-comprehensions +] +ignore = [ + "D100", # Missing docstring in public module + "D104", # Missing docstring in public package + "D107", # Missing docstring in __init__ + "UP038", # Prefer X | Y over (X, Y) in isinstance (ignore since its slower) + "UP007", # Allow Optional[T] instead of forcing T | None + "UP035", # Allow deprecated imports. Required for from typing_extensions import TypeAlias and 3.9 support. +] + +[tool.ruff.lint.pyupgrade] +# Preserve types, even if a file imports `from __future__ import annotations`. +keep-runtime-typing = true + +[tool.ruff.lint.mccabe] +max-complexity = 15 + +[tool.ruff.lint.pydocstyle] +convention = "pep257" + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +skip-magic-trailing-comma = false +line-ending = "auto" diff --git a/requirements-3.10-dev.txt b/requirements-3.10-dev.txt index 71ed650e..091d58a3 100644 --- a/requirements-3.10-dev.txt +++ b/requirements-3.10-dev.txt @@ -324,6 +324,7 @@ flake8==3.9.2 \ --hash=sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907 # via # flake8-docstrings + # flake8-unused-arguments # howso-engine (pyproject.toml) flake8-docstrings==1.7.0 \ --hash=sha256:4c8cc748dc16e6869728699e5d0d685da9a10b0ea718e090b1ba088e67a941af \ @@ -333,6 +334,10 @@ flake8-import-order==0.18.2 \ --hash=sha256:82ed59f1083b629b030ee9d3928d9e06b6213eb196fe745b3a7d4af2168130df \ --hash=sha256:e23941f892da3e0c09d711babbb0c73bc735242e9b216b726616758a920d900e # via howso-engine (pyproject.toml) +flake8-unused-arguments==0.0.13 \ + --hash=sha256:c5894d294424bf7915e44dff0917222c454151016f96edc55b9f847bf307f3f7 \ + --hash=sha256:df6a76b73a6ce67720332182a80f2f0a80783cab1ccae8175f39787cd3a74b31 + # via howso-engine (pyproject.toml) humanize==4.12.2 \ --hash=sha256:ce0715740e9caacc982bb89098182cf8ded3552693a433311c6a4ce6f4e12a2c \ --hash=sha256:e4e44dced598b7e03487f3b1c6fd5b1146c30ea55a110e71d5d4bca3e094259e @@ -454,6 +459,10 @@ mongomock==4.3.0 \ --hash=sha256:32667b79066fabc12d4f17f16a8fd7361b5f4435208b3ba32c226e52212a8c30 \ --hash=sha256:5ef86bd12fc8806c6e7af32f21266c61b6c4ba96096f85129852d1c4fec1327e # via howso-engine (pyproject.toml) +nodeenv==1.9.1 \ + --hash=sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f \ + --hash=sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9 + # via pyright numpy==2.2.5 \ --hash=sha256:0255732338c4fdd00996c0421884ea8a3651eea555c3a56b84892b66f696eb70 \ --hash=sha256:02f226baeefa68f7d579e213d0f3493496397d8f1cff5e2b222af274c86a552a \ @@ -627,6 +636,10 @@ pyproject-hooks==1.2.0 \ # via # build # pip-tools +pyright==1.1.400 \ + --hash=sha256:b8a3ba40481aa47ba08ffb3228e821d22f7d391f83609211335858bf05686bdb \ + --hash=sha256:c80d04f98b5a4358ad3a35e241dbf2a408eee33a40779df365644f8054d2517e + # via howso-engine (pyproject.toml) pytest==7.4.4 \ --hash=sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280 \ --hash=sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8 @@ -724,6 +737,26 @@ rich==14.0.0 \ --hash=sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0 \ --hash=sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725 # via howso-engine (pyproject.toml) +ruff==0.11.7 \ + --hash=sha256:07f1496ad00a4a139f4de220b0c97da6d4c85e0e4aa9b2624167b7d4d44fd6b6 \ + --hash=sha256:0a931d85959ceb77e92aea4bbedfded0a31534ce191252721128f77e5ae1f98a \ + --hash=sha256:169027e31c52c0e36c44ae9a9c7db35e505fee0b39f8d9fca7274a6305295a92 \ + --hash=sha256:2b19cdb9cf7dae00d5ee2e7c013540cdc3b31c4f281f1dacb5a799d610e90db4 \ + --hash=sha256:305b93f9798aee582e91e34437810439acb28b5fc1fee6b8205c78c806845a94 \ + --hash=sha256:4809df77de390a1c2077d9b7945d82f44b95d19ceccf0c287c56e4dc9b91ca64 \ + --hash=sha256:49b888200a320dd96a68e86736cf531d6afba03e4f6cf098401406a257fcf3d6 \ + --hash=sha256:64e0ee994c9e326b43539d133a36a455dbaab477bc84fe7bfbd528abe2f05c1e \ + --hash=sha256:655089ad3224070736dc32844fde783454f8558e71f501cb207485fe4eee23d4 \ + --hash=sha256:778c1e5d6f9e91034142dfd06110534ca13220bfaad5c3735f6cb844654f6177 \ + --hash=sha256:7940665e74e7b65d427b82bffc1e46710ec7f30d58b4b2d5016e3f0321436502 \ + --hash=sha256:a681db041ef55550c371f9cd52a3cf17a0da4c75d6bd691092dfc38170ebc4b6 \ + --hash=sha256:bad82052311479a5865f52c76ecee5d468a58ba44fb23ee15079f17dd4c8fd63 \ + --hash=sha256:d29e909d9a8d02f928d72ab7837b5cbc450a5bdf578ab9ebee3263d0a525091c \ + --hash=sha256:d3d7d2e140a6fbbc09033bce65bd7ea29d6a0adeb90b8430262fbacd58c38ada \ + --hash=sha256:dd1fb86b168ae349fb01dd497d83537b2c5541fe0626e70c786427dd8363aaee \ + --hash=sha256:f25dfb853ad217e6e5f1924ae8a5b3f6709051a13e9dad18690de6c8ff299e26 \ + --hash=sha256:f3a0c2e169e6b545f8e2dba185eabbd9db4f08880032e75aa0e285a6d3f48201 + # via howso-engine (pyproject.toml) scikit-learn==1.6.1 \ --hash=sha256:0650e730afb87402baa88afbf31c07b84c98272622aaba002559b614600ca691 \ --hash=sha256:0c8d036eb937dbb568c6242fa598d551d88fb4399c0344d95c001980ec1c7d36 \ @@ -872,6 +905,7 @@ typing-extensions==4.13.2 \ # via # astroid # howso-engine (pyproject.toml) + # pyright # rich tzdata==2025.2 \ --hash=sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8 \ diff --git a/requirements-3.11-dev.txt b/requirements-3.11-dev.txt index 480f2601..b12c43ae 100644 --- a/requirements-3.11-dev.txt +++ b/requirements-3.11-dev.txt @@ -320,6 +320,7 @@ flake8==3.9.2 \ --hash=sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907 # via # flake8-docstrings + # flake8-unused-arguments # howso-engine (pyproject.toml) flake8-docstrings==1.7.0 \ --hash=sha256:4c8cc748dc16e6869728699e5d0d685da9a10b0ea718e090b1ba088e67a941af \ @@ -329,6 +330,10 @@ flake8-import-order==0.18.2 \ --hash=sha256:82ed59f1083b629b030ee9d3928d9e06b6213eb196fe745b3a7d4af2168130df \ --hash=sha256:e23941f892da3e0c09d711babbb0c73bc735242e9b216b726616758a920d900e # via howso-engine (pyproject.toml) +flake8-unused-arguments==0.0.13 \ + --hash=sha256:c5894d294424bf7915e44dff0917222c454151016f96edc55b9f847bf307f3f7 \ + --hash=sha256:df6a76b73a6ce67720332182a80f2f0a80783cab1ccae8175f39787cd3a74b31 + # via howso-engine (pyproject.toml) humanize==4.12.2 \ --hash=sha256:ce0715740e9caacc982bb89098182cf8ded3552693a433311c6a4ce6f4e12a2c \ --hash=sha256:e4e44dced598b7e03487f3b1c6fd5b1146c30ea55a110e71d5d4bca3e094259e @@ -450,6 +455,10 @@ mongomock==4.3.0 \ --hash=sha256:32667b79066fabc12d4f17f16a8fd7361b5f4435208b3ba32c226e52212a8c30 \ --hash=sha256:5ef86bd12fc8806c6e7af32f21266c61b6c4ba96096f85129852d1c4fec1327e # via howso-engine (pyproject.toml) +nodeenv==1.9.1 \ + --hash=sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f \ + --hash=sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9 + # via pyright numpy==2.2.5 \ --hash=sha256:0255732338c4fdd00996c0421884ea8a3651eea555c3a56b84892b66f696eb70 \ --hash=sha256:02f226baeefa68f7d579e213d0f3493496397d8f1cff5e2b222af274c86a552a \ @@ -623,6 +632,10 @@ pyproject-hooks==1.2.0 \ # via # build # pip-tools +pyright==1.1.400 \ + --hash=sha256:b8a3ba40481aa47ba08ffb3228e821d22f7d391f83609211335858bf05686bdb \ + --hash=sha256:c80d04f98b5a4358ad3a35e241dbf2a408eee33a40779df365644f8054d2517e + # via howso-engine (pyproject.toml) pytest==7.4.4 \ --hash=sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280 \ --hash=sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8 @@ -720,6 +733,26 @@ rich==14.0.0 \ --hash=sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0 \ --hash=sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725 # via howso-engine (pyproject.toml) +ruff==0.11.7 \ + --hash=sha256:07f1496ad00a4a139f4de220b0c97da6d4c85e0e4aa9b2624167b7d4d44fd6b6 \ + --hash=sha256:0a931d85959ceb77e92aea4bbedfded0a31534ce191252721128f77e5ae1f98a \ + --hash=sha256:169027e31c52c0e36c44ae9a9c7db35e505fee0b39f8d9fca7274a6305295a92 \ + --hash=sha256:2b19cdb9cf7dae00d5ee2e7c013540cdc3b31c4f281f1dacb5a799d610e90db4 \ + --hash=sha256:305b93f9798aee582e91e34437810439acb28b5fc1fee6b8205c78c806845a94 \ + --hash=sha256:4809df77de390a1c2077d9b7945d82f44b95d19ceccf0c287c56e4dc9b91ca64 \ + --hash=sha256:49b888200a320dd96a68e86736cf531d6afba03e4f6cf098401406a257fcf3d6 \ + --hash=sha256:64e0ee994c9e326b43539d133a36a455dbaab477bc84fe7bfbd528abe2f05c1e \ + --hash=sha256:655089ad3224070736dc32844fde783454f8558e71f501cb207485fe4eee23d4 \ + --hash=sha256:778c1e5d6f9e91034142dfd06110534ca13220bfaad5c3735f6cb844654f6177 \ + --hash=sha256:7940665e74e7b65d427b82bffc1e46710ec7f30d58b4b2d5016e3f0321436502 \ + --hash=sha256:a681db041ef55550c371f9cd52a3cf17a0da4c75d6bd691092dfc38170ebc4b6 \ + --hash=sha256:bad82052311479a5865f52c76ecee5d468a58ba44fb23ee15079f17dd4c8fd63 \ + --hash=sha256:d29e909d9a8d02f928d72ab7837b5cbc450a5bdf578ab9ebee3263d0a525091c \ + --hash=sha256:d3d7d2e140a6fbbc09033bce65bd7ea29d6a0adeb90b8430262fbacd58c38ada \ + --hash=sha256:dd1fb86b168ae349fb01dd497d83537b2c5541fe0626e70c786427dd8363aaee \ + --hash=sha256:f25dfb853ad217e6e5f1924ae8a5b3f6709051a13e9dad18690de6c8ff299e26 \ + --hash=sha256:f3a0c2e169e6b545f8e2dba185eabbd9db4f08880032e75aa0e285a6d3f48201 + # via howso-engine (pyproject.toml) scikit-learn==1.6.1 \ --hash=sha256:0650e730afb87402baa88afbf31c07b84c98272622aaba002559b614600ca691 \ --hash=sha256:0c8d036eb937dbb568c6242fa598d551d88fb4399c0344d95c001980ec1c7d36 \ @@ -826,7 +859,9 @@ tomlkit==0.13.2 \ typing-extensions==4.13.2 \ --hash=sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c \ --hash=sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef - # via howso-engine (pyproject.toml) + # via + # howso-engine (pyproject.toml) + # pyright tzdata==2025.2 \ --hash=sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8 \ --hash=sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9 diff --git a/requirements-3.12-dev.txt b/requirements-3.12-dev.txt index a82efd2a..d36909b2 100644 --- a/requirements-3.12-dev.txt +++ b/requirements-3.12-dev.txt @@ -320,6 +320,7 @@ flake8==3.9.2 \ --hash=sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907 # via # flake8-docstrings + # flake8-unused-arguments # howso-engine (pyproject.toml) flake8-docstrings==1.7.0 \ --hash=sha256:4c8cc748dc16e6869728699e5d0d685da9a10b0ea718e090b1ba088e67a941af \ @@ -329,6 +330,10 @@ flake8-import-order==0.18.2 \ --hash=sha256:82ed59f1083b629b030ee9d3928d9e06b6213eb196fe745b3a7d4af2168130df \ --hash=sha256:e23941f892da3e0c09d711babbb0c73bc735242e9b216b726616758a920d900e # via howso-engine (pyproject.toml) +flake8-unused-arguments==0.0.13 \ + --hash=sha256:c5894d294424bf7915e44dff0917222c454151016f96edc55b9f847bf307f3f7 \ + --hash=sha256:df6a76b73a6ce67720332182a80f2f0a80783cab1ccae8175f39787cd3a74b31 + # via howso-engine (pyproject.toml) humanize==4.12.2 \ --hash=sha256:ce0715740e9caacc982bb89098182cf8ded3552693a433311c6a4ce6f4e12a2c \ --hash=sha256:e4e44dced598b7e03487f3b1c6fd5b1146c30ea55a110e71d5d4bca3e094259e @@ -450,6 +455,10 @@ mongomock==4.3.0 \ --hash=sha256:32667b79066fabc12d4f17f16a8fd7361b5f4435208b3ba32c226e52212a8c30 \ --hash=sha256:5ef86bd12fc8806c6e7af32f21266c61b6c4ba96096f85129852d1c4fec1327e # via howso-engine (pyproject.toml) +nodeenv==1.9.1 \ + --hash=sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f \ + --hash=sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9 + # via pyright numpy==2.2.5 \ --hash=sha256:0255732338c4fdd00996c0421884ea8a3651eea555c3a56b84892b66f696eb70 \ --hash=sha256:02f226baeefa68f7d579e213d0f3493496397d8f1cff5e2b222af274c86a552a \ @@ -623,6 +632,10 @@ pyproject-hooks==1.2.0 \ # via # build # pip-tools +pyright==1.1.400 \ + --hash=sha256:b8a3ba40481aa47ba08ffb3228e821d22f7d391f83609211335858bf05686bdb \ + --hash=sha256:c80d04f98b5a4358ad3a35e241dbf2a408eee33a40779df365644f8054d2517e + # via howso-engine (pyproject.toml) pytest==7.4.4 \ --hash=sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280 \ --hash=sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8 @@ -720,6 +733,26 @@ rich==14.0.0 \ --hash=sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0 \ --hash=sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725 # via howso-engine (pyproject.toml) +ruff==0.11.7 \ + --hash=sha256:07f1496ad00a4a139f4de220b0c97da6d4c85e0e4aa9b2624167b7d4d44fd6b6 \ + --hash=sha256:0a931d85959ceb77e92aea4bbedfded0a31534ce191252721128f77e5ae1f98a \ + --hash=sha256:169027e31c52c0e36c44ae9a9c7db35e505fee0b39f8d9fca7274a6305295a92 \ + --hash=sha256:2b19cdb9cf7dae00d5ee2e7c013540cdc3b31c4f281f1dacb5a799d610e90db4 \ + --hash=sha256:305b93f9798aee582e91e34437810439acb28b5fc1fee6b8205c78c806845a94 \ + --hash=sha256:4809df77de390a1c2077d9b7945d82f44b95d19ceccf0c287c56e4dc9b91ca64 \ + --hash=sha256:49b888200a320dd96a68e86736cf531d6afba03e4f6cf098401406a257fcf3d6 \ + --hash=sha256:64e0ee994c9e326b43539d133a36a455dbaab477bc84fe7bfbd528abe2f05c1e \ + --hash=sha256:655089ad3224070736dc32844fde783454f8558e71f501cb207485fe4eee23d4 \ + --hash=sha256:778c1e5d6f9e91034142dfd06110534ca13220bfaad5c3735f6cb844654f6177 \ + --hash=sha256:7940665e74e7b65d427b82bffc1e46710ec7f30d58b4b2d5016e3f0321436502 \ + --hash=sha256:a681db041ef55550c371f9cd52a3cf17a0da4c75d6bd691092dfc38170ebc4b6 \ + --hash=sha256:bad82052311479a5865f52c76ecee5d468a58ba44fb23ee15079f17dd4c8fd63 \ + --hash=sha256:d29e909d9a8d02f928d72ab7837b5cbc450a5bdf578ab9ebee3263d0a525091c \ + --hash=sha256:d3d7d2e140a6fbbc09033bce65bd7ea29d6a0adeb90b8430262fbacd58c38ada \ + --hash=sha256:dd1fb86b168ae349fb01dd497d83537b2c5541fe0626e70c786427dd8363aaee \ + --hash=sha256:f25dfb853ad217e6e5f1924ae8a5b3f6709051a13e9dad18690de6c8ff299e26 \ + --hash=sha256:f3a0c2e169e6b545f8e2dba185eabbd9db4f08880032e75aa0e285a6d3f48201 + # via howso-engine (pyproject.toml) scikit-learn==1.6.1 \ --hash=sha256:0650e730afb87402baa88afbf31c07b84c98272622aaba002559b614600ca691 \ --hash=sha256:0c8d036eb937dbb568c6242fa598d551d88fb4399c0344d95c001980ec1c7d36 \ @@ -826,7 +859,9 @@ tomlkit==0.13.2 \ typing-extensions==4.13.2 \ --hash=sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c \ --hash=sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef - # via howso-engine (pyproject.toml) + # via + # howso-engine (pyproject.toml) + # pyright tzdata==2025.2 \ --hash=sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8 \ --hash=sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9 diff --git a/requirements-3.13-dev.txt b/requirements-3.13-dev.txt index a1e236bb..a8f491b2 100644 --- a/requirements-3.13-dev.txt +++ b/requirements-3.13-dev.txt @@ -320,6 +320,7 @@ flake8==3.9.2 \ --hash=sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907 # via # flake8-docstrings + # flake8-unused-arguments # howso-engine (pyproject.toml) flake8-docstrings==1.7.0 \ --hash=sha256:4c8cc748dc16e6869728699e5d0d685da9a10b0ea718e090b1ba088e67a941af \ @@ -329,6 +330,10 @@ flake8-import-order==0.18.2 \ --hash=sha256:82ed59f1083b629b030ee9d3928d9e06b6213eb196fe745b3a7d4af2168130df \ --hash=sha256:e23941f892da3e0c09d711babbb0c73bc735242e9b216b726616758a920d900e # via howso-engine (pyproject.toml) +flake8-unused-arguments==0.0.13 \ + --hash=sha256:c5894d294424bf7915e44dff0917222c454151016f96edc55b9f847bf307f3f7 \ + --hash=sha256:df6a76b73a6ce67720332182a80f2f0a80783cab1ccae8175f39787cd3a74b31 + # via howso-engine (pyproject.toml) humanize==4.12.2 \ --hash=sha256:ce0715740e9caacc982bb89098182cf8ded3552693a433311c6a4ce6f4e12a2c \ --hash=sha256:e4e44dced598b7e03487f3b1c6fd5b1146c30ea55a110e71d5d4bca3e094259e @@ -450,6 +455,10 @@ mongomock==4.3.0 \ --hash=sha256:32667b79066fabc12d4f17f16a8fd7361b5f4435208b3ba32c226e52212a8c30 \ --hash=sha256:5ef86bd12fc8806c6e7af32f21266c61b6c4ba96096f85129852d1c4fec1327e # via howso-engine (pyproject.toml) +nodeenv==1.9.1 \ + --hash=sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f \ + --hash=sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9 + # via pyright numpy==2.2.5 \ --hash=sha256:0255732338c4fdd00996c0421884ea8a3651eea555c3a56b84892b66f696eb70 \ --hash=sha256:02f226baeefa68f7d579e213d0f3493496397d8f1cff5e2b222af274c86a552a \ @@ -623,6 +632,10 @@ pyproject-hooks==1.2.0 \ # via # build # pip-tools +pyright==1.1.400 \ + --hash=sha256:b8a3ba40481aa47ba08ffb3228e821d22f7d391f83609211335858bf05686bdb \ + --hash=sha256:c80d04f98b5a4358ad3a35e241dbf2a408eee33a40779df365644f8054d2517e + # via howso-engine (pyproject.toml) pytest==7.4.4 \ --hash=sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280 \ --hash=sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8 @@ -720,6 +733,26 @@ rich==14.0.0 \ --hash=sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0 \ --hash=sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725 # via howso-engine (pyproject.toml) +ruff==0.11.7 \ + --hash=sha256:07f1496ad00a4a139f4de220b0c97da6d4c85e0e4aa9b2624167b7d4d44fd6b6 \ + --hash=sha256:0a931d85959ceb77e92aea4bbedfded0a31534ce191252721128f77e5ae1f98a \ + --hash=sha256:169027e31c52c0e36c44ae9a9c7db35e505fee0b39f8d9fca7274a6305295a92 \ + --hash=sha256:2b19cdb9cf7dae00d5ee2e7c013540cdc3b31c4f281f1dacb5a799d610e90db4 \ + --hash=sha256:305b93f9798aee582e91e34437810439acb28b5fc1fee6b8205c78c806845a94 \ + --hash=sha256:4809df77de390a1c2077d9b7945d82f44b95d19ceccf0c287c56e4dc9b91ca64 \ + --hash=sha256:49b888200a320dd96a68e86736cf531d6afba03e4f6cf098401406a257fcf3d6 \ + --hash=sha256:64e0ee994c9e326b43539d133a36a455dbaab477bc84fe7bfbd528abe2f05c1e \ + --hash=sha256:655089ad3224070736dc32844fde783454f8558e71f501cb207485fe4eee23d4 \ + --hash=sha256:778c1e5d6f9e91034142dfd06110534ca13220bfaad5c3735f6cb844654f6177 \ + --hash=sha256:7940665e74e7b65d427b82bffc1e46710ec7f30d58b4b2d5016e3f0321436502 \ + --hash=sha256:a681db041ef55550c371f9cd52a3cf17a0da4c75d6bd691092dfc38170ebc4b6 \ + --hash=sha256:bad82052311479a5865f52c76ecee5d468a58ba44fb23ee15079f17dd4c8fd63 \ + --hash=sha256:d29e909d9a8d02f928d72ab7837b5cbc450a5bdf578ab9ebee3263d0a525091c \ + --hash=sha256:d3d7d2e140a6fbbc09033bce65bd7ea29d6a0adeb90b8430262fbacd58c38ada \ + --hash=sha256:dd1fb86b168ae349fb01dd497d83537b2c5541fe0626e70c786427dd8363aaee \ + --hash=sha256:f25dfb853ad217e6e5f1924ae8a5b3f6709051a13e9dad18690de6c8ff299e26 \ + --hash=sha256:f3a0c2e169e6b545f8e2dba185eabbd9db4f08880032e75aa0e285a6d3f48201 + # via howso-engine (pyproject.toml) scikit-learn==1.6.1 \ --hash=sha256:0650e730afb87402baa88afbf31c07b84c98272622aaba002559b614600ca691 \ --hash=sha256:0c8d036eb937dbb568c6242fa598d551d88fb4399c0344d95c001980ec1c7d36 \ @@ -826,7 +859,9 @@ tomlkit==0.13.2 \ typing-extensions==4.13.2 \ --hash=sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c \ --hash=sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef - # via howso-engine (pyproject.toml) + # via + # howso-engine (pyproject.toml) + # pyright tzdata==2025.2 \ --hash=sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8 \ --hash=sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9 diff --git a/requirements-3.9-dev.txt b/requirements-3.9-dev.txt index 7b82d971..8a93151a 100644 --- a/requirements-3.9-dev.txt +++ b/requirements-3.9-dev.txt @@ -324,6 +324,7 @@ flake8==3.9.2 \ --hash=sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907 # via # flake8-docstrings + # flake8-unused-arguments # howso-engine (pyproject.toml) flake8-docstrings==1.7.0 \ --hash=sha256:4c8cc748dc16e6869728699e5d0d685da9a10b0ea718e090b1ba088e67a941af \ @@ -333,6 +334,10 @@ flake8-import-order==0.18.2 \ --hash=sha256:82ed59f1083b629b030ee9d3928d9e06b6213eb196fe745b3a7d4af2168130df \ --hash=sha256:e23941f892da3e0c09d711babbb0c73bc735242e9b216b726616758a920d900e # via howso-engine (pyproject.toml) +flake8-unused-arguments==0.0.13 \ + --hash=sha256:c5894d294424bf7915e44dff0917222c454151016f96edc55b9f847bf307f3f7 \ + --hash=sha256:df6a76b73a6ce67720332182a80f2f0a80783cab1ccae8175f39787cd3a74b31 + # via howso-engine (pyproject.toml) humanize==4.12.2 \ --hash=sha256:ce0715740e9caacc982bb89098182cf8ded3552693a433311c6a4ce6f4e12a2c \ --hash=sha256:e4e44dced598b7e03487f3b1c6fd5b1146c30ea55a110e71d5d4bca3e094259e @@ -458,6 +463,10 @@ mongomock==4.3.0 \ --hash=sha256:32667b79066fabc12d4f17f16a8fd7361b5f4435208b3ba32c226e52212a8c30 \ --hash=sha256:5ef86bd12fc8806c6e7af32f21266c61b6c4ba96096f85129852d1c4fec1327e # via howso-engine (pyproject.toml) +nodeenv==1.9.1 \ + --hash=sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f \ + --hash=sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9 + # via pyright numpy==2.0.2 \ --hash=sha256:0123ffdaa88fa4ab64835dcbde75dcdf89c453c922f18dced6e27c90d1d0ec5a \ --hash=sha256:11a76c372d1d37437857280aa142086476136a8c0f373b2e648ab2c8f18fb195 \ @@ -621,6 +630,10 @@ pyproject-hooks==1.2.0 \ # via # build # pip-tools +pyright==1.1.400 \ + --hash=sha256:b8a3ba40481aa47ba08ffb3228e821d22f7d391f83609211335858bf05686bdb \ + --hash=sha256:c80d04f98b5a4358ad3a35e241dbf2a408eee33a40779df365644f8054d2517e + # via howso-engine (pyproject.toml) pytest==7.4.4 \ --hash=sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280 \ --hash=sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8 @@ -718,6 +731,26 @@ rich==14.0.0 \ --hash=sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0 \ --hash=sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725 # via howso-engine (pyproject.toml) +ruff==0.11.7 \ + --hash=sha256:07f1496ad00a4a139f4de220b0c97da6d4c85e0e4aa9b2624167b7d4d44fd6b6 \ + --hash=sha256:0a931d85959ceb77e92aea4bbedfded0a31534ce191252721128f77e5ae1f98a \ + --hash=sha256:169027e31c52c0e36c44ae9a9c7db35e505fee0b39f8d9fca7274a6305295a92 \ + --hash=sha256:2b19cdb9cf7dae00d5ee2e7c013540cdc3b31c4f281f1dacb5a799d610e90db4 \ + --hash=sha256:305b93f9798aee582e91e34437810439acb28b5fc1fee6b8205c78c806845a94 \ + --hash=sha256:4809df77de390a1c2077d9b7945d82f44b95d19ceccf0c287c56e4dc9b91ca64 \ + --hash=sha256:49b888200a320dd96a68e86736cf531d6afba03e4f6cf098401406a257fcf3d6 \ + --hash=sha256:64e0ee994c9e326b43539d133a36a455dbaab477bc84fe7bfbd528abe2f05c1e \ + --hash=sha256:655089ad3224070736dc32844fde783454f8558e71f501cb207485fe4eee23d4 \ + --hash=sha256:778c1e5d6f9e91034142dfd06110534ca13220bfaad5c3735f6cb844654f6177 \ + --hash=sha256:7940665e74e7b65d427b82bffc1e46710ec7f30d58b4b2d5016e3f0321436502 \ + --hash=sha256:a681db041ef55550c371f9cd52a3cf17a0da4c75d6bd691092dfc38170ebc4b6 \ + --hash=sha256:bad82052311479a5865f52c76ecee5d468a58ba44fb23ee15079f17dd4c8fd63 \ + --hash=sha256:d29e909d9a8d02f928d72ab7837b5cbc450a5bdf578ab9ebee3263d0a525091c \ + --hash=sha256:d3d7d2e140a6fbbc09033bce65bd7ea29d6a0adeb90b8430262fbacd58c38ada \ + --hash=sha256:dd1fb86b168ae349fb01dd497d83537b2c5541fe0626e70c786427dd8363aaee \ + --hash=sha256:f25dfb853ad217e6e5f1924ae8a5b3f6709051a13e9dad18690de6c8ff299e26 \ + --hash=sha256:f3a0c2e169e6b545f8e2dba185eabbd9db4f08880032e75aa0e285a6d3f48201 + # via howso-engine (pyproject.toml) scikit-learn==1.6.1 \ --hash=sha256:0650e730afb87402baa88afbf31c07b84c98272622aaba002559b614600ca691 \ --hash=sha256:0c8d036eb937dbb568c6242fa598d551d88fb4399c0344d95c001980ec1c7d36 \ @@ -846,6 +879,7 @@ typing-extensions==4.13.2 \ # astroid # howso-engine (pyproject.toml) # pylint + # pyright # rich tzdata==2025.2 \ --hash=sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8 \