Skip to content

Commit

Permalink
build: support only python 3.11 and higher
Browse files Browse the repository at this point in the history
  • Loading branch information
MyPyDavid committed Oct 29, 2023
1 parent 81c90b7 commit 5c5f359
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [3.8, 3.9, "3.10", 3.11]
python-version: [3.11, 3.12]


steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# windows-latest !=> gives error in 'if' statetement
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.11", "3.12"]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ classifiers = [
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
Expand Down
8 changes: 4 additions & 4 deletions src/raman_fitting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@
# add the handlers to the logger
logger.addHandler(ch)

# This code is written for Python 3.
if sys.version_info.major < 3 and sys.version_info.minor < 7:
logger.error(f"{__package_name__} requires Python 3.7 or higher.")
# This code is written for Python 3.11 and higher
if sys.version_info.major < 3 and sys.version_info.minor < 11:
logger.error(f"{__package_name__} requires Python 3.11 or higher.")

Check warning on line 69 in src/raman_fitting/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/raman_fitting/__init__.py#L69

Added line #L69 was not covered by tests
sys.exit(1)

# Let users know if they're missing any hard dependencies
hard_dependencies = ("numpy", "pandas", "scipy", "matplotlib", "lmfit")
soft_dependencies = {}
missing_dependencies = []

import importlib
import importlib.util

for dependency in hard_dependencies:
if not importlib.util.find_spec(dependency):
Expand Down

0 comments on commit 5c5f359

Please sign in to comment.