Skip to content

Commit

Permalink
Add support for Python 3.10, 3.11 and 3.12 (#219)
Browse files Browse the repository at this point in the history
* Add support for python 3.10, 3.11, 3.12

* Update dev dependencies to avoid broken pyyaml

* Update pytest command

* Remove conda pip from workflow

* Try fix tests

* Cache cursor

* Fix setup
  • Loading branch information
rbaltrusch authored May 26, 2024
1 parent 21b944c commit 8ea0f0b
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 101 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -17,9 +17,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install pylint
pip install -e .
pip install -r requirements.txt
- name: Analysing the code with pylint
run: |
pylint desktop_shop -d=consider-using-f-string,duplicate-code --fail-under=9.75
20 changes: 6 additions & 14 deletions .github/workflows/pytest-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,28 @@ name: Unit tests
on: [push]

jobs:
build-linux:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name test-env
- name: Install desktop_shop
run: |
conda install pip
python -m pip install --upgrade pip
pip install setuptools
pip install -e .
- name: Install test dependencies
# sudo apt-get install xvfb x11-utils gnumeric required for gui tests running in headless mode
run: |
conda install pip
pip install -r dev-requirements.txt
sudo apt-get install xvfb x11-utils gnumeric
- name: Test with pytest
working-directory: tests
run: |
python run_tests.py --all --no-report
pytest .
7 changes: 1 addition & 6 deletions dev-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ mypy
# https://github.com/python/typeshed/tree/master/stubs

# Linting.
flake8
flake8-bugbear
flake8-broken-line
flake8-comprehensions
pep8-naming
pylint

# Formatting.
black
isort

# Documentation.
mkdocs-material
Expand Down
187 changes: 108 additions & 79 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,166 +1,187 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile dev-requirements.in
#
attrs==21.4.0
# via flake8-bugbear
astroid==3.2.2
# via pylint
astunparse==1.6.3
# via griffe
babel==2.15.0
# via mkdocs-material
beautifulsoup4==4.12.2
# via
# -c requirements.txt
# mkdocs-htmlproofer-plugin
black==24.1.1
black==24.4.2
# via -r dev-requirements.in
certifi==2021.10.8
cachetools==5.3.3
# via tox
certifi==2024.2.2
# via requests
charset-normalizer==2.0.12
chardet==5.2.0
# via tox
charset-normalizer==3.3.2
# via requests
click==8.0.4
click==8.1.7
# via
# black
# mkdocs
# mkdocstrings
colorama==0.4.6
# via mkdocs-material
coverage[toml]==6.3.2
# via
# coverage
# pytest-cov
distlib==0.3.4
# click
# griffe
# mkdocs
# mkdocs-material
# pylint
# pytest
# tox
coverage[toml]==7.5.2
# via pytest-cov
dill==0.3.8
# via pylint
distlib==0.3.8
# via virtualenv
exceptiongroup==1.1.3
exceptiongroup==1.2.1
# via pytest
filelock==3.6.0
filelock==3.14.0
# via
# tox
# virtualenv
flake8==4.0.1
# via
# -r dev-requirements.in
# flake8-broken-line
# flake8-bugbear
# flake8-comprehensions
# pep8-naming
flake8-broken-line==0.5.0
# via -r dev-requirements.in
flake8-bugbear==23.2.13
# via -r dev-requirements.in
flake8-comprehensions==3.10.0
# via -r dev-requirements.in
ghp-import==2.0.2
ghp-import==2.1.0
# via mkdocs
griffe==0.12.6
griffe==0.45.2
# via mkdocstrings-python
idna==3.3
idna==3.7
# via requests
importlib-metadata==6.8.0
importlib-metadata==7.1.0
# via
# markdown
# mkdocs
iniconfig==1.1.1
# mkdocs-get-deps
# mkdocstrings
iniconfig==2.0.0
# via pytest
isort==5.10.1
# via -r dev-requirements.in
jinja2==3.0.3
isort==5.13.2
# via pylint
jinja2==3.1.4
# via
# mkdocs
# mkdocs-material
# mkdocstrings
markdown==3.3.6
markdown==3.6
# via
# mkdocs
# mkdocs-autorefs
# mkdocs-htmlproofer-plugin
# mkdocs-material
# mkdocstrings
# pymdown-extensions
markupsafe==2.1.0
markupsafe==2.1.5
# via
# jinja2
# mkdocs
# mkdocs-autorefs
# mkdocstrings
mccabe==0.6.1
# via flake8
mccabe==0.7.0
# via pylint
mergedeep==1.3.4
# via mkdocs
mkdocs==1.4.2
# via
# mkdocs
# mkdocs-get-deps
mkdocs==1.6.0
# via
# mkdocs-autorefs
# mkdocs-gen-files
# mkdocs-htmlproofer-plugin
# mkdocs-literate-nav
# mkdocs-material
# mkdocstrings
mkdocs-autorefs==0.3.1
mkdocs-autorefs==1.0.1
# via mkdocstrings
mkdocs-gen-files==0.5.0
# via -r dev-requirements.in
mkdocs-htmlproofer-plugin==0.13.1
mkdocs-get-deps==0.2.0
# via mkdocs
mkdocs-htmlproofer-plugin==1.2.1
# via -r dev-requirements.in
mkdocs-literate-nav==0.5.0
mkdocs-literate-nav==0.6.1
# via -r dev-requirements.in
mkdocs-material==9.1.20
mkdocs-material==9.5.24
# via -r dev-requirements.in
mkdocs-material-extensions==1.1.1
mkdocs-material-extensions==1.3.1
# via mkdocs-material
mkdocstrings[python]==0.19.0
mkdocstrings[python]==0.25.1
# via
# -r dev-requirements.in
# mkdocstrings-python
mkdocstrings-python==0.6.3
mkdocstrings-python==1.10.3
# via mkdocstrings
mypy==1.8.0
mypy==1.10.0
# via -r dev-requirements.in
mypy-extensions==1.0.0
# via
# black
# mypy
packaging==23.2
packaging==24.0
# via
# black
# mkdocs
# pyproject-api
# pytest
# tox
pathspec==0.9.0
# via black
pep8-naming==0.13.2
# via -r dev-requirements.in
platformdirs==2.5.1
paginate==0.5.6
# via mkdocs-material
pathspec==0.12.1
# via
# black
# mkdocs
platformdirs==4.2.2
# via
# black
# mkdocs-get-deps
# mkdocstrings
# pylint
# tox
# virtualenv
pluggy==1.4.0
pluggy==1.5.0
# via
# pytest
# tox
py==1.11.0
# via tox
pycodestyle==2.8.0
# via flake8
pyflakes==2.4.0
# via flake8
pygments==2.14.0
pygments==2.18.0
# via mkdocs-material
pymdown-extensions==9.9.2
pylint==3.2.2
# via -r dev-requirements.in
pymdown-extensions==10.8.1
# via
# mkdocs-material
# mkdocstrings
pytest==8.0.0
pyproject-api==1.6.1
# via tox
pytest==8.2.1
# via
# -r dev-requirements.in
# pytest-cov
pytest-cov==4.0.0
pytest-cov==5.0.0
# via -r dev-requirements.in
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via ghp-import
pytz==2024.1
# via babel
pyvirtualdisplay==3.0
# via -r dev-requirements.in
pyyaml==6.0
# see https://github.com/yaml/pyyaml/issues/724
pyyaml==5.3.1
# via
# mkdocs
# mkdocs-get-deps
# pymdown-extensions
# pyyaml-env-tag
pyyaml-env-tag==0.1
# via mkdocs
regex==2022.10.31
regex==2024.5.15
# via mkdocs-material
requests==2.30.0
# via
Expand All @@ -169,29 +190,37 @@ requests==2.30.0
# mkdocs-material
six==1.16.0
# via
# astunparse
# python-dateutil
# tox
# virtualenv
soupsieve==2.3.1
soupsieve==2.5
# via beautifulsoup4
tomli==2.0.1
# via
# black
# coverage
# mypy
# pylint
# pyproject-api
# pytest
# tox
tox==3.27.1
tomlkit==0.12.5
# via pylint
tox==4.15.0
# via -r dev-requirements.in
typing-extensions==4.1.1
typing-extensions==4.12.0
# via
# astroid
# black
# mkdocstrings
# mypy
urllib3==1.26.8
# pylint
urllib3==2.2.1
# via requests
virtualenv==20.13.1
virtualenv==20.26.2
# via tox
watchdog==2.1.6
watchdog==4.0.1
# via mkdocs
zipp==3.17.0
wheel==0.43.0
# via astunparse
zipp==3.18.2
# via importlib-metadata
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Desktop Environment",
"Topic :: Education",
"Topic :: Education :: Testing",
Expand Down
Loading

0 comments on commit 8ea0f0b

Please sign in to comment.