Skip to content

Commit

Permalink
Merge pull request #1 from AnacondaRecipes/PKG-4648-0.1.3
Browse files Browse the repository at this point in the history
[PKG-4648] 0.1.3 ❄️
  • Loading branch information
ViridianMelody authored May 30, 2024
2 parents 88429c9 + e73c718 commit 2cecc82
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions abs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
upload_channels:
- sfe1ed40
13 changes: 8 additions & 5 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
channel_sources:
- conda-forge/label/rust_dev,conda-forge

MACOSX_DEPLOYMENT_TARGET: # [osx and x86]
- '10.12' # [osx and x86]
macos_min_version:
- 10.12 # [osx and x86_64]
MACOSX_DEPLOYMENT_TARGET:
- 10.12 # [osx and x86_64]
CONDA_BUILD_SYSROOT:
- /opt/MacOSX10.12.sdk # [osx and x86_64]
rust_compiler_version:
- '1.79.0'
20 changes: 20 additions & 0 deletions recipe/mark-flaky-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/tests/test_tsdownsample.py b/tests/test_tsdownsample.py
index 993faa6..8272495 100644
--- a/tests/test_tsdownsample.py
+++ b/tests/test_tsdownsample.py
@@ -136,6 +136,7 @@ def test_parallel_downsampling(downsampler: AbstractDownsampler):


@pytest.mark.parametrize("downsampler", generate_rust_downsamplers())
+@pytest.mark.flaky(reruns=5)
def test_parallel_downsampling_with_x(downsampler: AbstractDownsampler):
"""Test parallel downsampling with x."""
arr = np.random.randn(10_001).astype(np.float32) # 10_001 to test edge case
@@ -146,6 +147,7 @@ def test_parallel_downsampling_with_x(downsampler: AbstractDownsampler):


@pytest.mark.parametrize("downsampler", generate_all_downsamplers())
+@pytest.mark.flaky(reruns=5)
def test_downsampling_with_x(downsampler: AbstractDownsampler):
"""Test downsampling with x."""
arr = np.random.randn(2_001).astype(np.float32) # 2_001 to test edge case
33 changes: 22 additions & 11 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,59 @@ package:
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/tsdownsample-{{ version }}.tar.gz
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: 5268d0ab5e8572138871feff389440a0c59d5e0fe02c0fa1cf975d74ba33b933
patches:
- update-argminmax.patch
- mark-flaky-test.patch

build:
skip: true # [py<37 or win]
script: {{ PYTHON }} -m pip install . -vv
number: 1
# rust nightly unavailable on s390x
skip: true # [py<37 or win or s390x]
script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv
number: 0

requirements:
build:
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- crossenv # [build_platform != target_platform]
- maturin >=0.14,<0.15 # [build_platform != target_platform]
- {{ compiler('c') }}
- {{ compiler('rust') }}
- patch
host:
- python
- maturin >=0.14,<0.15
- maturin 1.5.1
- pip
run:
- python
- numpy

- __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64]

test:
source_files:
- tests
imports:
- tsdownsample
commands:
- pip check
- pytest tests --ignore="tests/benchmarks"
requires:
- pip
- pytest
- pytest-rerunfailures

about:
home: https://github.com/predict-idlab/tsdownsample
dev_url: https://github.com/predict-idlab/tsdownsample
doc_url: https://github.com/predict-idlab/tsdownsample/blob/main/README.md
summary: Time series downsampling in Rust
description: |
High-performance time series downsampling algorithms for visualization
license: MIT
license_file:
- LICENSE
- downsample_rs/LICENSE
license_family: MIT

extra:
recipe-maintainers:
- thewchan
skip-lints:
- missing_wheel
13 changes: 13 additions & 0 deletions recipe/update-argminmax.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/downsample_rs/Cargo.toml b/downsample_rs/Cargo.toml
index 107469b..b7640b0 100644
--- a/downsample_rs/Cargo.toml
+++ b/downsample_rs/Cargo.toml
@@ -8,7 +8,7 @@ license = "MIT"

[dependencies]
# TODO: perhaps use polars?
-argminmax = { version = "0.6.1", features = ["half"] }
+argminmax = { version = "0.6.2", features = ["half"] }
half = { version = "2.3.1", default-features = false , features=["num-traits"], optional = true}
num-traits = { version = "0.2.17", default-features = false }
once_cell = "1"

0 comments on commit 2cecc82

Please sign in to comment.