From 8f196d3a4b2a1c3358d4477217684f288f98764e Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 15:33:44 -0600 Subject: [PATCH 01/20] Update build script and python versions --- recipe/meta.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index aed9dd8..6d26cbb 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,9 +10,10 @@ source: sha256: 5268d0ab5e8572138871feff389440a0c59d5e0fe02c0fa1cf975d74ba33b933 build: - skip: true # [py<37 or win] - script: {{ PYTHON }} -m pip install . -vv - number: 1 + # maturin 0.14.x isn't available for python 3.12 + skip: true # [py<37 or py>=312 or win] + script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv + number: 0 requirements: build: From eeafa8f884314ddfd14bfac26e9c67de651e6030 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 15:34:08 -0600 Subject: [PATCH 02/20] Remove cross-compilation dependencies --- recipe/meta.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6d26cbb..fa893c5 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -17,10 +17,6 @@ build: 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') }} host: From 5c6140f887987b622ff4b89d357e1559fd70a623 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 15:35:02 -0600 Subject: [PATCH 03/20] Pin rust nightly and add patch to update argminmax --- recipe/meta.yaml | 5 ++++- recipe/update-argminmax.patch | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 recipe/update-argminmax.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index fa893c5..ffefb3a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,6 +8,8 @@ package: source: url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/tsdownsample-{{ version }}.tar.gz sha256: 5268d0ab5e8572138871feff389440a0c59d5e0fe02c0fa1cf975d74ba33b933 + patches: + - update-argminmax.patch build: # maturin 0.14.x isn't available for python 3.12 @@ -18,7 +20,8 @@ build: requirements: build: - {{ compiler('c') }} - - {{ compiler('rust') }} + - rust 1.79.0 + - patch host: - python - maturin >=0.14,<0.15 diff --git a/recipe/update-argminmax.patch b/recipe/update-argminmax.patch new file mode 100644 index 0000000..75fc6bc --- /dev/null +++ b/recipe/update-argminmax.patch @@ -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" From 36e7f8b871f92750b38d3caba2fc96d4f33dbae2 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 15:36:02 -0600 Subject: [PATCH 04/20] Add upstream tests --- recipe/meta.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ffefb3a..f0bac6c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -33,12 +33,18 @@ requirements: - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64] test: + source_files: + - tests imports: - tsdownsample commands: - pip check + - pytest tests requires: - pip + - pytest + - pytest-cov + - pytest-benchmark about: home: https://github.com/predict-idlab/tsdownsample From 3fee382545462fab70f56ed240dcdf635c89220a Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 15:36:27 -0600 Subject: [PATCH 05/20] Update about section --- recipe/meta.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f0bac6c..96cb43f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -48,11 +48,16 @@ test: 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: From 48ca8f4b5469470fbc29e96301a481c00140ae6f Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 15:53:57 -0600 Subject: [PATCH 06/20] Remove conda-forge source from cbc. --- recipe/conda_build_config.yaml | 5 +---- recipe/meta.yaml | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 0b38182..a047569 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,5 +1,2 @@ -channel_sources: - - conda-forge/label/rust_dev,conda-forge - MACOSX_DEPLOYMENT_TARGET: # [osx and x86] - - '10.12' # [osx and x86] + - '10.12' # [osx and x86] \ No newline at end of file diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 96cb43f..c813bbc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -29,7 +29,6 @@ requirements: run: - python - numpy - - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64] test: @@ -43,8 +42,6 @@ test: requires: - pip - pytest - - pytest-cov - - pytest-benchmark about: home: https://github.com/predict-idlab/tsdownsample From 57d24ab79a3f29ade1400da970121921f868a3dc Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 16:01:07 -0600 Subject: [PATCH 07/20] Add abs.yaml for snowflake upload --- .gitignore | 1 + abs.yaml | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 abs.yaml diff --git a/.gitignore b/.gitignore index 179afe5..7e7e48d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Ignore all files and folders in root * !/conda-forge.yml +!/abs.yaml # Don't ignore any files/folders if the parent folder is 'un-ignored' # This also avoids warnings when adding an already-checked file with an ignored parent. diff --git a/abs.yaml b/abs.yaml new file mode 100644 index 0000000..61159df --- /dev/null +++ b/abs.yaml @@ -0,0 +1,2 @@ +upload_channels: + - sfe1ed40 \ No newline at end of file From cf9267d0e938642333f7ab61af4c630ac3015a18 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 16:03:20 -0600 Subject: [PATCH 08/20] Use compiler('rust') instead of pinning directly. --- recipe/conda_build_config.yaml | 5 ++++- recipe/meta.yaml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index a047569..0bab2ea 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,2 +1,5 @@ MACOSX_DEPLOYMENT_TARGET: # [osx and x86] - - '10.12' # [osx and x86] \ No newline at end of file + - '10.12' # [osx and x86] + +rust_compiler_version: + - '1.79.0' diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c813bbc..8f4514a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -20,7 +20,7 @@ build: requirements: build: - {{ compiler('c') }} - - rust 1.79.0 + - {{ compiler('rust') }} - patch host: - python From c41c66915c03335d9e6f36f7d85b50addc05d80f Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 16:05:44 -0600 Subject: [PATCH 09/20] Add pytest plugins --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8f4514a..d5c5a4b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -42,6 +42,8 @@ test: requires: - pip - pytest + - pytest-cov + - pytest-benchmark about: home: https://github.com/predict-idlab/tsdownsample From 357d9284fc5f0d4357d70ad22b71435da20caeef Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 16:07:40 -0600 Subject: [PATCH 10/20] Update source url --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d5c5a4b..3872c93 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,7 +6,7 @@ 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 From d2ff8c1c8fbb62cbef4507cc60ee643c6f548708 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 16:15:50 -0600 Subject: [PATCH 11/20] Ignore benchmark tests --- recipe/meta.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3872c93..efe4b32 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -38,12 +38,10 @@ test: - tsdownsample commands: - pip check - - pytest tests + - pytest tests --ignore="tests/benchmarks" requires: - pip - pytest - - pytest-cov - - pytest-benchmark about: home: https://github.com/predict-idlab/tsdownsample From e4d87565010cdd7321e239864e88d2f7913c928a Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 16:16:01 -0600 Subject: [PATCH 12/20] Ignore missing_wheel lint --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index efe4b32..35820a3 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -59,3 +59,5 @@ about: extra: recipe-maintainers: - thewchan + skip-lints: + - missing_wheel \ No newline at end of file From 79925936173ad37beb2fe2b102239023104d8573 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 16:29:18 -0600 Subject: [PATCH 13/20] Pin exact maturin --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 35820a3..3bcaf90 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -24,7 +24,7 @@ requirements: - patch host: - python - - maturin >=0.14,<0.15 + - maturin 0.14.17 - pip run: - python From 25d08f5ffdc8c99f5cc36c12ff8c06ce5feebe20 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 16:31:48 -0600 Subject: [PATCH 14/20] Skip s390x --- recipe/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3bcaf90..3e9d55c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,8 +12,9 @@ source: - update-argminmax.patch build: - # maturin 0.14.x isn't available for python 3.12 - skip: true # [py<37 or py>=312 or win] + # maturin 0.14.x unavailable for python 3.12 + # rust nightly unavailable on s390x + skip: true # [py<37 or py>=312 or win or s390x] script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv number: 0 From bbdeb71bb0285503bd666c1187e2bca879791b72 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Thu, 23 May 2024 16:36:39 -0600 Subject: [PATCH 15/20] Update maturin version --- recipe/meta.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3e9d55c..39f7591 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,9 +12,8 @@ source: - update-argminmax.patch build: - # maturin 0.14.x unavailable for python 3.12 # rust nightly unavailable on s390x - skip: true # [py<37 or py>=312 or win or s390x] + skip: true # [py<37 or win or s390x] script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv number: 0 @@ -25,7 +24,7 @@ requirements: - patch host: - python - - maturin 0.14.17 + - maturin 1.5.1 - pip run: - python From 0c7a155814139d98695b7fd2a45da2006a54814c Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Tue, 28 May 2024 11:31:13 -0600 Subject: [PATCH 16/20] Set up reruns for flaky test --- recipe/mark-flaky-test.patch | 12 ++++++++++++ recipe/meta.yaml | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 recipe/mark-flaky-test.patch diff --git a/recipe/mark-flaky-test.patch b/recipe/mark-flaky-test.patch new file mode 100644 index 0000000..010504e --- /dev/null +++ b/recipe/mark-flaky-test.patch @@ -0,0 +1,12 @@ +diff --git a/tests/test_tsdownsample.py b/tests/test_tsdownsample.py +index 993faa6..d3102f4 100644 +--- a/tests/test_tsdownsample.py ++++ b/tests/test_tsdownsample.py +@@ -146,6 +146,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 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 39f7591..aca7e51 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,6 +10,7 @@ source: sha256: 5268d0ab5e8572138871feff389440a0c59d5e0fe02c0fa1cf975d74ba33b933 patches: - update-argminmax.patch + - mark-flaky-test.patch build: # rust nightly unavailable on s390x @@ -42,6 +43,7 @@ test: requires: - pip - pytest + - pytest-rerunfailures about: home: https://github.com/predict-idlab/tsdownsample From dda83376728b9f01878b521ee6ac4af3189fa829 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Tue, 28 May 2024 11:38:46 -0600 Subject: [PATCH 17/20] Remove osx deployment target --- recipe/conda_build_config.yaml | 3 --- recipe/meta.yaml | 1 - 2 files changed, 4 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 0bab2ea..b7b5094 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,5 +1,2 @@ -MACOSX_DEPLOYMENT_TARGET: # [osx and x86] - - '10.12' # [osx and x86] - rust_compiler_version: - '1.79.0' diff --git a/recipe/meta.yaml b/recipe/meta.yaml index aca7e51..536af7f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -30,7 +30,6 @@ requirements: run: - python - numpy - - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64] test: source_files: From 4a20922eac1b4d4d7cc760198519ae075a5cc528 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Tue, 28 May 2024 11:46:57 -0600 Subject: [PATCH 18/20] Mark second flaky test: test_parallel_downsampling_with_x --- recipe/mark-flaky-test.patch | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/recipe/mark-flaky-test.patch b/recipe/mark-flaky-test.patch index 010504e..41b596c 100644 --- a/recipe/mark-flaky-test.patch +++ b/recipe/mark-flaky-test.patch @@ -1,8 +1,16 @@ diff --git a/tests/test_tsdownsample.py b/tests/test_tsdownsample.py -index 993faa6..d3102f4 100644 +index 993faa6..8272495 100644 --- a/tests/test_tsdownsample.py +++ b/tests/test_tsdownsample.py -@@ -146,6 +146,7 @@ def test_parallel_downsampling_with_x(downsampler: AbstractDownsampler): +@@ -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()) From 9dfe5b4d010b87c7f98afcac692c8e3eb5f45fb7 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Tue, 28 May 2024 11:49:42 -0600 Subject: [PATCH 19/20] Replace osx deployment target --- recipe/conda_build_config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index b7b5094..0bab2ea 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,2 +1,5 @@ +MACOSX_DEPLOYMENT_TARGET: # [osx and x86] + - '10.12' # [osx and x86] + rust_compiler_version: - '1.79.0' From e73c7188ed1affc76f49bf95b48bfe72f647d9a3 Mon Sep 17 00:00:00 2001 From: ViridianMelody Date: Tue, 28 May 2024 14:08:26 -0600 Subject: [PATCH 20/20] Update macos_min_version and sysroot --- recipe/conda_build_config.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 0bab2ea..c92af92 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,5 +1,8 @@ -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'