Skip to content

Commit 5bbfb2c

Browse files
committed
Revert "MAINT: configure pre-commit, run hooks, and fix lint/format issues"
This reverts commit 481a06a.
1 parent 48e8b52 commit 5bbfb2c

28 files changed

+685
-858
lines changed

.github/workflows/docs.yml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
name: Build & Deploy Docs
22

3-
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
8-
workflow_dispatch:
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
99

1010
jobs:
11-
# Build the docs
12-
docs-build:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v4
16-
- name: Set up Python 3.12
17-
uses: actions/setup-python@v5
18-
with:
19-
python-version: "3.12"
20-
cache: "pip"
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
python -m pip install -e '.[doc]'
25-
26-
- name: Build Docs
27-
run: |
28-
sphinx-build -b html docs/ docs/build/
29-
30-
- name: Upload Artifact
31-
uses: actions/upload-artifact@v4
32-
with:
33-
name: docs-build
34-
path: docs/build/
35-
36-
# Deploy the docs to GitHub Pages
37-
docs-deploy:
38-
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
39-
runs-on: ubuntu-latest
40-
needs: docs-build
41-
42-
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
43-
permissions:
44-
contents: write
45-
pages: write
46-
47-
steps:
48-
- uses: actions/checkout@v4
49-
- name: Download Artifact
50-
uses: actions/download-artifact@v4
51-
with:
52-
name: docs-build
53-
path: docs/build/
54-
55-
- name: Deploy to GitHub pages
56-
uses: JamesIves/github-pages-deploy-action@v4
57-
with:
58-
folder: docs/build/
11+
# Build the docs
12+
docs-build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Python 3.12
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
cache: 'pip'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install -e '.[doc]'
25+
26+
- name: Build Docs
27+
run: |
28+
sphinx-build -b html docs/ docs/build/
29+
30+
- name: Upload Artifact
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: docs-build
34+
path: docs/build/
35+
36+
# Deploy the docs to GitHub Pages
37+
docs-deploy:
38+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
39+
runs-on: ubuntu-latest
40+
needs: docs-build
41+
42+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
43+
permissions:
44+
contents: write
45+
pages: write
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
- name: Download Artifact
50+
uses: actions/download-artifact@v4
51+
with:
52+
name: docs-build
53+
path: docs/build/
54+
55+
- name: Deploy to GitHub pages
56+
uses: JamesIves/github-pages-deploy-action@v4
57+
with:
58+
folder: docs/build/

.github/workflows/pip.yml

Lines changed: 72 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -5,84 +5,85 @@ name: pip
55

66
on:
77
push:
8-
branches: [main]
8+
branches: [ main ]
99
pull_request:
10-
branches: [main]
10+
branches: [ main ]
1111

1212
jobs:
1313
build:
14+
1415
runs-on: ${{ matrix.os }}
1516
strategy:
1617
matrix:
17-
python-version: ["3.11", "3.12"]
18-
numpy: ['"numpy<2.0"', "numpy"]
19-
os: [ubuntu-latest]
18+
python-version: ['3.11', '3.12']
19+
numpy: ['"numpy<2.0"', 'numpy']
20+
os: [ubuntu-latest]
2021
pytest: [pytest]
21-
pre: ["", "--pre"]
22+
pre: ['', '--pre']
2223

2324
steps:
24-
# actions/setup-python@v5 has built-in functionality for caching and restoring dependencies.
25-
- uses: actions/checkout@v4
26-
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v5
28-
with:
29-
python-version: ${{ matrix.python-version }}
30-
cache: "pip" # caching pip dependencies
31-
32-
# Install numpy and pytest
33-
- name: Install core dependencies
34-
run: |
35-
python -m pip install --upgrade pip
36-
python -m pip install ${{matrix.pytest}} ${{matrix.pre}}
37-
python -m pip install -e . ${{matrix.pre}}
38-
python -m pip install ${{matrix.numpy}} ${{matrix.pre}}
39-
40-
- name: Echo versions
41-
run: |
42-
python -m pytest --version
43-
python -c"import numpy; print(f'{numpy.__version__ = }')"
44-
45-
# Run self-tests without Scipy and MPL
46-
# Tests that require Scipy and MPL will be skipped
47-
- name: Self-test without SciPy and MPL
48-
run: |
49-
pytest --pyargs scipy_doctest -v
50-
51-
- name: Self-test CLI without SciPy and MPL
52-
run: |
53-
python -m scipy_doctest scipy_doctest/tests/finder_cases.py -vv
54-
55-
# Install Scipy and MPL
56-
- name: Install optional dependencies
57-
run: |
58-
python -m pip install -e '.[test]'
59-
60-
# Tests that require Scipy and MPL can now run
61-
- name: Self-test with SciPy and MPL
62-
run: |
63-
pytest --pyargs scipy_doctest -v
64-
65-
- name: Self-test CLI with SciPy and MPL
66-
run: |
67-
python -m scipy_doctest scipy_doctest/tests/finder_cases.py -vv
68-
69-
- name: Test testfile CLI
70-
run: |
71-
python -m scipy_doctest ./scipy_doctest/tests/scipy_ndimage_tutorial_clone.rst -v
72-
73-
- name: Run testmod a scipy submodule
74-
run: |
75-
python -c'from scipy.linalg import _basic; from scipy_doctest import testmod; testmod(_basic, verbose=True)'
76-
77-
- name: Run testmod a scipy submodule -- Public API onlly
78-
run: |
79-
python -m pip install pooch
80-
python -c'from scipy import ndimage; from scipy_doctest import testmod; testmod(ndimage, verbose=True, strategy="api")'
81-
82-
- name: Test pytest plugin
83-
# This test will fail in a venv where scipy_doctest has not been installed and the plugin has not been activated
84-
run: |
85-
test_files=("scipy_doctest/tests/module_cases.py" "scipy_doctest/tests/stopwords_cases.py" "scipy_doctest/tests/local_file_cases.py")
86-
for file in "${test_files[@]}"; do
87-
python -m pytest "${file}" --doctest-modules
88-
done
25+
# actions/setup-python@v5 has built-in functionality for caching and restoring dependencies.
26+
- uses: actions/checkout@v4
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
cache: 'pip' # caching pip dependencies
32+
33+
# Install numpy and pytest
34+
- name: Install core dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
python -m pip install ${{matrix.pytest}} ${{matrix.pre}}
38+
python -m pip install -e . ${{matrix.pre}}
39+
python -m pip install ${{matrix.numpy}} ${{matrix.pre}}
40+
41+
- name: Echo versions
42+
run: |
43+
python -m pytest --version
44+
python -c"import numpy; print(f'{numpy.__version__ = }')"
45+
46+
# Run self-tests without Scipy and MPL
47+
# Tests that require Scipy and MPL will be skipped
48+
- name: Self-test without SciPy and MPL
49+
run: |
50+
pytest --pyargs scipy_doctest -v
51+
52+
- name: Self-test CLI without SciPy and MPL
53+
run: |
54+
python -m scipy_doctest scipy_doctest/tests/finder_cases.py -vv
55+
56+
# Install Scipy and MPL
57+
- name: Install optional dependencies
58+
run: |
59+
python -m pip install -e '.[test]'
60+
61+
# Tests that require Scipy and MPL can now run
62+
- name: Self-test with SciPy and MPL
63+
run: |
64+
pytest --pyargs scipy_doctest -v
65+
66+
- name: Self-test CLI with SciPy and MPL
67+
run: |
68+
python -m scipy_doctest scipy_doctest/tests/finder_cases.py -vv
69+
70+
- name: Test testfile CLI
71+
run: |
72+
python -m scipy_doctest ./scipy_doctest/tests/scipy_ndimage_tutorial_clone.rst -v
73+
74+
- name: Run testmod a scipy submodule
75+
run: |
76+
python -c'from scipy.linalg import _basic; from scipy_doctest import testmod; testmod(_basic, verbose=True)'
77+
78+
- name: Run testmod a scipy submodule -- Public API onlly
79+
run: |
80+
python -m pip install pooch
81+
python -c'from scipy import ndimage; from scipy_doctest import testmod; testmod(ndimage, verbose=True, strategy="api")'
82+
83+
- name: Test pytest plugin
84+
# This test will fail in a venv where scipy_doctest has not been installed and the plugin has not been activated
85+
run: |
86+
test_files=("scipy_doctest/tests/module_cases.py" "scipy_doctest/tests/stopwords_cases.py" "scipy_doctest/tests/local_file_cases.py")
87+
for file in "${test_files[@]}"; do
88+
python -m pytest "${file}" --doctest-modules
89+
done

0 commit comments

Comments
 (0)