Skip to content

Commit

Permalink
math/py-qats: New port: Library for efficient processing and visualiz…
Browse files Browse the repository at this point in the history
…ation of time series
  • Loading branch information
yurivict committed Jul 21, 2023
1 parent 1123e16 commit c8101b3
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 0 deletions.
1 change: 1 addition & 0 deletions math/Makefile
Expand Up @@ -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
Expand Down
36 changes: 36 additions & 0 deletions 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>
3 changes: 3 additions & 0 deletions 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
11 changes: 11 additions & 0 deletions 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",
20 changes: 20 additions & 0 deletions 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
27 changes: 27 additions & 0 deletions 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={
20 changes: 20 additions & 0 deletions 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

0 comments on commit c8101b3

Please sign in to comment.