Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.6 and add Python 3.10 support #181

Merged
merged 8 commits into from
Mar 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
max-parallel: 12 # All in parallel.
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.7", "3.8", "3.9", "3.10"]
exclude:
# To cut down on runtime since Mac seems to take the longest.
- os: macos-latest
python-version: 3.7
python-version: "3.8"
- os: macos-latest
python-version: 3.8
python-version: "3.9"
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -39,22 +39,14 @@ jobs:
run: >
pytest tests/archives tests/emitters tests/optimizers
tests/factory_test.py
# Extras are not tested on 3.6 because matplotlib 3.4.0, which was used to
# generate the reference images in the repo, is not available for 3.6.
- name: Install extras deps
run: pip install .[all]
if: ${{ matrix.python-version != '3.6' }}
- name: Test extras
run: pytest tests/visualize_test.py
if: ${{ matrix.python-version != '3.6' }}
pin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: "3.7"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install core deps
Expand All @@ -74,7 +66,7 @@ jobs:
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: "3.7"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install deps
Expand All @@ -90,7 +82,7 @@ jobs:
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: "3.7"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install deps
Expand All @@ -104,7 +96,7 @@ jobs:
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: "3.7"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install deps
Expand All @@ -118,7 +110,7 @@ jobs:
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: "3.7"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install deps
Expand All @@ -134,7 +126,7 @@ jobs:
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: "3.7"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Ready to contribute? Here's how to set up pyribs for local development.

```bash
cd pyribs
conda create --prefix ./env python=3.6 # 3.6 is the minimum version pyribs supports.
conda create --prefix ./env python=3.7 # 3.7 is the minimum version pyribs supports.
conda activate ./env
pip install -e .[all]
pip install -e .[dev]
Expand Down Expand Up @@ -115,7 +115,7 @@ Before submitting a pull request, check that it meets these guidelines:
1. The pull request should include tests.
1. If the pull request adds functionality, corresponding docstrings and other
documentation should be updated.
1. The pull request should work for Python 3.6 and higher. GitHub Actions will
1. The pull request should work for Python 3.7 and higher. GitHub Actions will
display test results at the bottom of the pull request page. Check there for
test results.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ For more information, refer to the [documentation](https://docs.pyribs.org/).

## Installation

pyribs supports Python 3.6-3.9. Earlier Python versions may work but are not
pyribs supports Python 3.7-3.10. Earlier Python versions may work but are not
officially supported.

To install from PyPI, run
Expand Down
4 changes: 2 additions & 2 deletions pinned_reqs/extras_all.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The reference images in the repo were created with Matplotlib 3.4.0 -- images
# The reference images in the repo were created with Matplotlib 3.5.1 -- images
# created with earlier versions are slightly different.
matplotlib==3.4.0
matplotlib==3.5.1
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"yapf",

# Testing
"pytest==6.1.2",
"pytest-cov==2.10.1",
"pytest-benchmark==3.2.3",
"pytest-xdist==2.1.0",
"pytest==7.0.1",
"pytest-cov==3.0.0",
"pytest-benchmark==3.4.1",
"pytest-xdist==2.5.0",

# Documentation
"Sphinx==3.2.1",
Expand Down Expand Up @@ -76,10 +76,10 @@
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
Expand All @@ -95,7 +95,7 @@
keywords="ribs",
name="ribs",
packages=find_packages(include=["ribs", "ribs.*"]),
python_requires=">=3.6.0",
python_requires=">=3.7.0",
test_suite="tests",
url="https://github.com/icaros-usc/pyribs",
version="0.4.0",
Expand Down
Binary file modified tests/baseline_images/visualize_test/cvt_archive_heatmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/visualize_test/cvt_archive_heatmap_long.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/visualize_test/grid_archive_heatmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/visualize_test/parallel_axes_2d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/visualize_test/parallel_axes_3d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/visualize_test/parallel_axes_3d_sorted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/visualize_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
``test_cvt_archive_heatmap_with_samples``, run::

cp result_images/visualize_test/cvt_archive_heatmap_with_samples.png \
tests/extras/baseline_images/visualize_test/
tests/baseline_images/visualize_test/

Assuming the output is as expected (and assuming the code is deterministic), the
test should now pass when it is re-run.
Expand Down