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 8c1982c commit 7daa6ac
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 271 deletions.
236 changes: 0 additions & 236 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 @@ -43,7 +43,7 @@ repos:
hooks:
- id: nbqa-pyupgrade
args:
- --py37-plus
- --py38-plus
- id: nbqa-ruff
args:
- --fix
Expand Down Expand Up @@ -112,7 +112,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
11 changes: 3 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
from __future__ import annotations

import contextlib
import os
import shutil
import subprocess
import sys
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as get_package_version

import requests
from pybtex.plugin import register_plugin

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

sys.path.insert(0, os.path.abspath("."))
import contextlib

from _relink_references import relink_references
from _unsrt_et_al import MyStyle
Expand Down
14 changes: 4 additions & 10 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 All @@ -31,13 +30,12 @@ dependencies = [
"cloudpickle",
"sympy >=1.10", # module sympy.printing.numpy and array expressions with shape kwarg
"tensorwaves[jax]",
'typing-extensions; python_version <"3.8.0"',
]
description = "Symbolic expressions for Dalitz-Plot Decomposition"
dynamic = ["version"]
license = {text = "GPLv3 or later"}
name = "ampform-dpd"
requires-python = ">=3.7"
requires-python = ">=3.8"

[project.optional-dependencies]
dev = [
Expand All @@ -62,7 +60,6 @@ doc = [
"sphinxcontrib-bibtex",
"tensorwaves[phsp]",
"tqdm",
'importlib-metadata; python_version <"3.8.0"',
]
format = [
"black",
Expand All @@ -77,7 +74,6 @@ jupyter = [
"jupyterlab-lsp",
"jupyterlab-myst",
"python-lsp-server[rope]",
'ypy-websocket <0.8.3; python_version <"3.8.0"',
]
lint = [
"ruff",
Expand All @@ -103,7 +99,6 @@ test = [
"pytest >=6.0", # pyproject.toml
"pytest-cov",
"pytest-xdist",
'nbmake <1.3; python_version <"3.8.0"',
]
tf = [
"tensorwaves[tf]",
Expand Down Expand Up @@ -152,7 +147,6 @@ preview = true
target-version = [
"py310",
"py311",
"py37",
"py38",
"py39",
]
Expand Down Expand Up @@ -253,7 +247,7 @@ extend-select = [
"YTT",
]
ignore = [
"B028", # missing explicit stacklevel keyword
"B028",
"C408",
"D101",
"D102",
Expand All @@ -266,7 +260,7 @@ ignore = [
"D416",
"E501",
"ISC003",
"PLR0913", # sympy class
"PLR0913",
"S301",
"SIM108",
]
Expand All @@ -275,7 +269,7 @@ src = [
"src",
"tests",
]
target-version = "py37"
target-version = "py38"
task-tags = ["cspell"]

[tool.ruff.pep8-naming]
Expand Down
10 changes: 2 additions & 8 deletions src/ampform_dpd/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# cspell:ignore msigma
from __future__ import annotations

import sys
from functools import lru_cache
from itertools import product
from typing import Literal, Protocol

import sympy as sp
from ampform.sympy import PoolSum
Expand All @@ -13,6 +13,7 @@
from sympy.physics.quantum.spin import CG, WignerD
from sympy.physics.quantum.spin import Rotation as Wigner

from ampform_dpd.angles import formulate_scattering_angle, formulate_zeta_angle
from ampform_dpd.decay import (
IsobarNode,
LSCoupling,
Expand All @@ -23,13 +24,6 @@
)
from ampform_dpd.spin import create_spin_range

from .angles import formulate_scattering_angle, formulate_zeta_angle

if sys.version_info < (3, 8):
from typing_extensions import Literal, Protocol
else:
from typing import Literal, Protocol


@frozen
class AmplitudeModel:
Expand Down
Loading

0 comments on commit 7daa6ac

Please sign in to comment.