Skip to content

Commit

Permalink
Test support for Python 3.10 (#14)
Browse files Browse the repository at this point in the history
* Add support for Python 3.10

* Fix Python 3.10 version number in CI

* Add pip and wheel installation/upgrade in CI

* Drop support for Python 3.6

It otherwise makes Poetry install a previous version of NumPy, which is incompatible with 3.10.

* Fix publish action syntax error

* Update the Poetry version in CI

* Update the Poetry version in CI
  • Loading branch information
bryant1410 authored Oct 6, 2021
1 parent 057bbe8 commit fdc3091
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, '3.10']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install the latest Pip and Wheel
run: pip install --upgrade pip wheel
- name: Set up Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.1.11 # Previous versions give an error with Python 3.10.
- name: Check package setup
run: poetry check
- name: Install dependencies
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry wheel
python-version: 3.x
- name: Install the latest Pip and Wheel
run: pip install --upgrade pip wheel
- name: Set up Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.1.11 # Previous versions give an error with Python 3.10.
- name: Build and publish
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry publish --build
run: poetry publish --build
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"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 :: Artificial Intelligence",
]

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.7"
numpy = "*"

[tool.poetry.dev-dependencies]
Expand Down

0 comments on commit fdc3091

Please sign in to comment.