From f57d392b8d0c3900a36eb664202114c91ba0b5d2 Mon Sep 17 00:00:00 2001 From: mj-will Date: Thu, 8 Aug 2024 16:06:57 +0100 Subject: [PATCH 1/2] MAINT: cherry pick fix from 372dfbd --- tests/test_experimental/test_flowmodel/test_clustering.py | 2 ++ .../{test_starndard_sampling.py => test_standard_sampling.py} | 1 + 2 files changed, 3 insertions(+) rename tests/test_experimental/test_sampling/{test_starndard_sampling.py => test_standard_sampling.py} (95%) diff --git a/tests/test_experimental/test_flowmodel/test_clustering.py b/tests/test_experimental/test_flowmodel/test_clustering.py index d72c5d6d..372a83cd 100644 --- a/tests/test_experimental/test_flowmodel/test_clustering.py +++ b/tests/test_experimental/test_flowmodel/test_clustering.py @@ -9,6 +9,7 @@ def cfm(): return create_autospec(CFM) +@pytest.mark.requires("faiss") def test_init(cfm, tmp_path, caplog): caplog.set_level("DEBUG") flow_config = {} @@ -30,6 +31,7 @@ def test_init(cfm, tmp_path, caplog): assert "faiss version" in str(caplog.text) +@pytest.mark.requires("faiss") @pytest.mark.integration_test def test_clustering_integration(tmp_path, caplog): caplog.set_level("DEBUG") diff --git a/tests/test_experimental/test_sampling/test_starndard_sampling.py b/tests/test_experimental/test_sampling/test_standard_sampling.py similarity index 95% rename from tests/test_experimental/test_sampling/test_starndard_sampling.py rename to tests/test_experimental/test_sampling/test_standard_sampling.py index 3ea37404..6670c7f8 100644 --- a/tests/test_experimental/test_sampling/test_starndard_sampling.py +++ b/tests/test_experimental/test_sampling/test_standard_sampling.py @@ -4,6 +4,7 @@ from nessai.experimental.proposal.clustering import ClusteringFlowProposal +@pytest.mark.requires("faiss") @pytest.mark.slow_integration_test def test_sampling_with_clusteringflowproposal(integration_model, tmp_path): fp = FlowSampler( From fbaa629540dd606d2221f51a21f2bc0c3de78a5e Mon Sep 17 00:00:00 2001 From: mj-will Date: Thu, 8 Aug 2024 16:08:26 +0100 Subject: [PATCH 2/2] CHANGELOG: update for 0.13.1 --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c29b51ef..d7386099 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.13.1] + +### Changed + +- Make tests that require `faiss` are optional in the test suite +(https://github.com/mj-will/nessai/pull/408) + ## [0.13.0] @@ -654,7 +661,8 @@ First public release. - Original `GWFlowProposal` method renamed to `LegacyGWFlowProposal`. Will be removed in the next release. -[Unreleased]: https://github.com/mj-will/nessai/compare/v0.13.0...HEAD +[Unreleased]: https://github.com/mj-will/nessai/compare/v0.13.1...HEAD +[0.13.1]: https://github.com/mj-will/nessai/compare/v0.13.0...v0.13.1 [0.13.0]: https://github.com/mj-will/nessai/compare/v0.12.0...v0.13.0 [0.12.0]: https://github.com/mj-will/nessai/compare/v0.11.0...v0.12.0 [0.11.0]: https://github.com/mj-will/nessai/compare/v0.10.1...v0.11.0