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

build: drop support for python 3.8 #572

Merged
merged 6 commits into from
Sep 26, 2023
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
5 changes: 1 addition & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@ jobs:
- ubuntu-latest
- windows-latest
tox_env:
- py38
- py39
- py310
- py311
include:
- tox_env: py38
python: "3.8"
- tox_env: py39
python: "3.9"
- tox_env: py310
Expand Down Expand Up @@ -104,7 +101,7 @@ jobs:
- name: Install base python for tox
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"
- name: Install tox
run: python -m pip install tox
- name: Setup test environment
Expand Down
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ repos:
rev: v3.1.0
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v3.13.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.11.0
hooks:
- id: reorder-python-imports
args: [--application-directories=src, --py38-plus]
args: [--application-directories=src, --py39-plus]
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.11.0
hooks:
Expand Down Expand Up @@ -62,7 +61,7 @@ repos:
- id: nbqa-isort
args: ["--float-to-top"]
- id: nbqa-pyupgrade
args: ["--py38-plus"]
args: ["--py39-plus"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ If you add a new feature, please also include appropriate tests to verify its in
functionality. We try to keep our code coverage close to 100%.

It is possible to limit the scope of testing to specific environments and files. For example, to
only test event related functionality using the Python 3.8 environment use:
only test event related functionality using the Python 3.9 environment use:
```bash
tox -e py38 tests/events
tox -e py39 tests/events
```


Expand Down
4 changes: 2 additions & 2 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ unsafe-load-any-extension=no
extension-pkg-allow-list=

# Minimum supported python version
py-version = 3.8.0
py-version = 3.9.0

# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
Expand Down Expand Up @@ -520,7 +520,7 @@ overgeneral-exceptions=builtins.Exception
# **exclusively** for type checking of an application, you're probably fine.
# For libraries, evaluate if some users what to access the type hints at
# runtime first, e.g., through ``typing.get_type_hints``. Applies to Python
# versions 3.8 - 3.10
# versions 3.9 - 3.11
runtime-typing = no


Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta"
name = "pymovements"
description = "A python package for processing eye movement data"
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = {text = "MIT License"}
maintainers = [
{name = "Daniel Krakowczyk", email = "[email protected]"}
Expand All @@ -24,7 +24,6 @@ classifiers = [
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
3 changes: 1 addition & 2 deletions src/pymovements/dataset/dataset_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"""DatasetLibrary module."""
from __future__ import annotations

from typing import Type
from typing import TypeVar

from pymovements.dataset.dataset_definition import DatasetDefinition
Expand Down Expand Up @@ -60,7 +59,7 @@ def get(cls, name: str) -> type[DatasetDefinition]:
return cls.definitions[name]


DatsetDefinitionClass = TypeVar('DatsetDefinitionClass', bound=Type[DatasetDefinition])
DatsetDefinitionClass = TypeVar('DatsetDefinitionClass', bound=type[DatasetDefinition])


def register_dataset(cls: DatsetDefinitionClass) -> DatsetDefinitionClass:
Expand Down
2 changes: 1 addition & 1 deletion src/pymovements/gaze/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"""Module for py:func:`pymovements.gaze.transforms."""
from __future__ import annotations

from collections.abc import Callable
from functools import partial
from typing import Any
from typing import Callable
from typing import TypeVar

import numpy as np
Expand Down
8 changes: 3 additions & 5 deletions src/pymovements/plotting/traceplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
from __future__ import annotations

import sys
from typing import Dict
from collections.abc import Sequence
from typing import Literal
from typing import Sequence
from typing import Tuple

import matplotlib.colors
import matplotlib.pyplot as plt
Expand All @@ -42,8 +40,8 @@
if 'pytest' in sys.modules: # pragma: no cover
matplotlib.use('Agg')

LinearSegmentedColormapType: TypeAlias = Dict[
Literal['red', 'green', 'blue', 'alpha'], Sequence[Tuple[float, ...]],
LinearSegmentedColormapType: TypeAlias = dict[
Literal['red', 'green', 'blue', 'alpha'], Sequence[tuple[float, ...]],
]

DEFAULT_SEGMENTDATA: LinearSegmentedColormapType = {
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
isolated_build = True
skip_missing_interpreters = True
envlist =
py38
py39
py310
py311
Expand Down