Skip to content

Commit

Permalink
BREAK!: drop Python 3.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Nov 8, 2023
1 parent 8ebaccf commit ba70ddc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 273 deletions.
250 changes: 0 additions & 250 deletions .constraints/py3.7.txt

This file was deleted.

4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ repos:
hooks:
- id: nbqa-pyupgrade
args:
- --py37-plus
- --py38-plus
- id: nbqa-ruff
args:
- --fix
Expand Down Expand Up @@ -161,7 +161,7 @@ repos:
hooks:
- id: pyupgrade
args:
- --py37-plus
- --py38-plus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
Expand Down
9 changes: 2 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@
import sys

import requests

if sys.version_info < (3, 8):
from importlib_metadata import PackageNotFoundError
from importlib_metadata import version as get_package_version
else:
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as get_package_version
from importlib_metadata import PackageNotFoundError
from importlib_metadata import version as get_package_version

# -- Project information -----------------------------------------------------
project = "TensorWaves"
Expand Down
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python",
Expand Down Expand Up @@ -47,7 +46,7 @@ keywords = [
license = {text = "GPLv3 or later"}
maintainers = [{email = "[email protected]"}]
name = "tensorwaves"
requires-python = ">=3.7"
requires-python = ">=3.8"

[project.optional-dependencies]
all = [
Expand Down Expand Up @@ -84,7 +83,6 @@ doc = [
"sphinx-togglebutton",
"sphobjinv",
"tensorwaves[all]",
'importlib-metadata; python_version <"3.8.0"',
]
format = [
"black",
Expand All @@ -100,7 +98,6 @@ jupyter = [
"jupyterlab-myst",
"python-lsp-server[rope]",
"tensorwaves[doc]",
'ypy-websocket <0.8.3; python_version <"3.8.0"',
]
lint = [
"ruff",
Expand All @@ -126,7 +123,6 @@ phasespace = [
phsp = [
"phasespace[tf] >=1.7.0",
"tensorwaves[tensorflow]",
'phasespace <1.9.0; python_version <"3.8.0"',
]
pwa = [
"ampform >=0.12.0", # https://github.com/ComPWA/ampform/pull/177
Expand All @@ -150,7 +146,6 @@ test = [
"pytest-cov",
"pytest-xdist",
"tensorwaves[test-types]",
'nbmake <1.3; python_version <"3.8.0"',
]
test-types = [
"ipython", # test _repr_pretty_
Expand Down Expand Up @@ -207,7 +202,6 @@ preview = true
target-version = [
"py310",
"py311",
"py37",
"py38",
"py39",
]
Expand Down Expand Up @@ -399,7 +393,7 @@ src = [
"src",
"tests",
]
target-version = "py37"
target-version = "py38"
task-tags = ["cspell"]

[tool.ruff.per-file-ignores]
Expand Down
7 changes: 1 addition & 6 deletions tests/function/test_sympy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import logging
import sys
from typing import TYPE_CHECKING

import numpy as np
Expand Down Expand Up @@ -117,11 +116,7 @@ def test_fast_lambdify(backend: str, max_complexity: int, use_cse: bool):
# cspell:ignore lambdifygenerated
repr_start = "<function _lambdifygenerated"
if backend == "jax":
if sys.version_info < (3, 8):
repr_start = "<CompiledFunction of " + repr_start
else:
repr_start = "<PjitFunction of " + repr_start
# cspell:ignore Pjit
repr_start = "<CompiledFunction of " + repr_start
assert func_repr.startswith(repr_start)

data = (
Expand Down

1 comment on commit ba70ddc

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'TensorWaves benchmark results'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: ba70ddc Previous: aa36e66 Ratio
benchmarks/ampform.py::TestJPsiToGammaPiPi::test_data[10000-tf] 0.19134408441848405 iter/sec (stddev: 0) 0.3904975984805703 iter/sec (stddev: 0) 2.04
benchmarks/expression.py::test_fit[1000-Minuit2-jax] 4.404064369019094 iter/sec (stddev: 0.005880327465985419) 9.352295111672042 iter/sec (stddev: 0.0005659957504415581) 2.12
benchmarks/expression.py::test_fit[1000-Minuit2-numpy] 4.6200482014987845 iter/sec (stddev: 0.006175329317539724) 9.772740356648908 iter/sec (stddev: 0.0013011033495843871) 2.12
benchmarks/expression.py::test_fit[1000-Minuit2-numba] 4.807061265346704 iter/sec (stddev: 0.00868956331926646) 9.838227327021672 iter/sec (stddev: 0.0020212336935661233) 2.05
benchmarks/expression.py::test_fit[1000-Minuit2-tf] 0.645722432114544 iter/sec (stddev: 0.026417597354140062) 1.2942062651987425 iter/sec (stddev: 0.0019623407254366334) 2.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.