Skip to content

Commit

Permalink
Upgrade CI (#349)
Browse files Browse the repository at this point in the history
## Description

<!-- Provide a brief description of the PR's purpose here. -->

Miscellaneous upgrades to pyribs CI

## TODO

<!-- Notable points that this PR has either accomplished or will
accomplish. -->

- [x] Upgrade actions/checkout to v3
- [x] Add semantic-version to pinned reqs
- [x] Don't ignore test images
- [x] Update visualize CI
- [x] Rearrange visualize tests
- [x] Ignore Python 3.10 testing on Mac
- [x] Upgrade tutorial python to 3.10
- [x] Note python 3.10

## Questions

<!-- Any concerns or points of confusion? -->

## Status

- [x] I have read the guidelines in
[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [N/A] I have added a one-line description of my change to the
changelog in `HISTORY.md`
- [x] This PR is ready to go
  • Loading branch information
btjanaka committed Sep 2, 2023
1 parent e039862 commit dbcf604
Show file tree
Hide file tree
Showing 48 changed files with 19 additions and 14 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:
python-version: "3.8"
- os: macos-latest
python-version: "3.9"
- os: macos-latest
python-version: "3.10"
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand All @@ -43,7 +44,7 @@ jobs:
pin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
Expand All @@ -58,11 +59,11 @@ jobs:
- name: Install extras deps
run: pip install -r pinned_reqs/extras_visualize.txt
- name: Test extras
run: pytest tests/visualize_test.py
run: pytest tests/visualize
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
Expand All @@ -78,7 +79,7 @@ jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
Expand All @@ -92,7 +93,7 @@ jobs:
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
Expand All @@ -106,11 +107,12 @@ jobs:
tutorials:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
# We use Python 3.10 instead of 3.8 here since Google Colab uses 3.10.
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.7"
python-version: "3.10"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install deps
Expand All @@ -120,7 +122,7 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
Expand All @@ -136,7 +138,7 @@ jobs:
needs: [test, pin, coverage, benchmarks, examples, tutorials]
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,15 @@ ENV/
*.pth
MNIST/
dask-worker-space/
!tests/baseline_images/visualize_test/*
!docs/_static/**/*
!tutorials/_static/**/*
!tutorials/mnist/*
!readme_assets/*
results/

# Allow matplotlib baseline images.
!tests/**/*.png

# Editor, IDE, and OS settings
.vscode/
.*.swp
Expand Down
1 change: 1 addition & 0 deletions pinned_reqs/install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ sortedcontainers==2.0.0
scikit-learn==0.20.0
scipy==1.4.0
threadpoolctl==3.0.0
semantic-version==2.10
Empty file added tests/visualize/__init__.py
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
https://matplotlib.org/3.3.1/devel/testing.html#writing-an-image-comparison-test.
Essentially, after running a new test for the first time in the _root_ directory
of this repo, copy the image output from result_images/visualize_test to
tests/extras/baseline_images/visualize_test. For instance, for
tests/visualize/baseline_images/visualize_test. For instance, for
``test_cvt_archive_heatmap_with_samples``, run::
cp result_images/visualize_test/cvt_archive_heatmap_with_samples.png \
Expand Down

0 comments on commit dbcf604

Please sign in to comment.