Skip to content

Commit

Permalink
Remove support for older python versions and add newer versions (#32)
Browse files Browse the repository at this point in the history
* feat: remove support for older python versions

* fix: docs build

* fix: add defaults channel to build
  • Loading branch information
SebastianSchmidl authored Jan 2, 2025
1 parent a9029e1 commit 3f43729
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 23 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defaults:

jobs:
check:
name: Run checks for periodicity-detection on ubuntu with python 3.7
name: Run checks for periodicity-detection on ubuntu with python 3.9
runs-on: ubuntu-latest

steps:
Expand All @@ -23,7 +23,8 @@ jobs:
with:
use-mamba: true
auto-update-conda: true
python-version: "3.7"
python-version: "3.9"
channels: "defaults"
- name: Install dependencies
run: |
pip install -r requirements.dev
Expand All @@ -41,7 +42,7 @@ jobs:
max-parallel: 3
matrix:
os: [ubuntu-latest] # [ubuntu-latest, windows-latest, macOS-latest]
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
fail-fast: false

steps:
Expand All @@ -52,6 +53,7 @@ jobs:
use-mamba: true
auto-update-conda: true
python-version: ${{ matrix.python_version }}
channels: "defaults"
- name: Install dependencies
run: |
pip install -r requirements.dev
Expand Down Expand Up @@ -104,7 +106,8 @@ jobs:
with:
use-mamba: true
auto-update-conda: true
python-version: 3.7
python-version: 3.9
channels: "defaults"
- name: Build source distribution
run: |
python setup.py sdist
Expand All @@ -128,7 +131,7 @@ jobs:
uses: RalfG/[email protected]_x86_64
with:
# our wheel is purely python, so this creates a *-none-any.wheel and other versions are not required for now
python-versions: 'cp37-cp37m'
python-versions: 'cp39-cp39m'
- name: List packages
run: |
ls -alh dist
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defaults:

jobs:
check:
name: Run checks for periodicity-detection on ubuntu with python 3.7
name: Run checks for periodicity-detection on ubuntu with python 3.9
runs-on: ubuntu-latest

steps:
Expand All @@ -22,7 +22,8 @@ jobs:
with:
use-mamba: true
auto-update-conda: true
python-version: "3.7"
python-version: "3.9"
channels: "defaults"
- name: Install dependencies
run: |
pip install -r requirements.dev
Expand All @@ -40,7 +41,7 @@ jobs:
max-parallel: 3
matrix:
os: [ubuntu-latest] # [ubuntu-latest, windows-latest, macOS-latest]
python_version: ["3.7", "3.11"]
python_version: ["3.9", "3.13"]
fail-fast: false

steps:
Expand All @@ -51,6 +52,7 @@ jobs:
use-mamba: true
auto-update-conda: true
python-version: ${{ matrix.python_version }}
channels: "defaults"
- name: Install dependencies
run: |
pip install -r requirements.dev
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.7"
python: "3.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022-2023 Sebastian Schmidl
Copyright (c) 2022-2025 Sebastian Schmidl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Detect the dominant period in univariate, equidistant time series data.
[![codecov](https://codecov.io/gh/CodeLionX/periodicity-detection/branch/main/graph/badge.svg?token=6QXOCY4TS2)](https://codecov.io/gh/CodeLionX/periodicity-detection)
[![PyPI package](https://badge.fury.io/py/periodicity-detection.svg)](https://badge.fury.io/py/periodicity-detection)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![python version 3.7|3.8|3.9|3.10|3.11](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)
![python version 3.9|3.10|3.11|3.12|3.13](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)
[![Downloads](https://static.pepy.tech/badge/periodicity-detection)](https://pepy.tech/project/periodicity-detection)

</div>
Expand Down Expand Up @@ -37,7 +37,7 @@ You can install Periodicity Detection as a package or from source.

## Prerequisites

- python >= 3.7, <= 3.11
- python >= 3.9, < 3.14
- pip >= 20

## Installation using `pip` (recommended)
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# -- Project information -----------------------------------------------------

project = "periodicity-detection"
copyright = "2022-2023, Sebastian Schmidl"
copyright = "2022-2025, Sebastian Schmidl"
author = "Sebastian Schmidl"
version = periodicity_detection.__version__
release = periodicity_detection.__version__
Expand Down
2 changes: 1 addition & 1 deletion periodicity_detection/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__: str = "0.1.3"
__version__: str = "0.2.0rc1"
2 changes: 1 addition & 1 deletion periodicity_detection/methods/autoperiod.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,6 @@ def two_segment(t: float, args: List[np.ndarray]) -> float:

periods = list(x[3] for x in ranges)
if len(periods) > 0:
return np.unique(periods)[::-1][: self._return_multi].astype(int)
return list(np.unique(periods)[::-1][: self._return_multi].astype(int))
else:
return [1]
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ skip_covered = true
sort = "Cover"

[tool.black]
target-version = ['py37']
target-version = ['py39']

[tool.isort]
py_version = "37"
py_version = "39"
profile = "black" # Play nicely with black
src_paths = ["periodicity_detection", "tests"]

[tool.mypy]
python_version = "3.7"
python_version = "3.9"
show_error_codes = true

[[tool.mypy.overrides]]
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ numpy>=1.21.6
pandas>=1.3.5
scipy>=1.7.3
statsmodels>=0.13.5
spectrum>=0.8.1,<0.9; python_version < '3.8'
spectrum>=0.8; python_version >= '3.8'
spectrum>=0.8
typing_extensions>=4.7.1

matplotlib>=3.5.3
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ def run(self):
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"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",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
Expand All @@ -145,7 +145,7 @@ def run(self):
"dev": DEV_REQUIRED,
"docs": DOCS_REQUIRED,
},
python_requires=">=3.7",
python_requires=">=3.9",
test_suite="tests",
cmdclass={
"test": PyTestCommand,
Expand Down

0 comments on commit 3f43729

Please sign in to comment.