Skip to content

Commit 636587b

Browse files
committed
🚧 WIP
1 parent 7aeef0f commit 636587b

File tree

9 files changed

+251
-151
lines changed

9 files changed

+251
-151
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
venv/
12
TODO.md
23
main.rs
34

poetry.lock

Lines changed: 0 additions & 131 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,2 @@
1-
[tool.poetry]
2-
name = "tsdownsample"
3-
version = "0.1.0a0"
4-
description = "Time series downsampling in rust"
5-
authors = ["Jeroen Van Der Donckt"]
6-
readme = "README.md"
7-
license = "MIT"
8-
repository = "https://github.com/predict-idlab/tsdownsample"
9-
keywords = ["time series", "downsampling", "rust", "data science", "visualization"]
10-
11-
[tool.poetry.dependencies]
12-
python = "^3.7.1"
13-
numpy = ">=1.21"
14-
pandas = ">=1.3"
15-
16-
[tool.poetry.dev-dependencies]
17-
181
[build-system]
19-
requires = ["poetry-core>=1.0.0"]
20-
build-backend = "poetry.core.masonry.api"
2+
requires = ["setuptools", "wheel", "setuptools-rust"]

requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
setuptools-rust
2+
setuptools
3+
wheel
4+
numpy
5+
pandas

setup.cfg

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[metadata]
2+
name = tsdownsample
3+
version = 0.1.0
4+
license = MIT
5+
url = https://github.com/predict-idlab/tsdownsample
6+
long_description = file: README.md
7+
long_description_content_type = text/markdown
8+
classifiers =
9+
Intended Audience :: Developers
10+
License :: OSI Approved :: MIT License
11+
Intended Audience :: Developers
12+
Programming Language :: Python :: 3
13+
Programming Language :: Python :: 3.6
14+
Programming Language :: Python :: 3.7
15+
Programming Language :: Python :: 3.8
16+
Programming Language :: Python :: 3.9
17+
Programming Language :: Python :: 3.10
18+
Programming Language :: Python :: 3.11
19+
Operating System :: POSIX
20+
Operating System :: MacOS :: MacOS X
21+
Operating System :: Microsoft :: Windows
22+
23+
[options]
24+
packages = tsdownsample
25+
zip_safe = False
26+
setup_requires = setuptools-rust >= 0.12.1;
27+
python_requires = >=3.6
28+
include_package_data = True

setup.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from setuptools import setup
2+
3+
from setuptools_rust import Binding, RustExtension
4+
5+
setup(
6+
rust_extensions=[RustExtension("tsdownsample._rust.tsdownsample_rs", binding=Binding.PyO3)],
7+
)

tsdownsample/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
import tsdownample_rs as _tsdownsample_rs
1+
MinMaxAggregator = RustDownsamplingInterface(resampling_rs.minmax)
2+
M4Aggregator = RustDownsamplingInterface(resampling_rs.m4)
3+
LTTBAggregator = RustDownsamplingInterface(resampling_rs.lttb)
4+
MinMaxLTTBAggregator = RustDownsamplingInterface(resampling_rs.minmax_lttb)

tsdownsample/downsamplers.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import tsdownsample._rust.tsdownsample_rs as tsdownsample_rs
2+
from .downsampling_interface import RustDownsamplingInterface
3+
4+
# ------------------ Rust Downsamplers ------------------
5+
6+
MinMaxDownsampler = RustDownsamplingInterface(tsdownsample_rs.minmax)
7+
M4Downsampler = RustDownsamplingInterface(tsdownsample_rs.m4)
8+
LTTBDownsampler = RustDownsamplingInterface(tsdownsample_rs.lttb)
9+
MinMaxLTTBDownsampler = RustDownsamplingInterface(tsdownsample_rs.minmax_lttb)
10+
11+
# ------------------ Python Downsamplers ------------------
12+
13+
MeanDownsampler = PythonDownsamplingInterface(np.mean)

0 commit comments

Comments
 (0)