aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-07-21 06:02:52 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2023-07-21 06:38:38 +0000
commitc8101b3c76ca13d9561d320f8c4d54faadea3f10 (patch)
treea752203236f63d6030a570fa5723654da755dab8
parent1123e162bd8390d3c7049d242e9cb0e5f67e1d53 (diff)
math/py-qats: New port: Library for efficient processing and visualization of time series
-rw-r--r--math/Makefile1
-rw-r--r--math/py-qats/Makefile36
-rw-r--r--math/py-qats/distinfo3
-rw-r--r--math/py-qats/files/patch-qats_app_gui.py11
-rw-r--r--math/py-qats/files/patch-requirements.txt20
-rw-r--r--math/py-qats/files/patch-setup.py27
-rw-r--r--math/py-qats/pkg-descr20
7 files changed, 118 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 208191e8ea97..0d8c393b4db6 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -1035,6 +1035,7 @@
SUBDIR += py-python-picard
SUBDIR += py-pytorchvideo
SUBDIR += py-pyvtk
+ SUBDIR += py-qats
SUBDIR += py-qdldl
SUBDIR += py-quadprog
SUBDIR += py-random2
diff --git a/math/py-qats/Makefile b/math/py-qats/Makefile
new file mode 100644
index 000000000000..76c575f2bd2a
--- /dev/null
+++ b/math/py-qats/Makefile
@@ -0,0 +1,36 @@
+PORTNAME= qats
+DISTVERSION= 4.11.1
+CATEGORIES= math
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Library for efficient processing and visualization of time series
+WWW= https://github.com/dnvgl/qats
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=3.4.3:devel/py-setuptools_scm@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}QtPy>=1.9.0:devel/py-QtPy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}furo>=2022.12.7:textproc/py-furo@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}h5py>0:science/py-h5py@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}myst-parser>=0.18.1:textproc/py-myst-parser@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}npTDMS>=1.1.0:misc/py-npTDMS@${PY_FLAVOR} \
+ ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}openpyxl>=3.0.5:textproc/py-openpyxl@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pandas>0:math/py-pandas@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pymatreader>=0.0.24:misc/py-pymatreader@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pyside2>=5.15.2:devel/pyside2@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}scipy>=1.7.2:science/py-scipy@${PY_FLAVOR}
+
+USES= pyqt:5 python
+USE_PYTHON= distutils concurrent autoplist pytest
+USE_PYQT= pyqt5
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/math/py-qats/distinfo b/math/py-qats/distinfo
new file mode 100644
index 000000000000..ba36b59e21b9
--- /dev/null
+++ b/math/py-qats/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1689899243
+SHA256 (qats-4.11.1.tar.gz) = 63766918714dc71087bf4af4d357eb11ce5dddd910d0dae3421134e91acb7a44
+SIZE (qats-4.11.1.tar.gz) = 51717904
diff --git a/math/py-qats/files/patch-qats_app_gui.py b/math/py-qats/files/patch-qats_app_gui.py
new file mode 100644
index 000000000000..92c9af373967
--- /dev/null
+++ b/math/py-qats/files/patch-qats_app_gui.py
@@ -0,0 +1,11 @@
+--- qats/app/gui.py.orig 2023-01-03 17:37:48 UTC
++++ qats/app/gui.py
+@@ -48,7 +48,7 @@ LOGGING_LEVELS = dict(
+ if sys.platform == "win32":
+ SETTINGS_FILE = os.path.join(os.getenv("APPDATA", os.getenv("USERPROFILE", "")), "qats.settings")
+ else:
+- SETTINGS_FILE = os.path.join("var", "lib", "qats.settings")
++ SETTINGS_FILE = os.path.join("/home", os.getlogin(), ".config", "qats.settings")
+ ICON_FILE = resource_filename("qats.app", "qats.ico")
+
+ STATS_ORDER = ["name", "min", "max", "mean", "std", "skew", "kurt", "tz", "wloc", "wscale", "wshape",
diff --git a/math/py-qats/files/patch-requirements.txt b/math/py-qats/files/patch-requirements.txt
new file mode 100644
index 000000000000..77be16a56eda
--- /dev/null
+++ b/math/py-qats/files/patch-requirements.txt
@@ -0,0 +1,20 @@
+--- requirements.txt.orig 2023-07-21 05:35:07 UTC
++++ requirements.txt
+@@ -1,12 +1,12 @@
+-h5py>=3.5.0, <=3.7.0
++h5py>=3.5.0
+ pymatreader==0.0.24
+-matplotlib>=3.3.3, <=3.6
++matplotlib>=3.3.3
+ npTDMS==1.1.0
+-numpy>=1.21.6, <=1.24.*
++numpy>=1.21.6
+ openpyxl==3.0.5
+-pandas>=1.1.4, <=1.5
++pandas>=1.1.4
+ QtPy==1.9.0
+-pyside2>=5.15.2, <5.16
++pyside2>=5.15.2
+ PyQt5>=5.15.2, <=5.15.7
+ scipy>=1.7.2, <=1.9.2 # in accordance with https://docs.scipy.org/doc/scipy/dev/toolchain.html#numpy
+ setuptools-scm>=7.1.0, <=8
diff --git a/math/py-qats/files/patch-setup.py b/math/py-qats/files/patch-setup.py
new file mode 100644
index 000000000000..ccf1d7d950ae
--- /dev/null
+++ b/math/py-qats/files/patch-setup.py
@@ -0,0 +1,27 @@
+--- setup.py.orig 2023-07-21 05:37:29 UTC
++++ setup.py
+@@ -22,15 +22,15 @@ setup(
+ python_requires=">=3.7, <3.11",
+ setup_requires=["setuptools_scm"],
+ install_requires=[
+- "numpy>=1,<2",
+- "openpyxl>=3,<4",
+- "scipy>=1,<2",
+- "matplotlib>=3,<4",
+- "npTDMS>=1,<2",
+- "h5py>=2.7,<4",
+- "QtPy>=1,<2",
+- "pandas>=1,<2",
+- "pymatreader>=0.0.20,<1",
++ "numpy>=1",
++ "openpyxl>=3",
++ "scipy>=1",
++ "matplotlib>=3",
++ "npTDMS>=1",
++ "h5py>=2.7",
++ "QtPy>=1",
++ "pandas>=1",
++ "pymatreader>=0.0.20",
+ "pywin32; platform_system == 'Windows'"
+ ],
+ entry_points={
diff --git a/math/py-qats/pkg-descr b/math/py-qats/pkg-descr
new file mode 100644
index 000000000000..cde244adfe49
--- /dev/null
+++ b/math/py-qats/pkg-descr
@@ -0,0 +1,20 @@
+QATS is a Python library and GUI for efficient processing and visualization
+of time series.
+
+QATS provides tools for:
+* Import and export from/to various pre-defined time series file formats
+* Signal processing
+* Inferring statistical distributions
+* Cycle counting using the Rainflow algorithm
+
+It was originally created to handle time series files exported from SIMO and
+RIFLEX. Now it also handles SIMA hdf5 (.h5) files, Matlab (version < 7.3)
+.mat files, CSV files and more.
+
+QATS also features a GUI which offers efficient and low threshold processing
+and visualization of time series. It is perfect for inspecting, comparing and
+reporting:
+* time series
+* power spectral density distributions
+* peak and extreme distributions
+* cycle distributions