diff --git a/nolds/datasets.py b/nolds/datasets.py index 65489a9..43eac28 100644 --- a/nolds/datasets.py +++ b/nolds/datasets.py @@ -6,7 +6,7 @@ oct, open, pow, round, super, filter, map, zip ) import numpy as np -import pkg_resources +import importlib.resources import datetime @@ -144,7 +144,7 @@ def load_qrandom(): the dataset """ fname = "datasets/qrandom.npy" - with pkg_resources.resource_stream(__name__, fname) as f: + with importlib.resources.open_binary(__name__, fname) as f: return np.load(f) @@ -159,7 +159,7 @@ def load_brown72(): the dataset """ fname = "datasets/brown72.npy" - with pkg_resources.resource_stream(__name__, fname) as f: + with importlib.resources.open_binary(__name__, fname) as f: return np.load(f) @@ -185,10 +185,10 @@ def load_lorenz_physionet(): x- and y-coordinates of the line fitting step in the PhysioNet output """ fname = "datasets/lorenz.txt" - with pkg_resources.resource_stream(__name__, fname) as f: + with importlib.resources.open_binary(__name__, fname) as f: data_in = np.loadtxt(f) fname = "datasets/lorenz_physionet.txt" - with pkg_resources.resource_stream(__name__, fname) as f: + with importlib.resources.open_binary(__name__, fname) as f: data_out = np.loadtxt(f) return data_in, data_out @@ -393,7 +393,7 @@ def pad_opening_values(values): data = [] for index in ["^JKSE", "^N225", "^NDX"]: fname = "datasets/{}.csv".format(index) - with pkg_resources.resource_stream(__name__, fname) as f: + with importlib.resources.open_binary(__name__, fname) as f: days, values = load_finance_yahoo_data(f) pad_opening_values(values) data.append((days, values)) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4650273 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,42 @@ +# pyproject.toml + +[build-system] +requires = ["setuptools>=77.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "nolds" +version = "0.6.2" + +authors = [ + { name="Christopher Schölzel", email="christopher.schoelzel@gmx.net" }, +] +description = "Nonlinear measures for dynamical systems (based on one-dimensional time series)" +readme = "README.md" +requires-python = ">=3.10" +license = { file="LICENSE" } +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Visualization", +] + +# Ana bağımlılıklarınız +dependencies = [ + "numpy", + "matplotlib", + "setuptools", + "future", +] + +[project.optional-dependencies] +test = ["pytest", "pytest-cov", "pytest-mock", "ruff", "numpy", "matplotlib", "scikit-learn", "quantumrandom",] + +[tool.setuptools.packages.find] +where = ["."] + +[project.urls] +Homepage = "https://github.com/CSchoel/nolds" +Repository = "https://github.com/CSchoel/nolds"