Memory optimizations for signal & transient noise #623
Workflow file for this run
This file contains 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
name: windows-utils-test | |
on: | |
push: | |
paths-ignore: [".ci_helpers/docker/**", "**/docker.yaml"] | |
pull_request: | |
paths-ignore: [".ci_helpers/docker/**", "**/docker.yaml"] | |
pull_request_target: | |
paths-ignore: [".ci_helpers/docker/**", "**/docker.yaml"] | |
workflow_dispatch: | |
env: | |
CONDA_ENV: echopype | |
TEST_DATA_FOLDER: ${{ github.workspace }}\\test_data | |
jobs: | |
windows-test: | |
name: windows-${{ matrix.python-version }}-build | |
runs-on: "windows-latest" | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- python-version: 3.9 | |
experimental: false | |
defaults: | |
run: | |
shell: powershell | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for all branches and tags. | |
- name: Set environment variables | |
run: | | |
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV | |
- name: Setup miniconda w/mamba | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
mamba-version: "*" | |
channels: conda-forge,defaults | |
channel-priority: true | |
activate-environment: ${{ env.CONDA_ENV }} | |
environment-file: .ci_helpers/py${{ matrix.python-version }}.yaml | |
# Currently problematic! See https://github.com/mamba-org/mamba/issues/2157 | |
# - name: Setup micromamba | |
# uses: mamba-org/provision-with-micromamba@v15 | |
# with: | |
# environment-file: .ci_helpers/py${{ matrix.python-version }}.yaml | |
# environment-name: ${{ env.CONDA_ENV }} | |
# cache-env: true | |
# cache-env-key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(format('.ci_helpers/py{0}.yaml', matrix.python-version)) }} | |
- name: Print conda info | |
run: | | |
conda info | |
conda list | |
conda config --show-sources | |
conda config --show | |
printenv | sort | |
- name: Install dev tools | |
run: | | |
mamba install -c conda-forge -n ${{ env.CONDA_ENV }} --yes --file requirements-dev.txt | |
- name: Install echopype | |
run: | | |
python -m pip install -e . | |
# Add steps for downloading and unzipping test data | |
- name: Create Test Data Directory | |
run: New-Item -ItemType Directory -Force -Path ${{ env.TEST_DATA_FOLDER }} | |
- name: Install wget | |
run: choco install wget | |
shell: powershell | |
#- name: Download Test Data from Google Drive | |
# run: | | |
# $downloadLink = "https://drive.google.com/uc?export=download&id=1ofiSQ4zDwXfHE65tow4_jDIceBYHNW_8" | |
# $downloadPage = Invoke-WebRequest -Uri $downloadLink -OutFile "download.html" | |
# $confirmCode = (Select-String -Path "download.html" -Pattern 'confirm=([0-9A-Za-z_]+)' -AllMatches).Matches.Groups[1].Value | |
# $downloadFileLink = "https://drive.google.com/uc?export=download&confirm=$confirmCode&id=1ofiSQ4zDwXfHE65tow4_jDIceBYHNW_8" | |
# Invoke-WebRequest -Uri $downloadFileLink -OutFile "test_data.zip" | |
- name: Download Test Data from Google Drive | |
run: | | |
Remove-Item alias:wget | |
wget --quiet --save-cookies cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/uc?export=download&id=1ofiSQ4zDwXfHE65tow4_jDIceBYHNW_8' -O- | Out-String | Select-String -Pattern 'confirm=([0-9A-Za-z_]+)' | %{ $_.Matches.Groups[1].Value } > confirm.txt | |
$confirmCode = Get-Content confirm.txt | |
wget --load-cookies cookies.txt "https://drive.google.com/uc?export=download&confirm=$confirmCode&id=1ofiSQ4zDwXfHE65tow4_jDIceBYHNW_8" -O test_data.zip | |
Remove-Item cookies.txt -Force | |
Remove-Item confirm.txt -Force | |
shell: powershell | |
- name: Unzip Test Data | |
run: Expand-Archive -LiteralPath "test_data.zip" -DestinationPath ${{ env.TEST_DATA_FOLDER }} -Force | |
- name: Running all Tests | |
run: | | |
pytest -vvv -rx --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings echopype/tests/utils |& tee ci_${{ matrix.python-version }}_test_log.log |