Skip to content

Commit

Permalink
Run pre-commit run -a
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodmillman committed Sep 14, 2023
1 parent cc9f114 commit 22e4bea
Show file tree
Hide file tree
Showing 91 changed files with 519 additions and 527 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ omit =
*/pywt/data/create_dat.py
*.pxd
stringsource
plugins = Cython.Coverage
plugins = Cython.Coverage
244 changes: 121 additions & 123 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- v1.**

jobs:

test_pywavelets_linux:
name: linux-cp${{ matrix.python-version }}-${{ matrix.OPTIONS_NAME }}
runs-on: ubuntu-latest
Expand All @@ -27,7 +26,7 @@ jobs:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
python-version: [3.9, '3.10', '3.11']
python-version: [3.9, "3.10", "3.11"]
MINIMUM_REQUIREMENTS: [0]
USE_SCIPY: [0]
USE_SDIST: [0]
Expand All @@ -53,7 +52,7 @@ jobs:
USE_WHEEL: 1
OPTIONS_NAME: "install-from-wheel"
- platform_id: manylinux_x86_64
python-version: '3.11'
python-version: "3.11"
PIP_FLAGS: "--pre"
OPTIONS_NAME: "pre-releases"

Expand All @@ -68,72 +67,71 @@ jobs:

- name: Build package
env:
VERSION: ${{ matrix.python-version }}
MINIMUM_REQUIREMENTS: ${{ matrix.MINIMUM_REQUIREMENTS }}
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
USE_SCIPY: ${{ matrix.USE_SCIPY }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
VERSION: ${{ matrix.python-version }}
MINIMUM_REQUIREMENTS: ${{ matrix.MINIMUM_REQUIREMENTS }}
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
USE_SCIPY: ${{ matrix.USE_SCIPY }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
run: |
uname -a
df -h
ulimit -a
# ccache -s
which python
python --version
# sudo apt-get install libatlas-base-dev
pip install --upgrade pip build
# Set numpy version first, other packages link against it
if [ "${MINIMUM_REQUIREMENTS}" == "1" ]; then
pip install ${CYTHON_MIN}
pip install ${NUMPY_MIN}
if [ "${USE_SCIPY}" == "1" ]; then pip install ${SCIPY_MIN}; fi
else
pip install cython
pip install numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install scipy; fi
fi
pip install matplotlib pytest
set -o pipefail
if [ "${USE_WHEEL}" == "1" ]; then
# Need verbose output or TravisCI will terminate after 10 minutes
pip wheel . -v
pip install pywavelets*.whl
elif [ "${USE_SDIST}" == "1" ]; then
python -m build --sdist
pip install dist/pyw*.tar.gz -v
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
pip install sphinx numpydoc
pip install . -v
else
pip install . -v
fi
uname -a
df -h
ulimit -a
# ccache -s
which python
python --version
# sudo apt-get install libatlas-base-dev
pip install --upgrade pip build
# Set numpy version first, other packages link against it
if [ "${MINIMUM_REQUIREMENTS}" == "1" ]; then
pip install ${CYTHON_MIN}
pip install ${NUMPY_MIN}
if [ "${USE_SCIPY}" == "1" ]; then pip install ${SCIPY_MIN}; fi
else
pip install cython
pip install numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install scipy; fi
fi
pip install matplotlib pytest
set -o pipefail
if [ "${USE_WHEEL}" == "1" ]; then
# Need verbose output or TravisCI will terminate after 10 minutes
pip wheel . -v
pip install pywavelets*.whl
elif [ "${USE_SDIST}" == "1" ]; then
python -m build --sdist
pip install dist/pyw*.tar.gz -v
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
pip install sphinx numpydoc
pip install . -v
else
pip install . -v
fi
- name: Run tests
env:
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
run: |
set -o pipefail
# Move out of source directory to avoid finding local pywt
pushd demo
if [ "${USE_WHEEL}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${USE_SDIST}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
python util/refguide_check.py --doctests
else
pytest --pyargs pywt
fi
popd
set -o pipefail
# Move out of source directory to avoid finding local pywt
pushd demo
if [ "${USE_WHEEL}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${USE_SDIST}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
python util/refguide_check.py --doctests
else
pytest --pyargs pywt
fi
popd
test_pywavelets_macos:
name: macos-cp${{ matrix.python-version }}-${{ matrix.OPTIONS_NAME }}
Expand All @@ -150,7 +148,7 @@ jobs:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
python-version: [3.9, '3.11']
python-version: [3.9, "3.11"]
MINIMUM_REQUIREMENTS: [0]
USE_SCIPY: [0]
USE_SDIST: [0]
Expand All @@ -159,10 +157,10 @@ jobs:
PIP_FLAGS: [""]
OPTIONS_NAME: ["default"]
include:
- python-version: '3.9'
- python-version: "3.9"
MINIMUM_REQUIREMENTS: 1
OPTIONS_NAME: "osx-minimum-req"
- python-version: '3.11'
- python-version: "3.11"
PIP_FLAGS: "--pre"
OPTIONS_NAME: "pre-releases"

Expand All @@ -177,64 +175,64 @@ jobs:

- name: Build package
env:
VERSION: ${{ matrix.python-version }}
MINIMUM_REQUIREMENTS: ${{ matrix.MINIMUM_REQUIREMENTS }}
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
USE_SCIPY: ${{ matrix.USE_SCIPY }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
CC: /usr/bin/clang
CXX: /usr/bin/clang++
VERSION: ${{ matrix.python-version }}
MINIMUM_REQUIREMENTS: ${{ matrix.MINIMUM_REQUIREMENTS }}
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
USE_SCIPY: ${{ matrix.USE_SCIPY }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
CC: /usr/bin/clang
CXX: /usr/bin/clang++
run: |
uname -a
df -h
ulimit -a
which python
python --version
pip install --upgrade pip build
# Set numpy version first, other packages link against it
if [ "${MINIMUM_REQUIREMENTS}" == "1" ]; then
pip install ${CYTHON_MIN} ${NUMPY_MIN}
if [ "${USE_SCIPY}" == "1" ]; then pip install ${SCIPY_MIN}; fi
else
pip install cython numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install scipy; fi
fi
pip install matplotlib pytest
set -o pipefail
if [ "${USE_WHEEL}" == "1" ]; then
pip wheel . -v
pip install pywavelets*.whl -v
elif [ "${USE_SDIST}" == "1" ]; then
python -m build --sdist
pip install pywavelets* -v
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
pip install sphinx numpydoc
pip install . -v
else
pip install . -v
fi
uname -a
df -h
ulimit -a
which python
python --version
pip install --upgrade pip build
# Set numpy version first, other packages link against it
if [ "${MINIMUM_REQUIREMENTS}" == "1" ]; then
pip install ${CYTHON_MIN} ${NUMPY_MIN}
if [ "${USE_SCIPY}" == "1" ]; then pip install ${SCIPY_MIN}; fi
else
pip install cython numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install scipy; fi
fi
pip install matplotlib pytest
set -o pipefail
if [ "${USE_WHEEL}" == "1" ]; then
pip wheel . -v
pip install pywavelets*.whl -v
elif [ "${USE_SDIST}" == "1" ]; then
python -m build --sdist
pip install pywavelets* -v
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
pip install sphinx numpydoc
pip install . -v
else
pip install . -v
fi
- name: Run tests
env:
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
run: |
# Move out of source directory to avoid finding local pywt
pushd demo
if [ "${USE_WHEEL}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${USE_SDIST}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
python util/refguide_check.py --doctests
else
pytest --pyargs pywt
fi
popd
# Move out of source directory to avoid finding local pywt
pushd demo
if [ "${USE_WHEEL}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${USE_SDIST}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
python util/refguide_check.py --doctests
else
pytest --pyargs pywt
fi
popd
Loading

0 comments on commit 22e4bea

Please sign in to comment.