From a0f44931a27bf7ee1c5932a6220ebaf320de9418 Mon Sep 17 00:00:00 2001 From: Arthur Loureiro Date: Tue, 24 Feb 2026 11:51:03 +0100 Subject: [PATCH 1/4] fixed ordering of example sacc --- examples/cosmic_shear/cosmicshear_sacc.fits | Bin 37440 -> 34560 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/examples/cosmic_shear/cosmicshear_sacc.fits b/examples/cosmic_shear/cosmicshear_sacc.fits index 1a2141a07eb02327c1e3cf8a64d7deddd36d4145..9b8d5786e94ef54974d955355d6fb24642b5af85 100644 GIT binary patch delta 1037 zcmX@GgsGvAX@djfXR2T8Uo$qz_z)e;DF+02MZoXCSxP8t&FCd`2uB`_=*#gljHM?Qc{aD z^U^^Y%qJHFb2EBRmf`c{GzHt9nv(-`k2_FDS+F(Z=825!StdmZa4}5HhBR;F}uTpEBE?0%C3Sd?&h?e)$;5gR58co3kb!W z4u?Cy;!wqgcK!xoX9KswOy-&t4fh{6n*R*#jQkQG9<)k_8q71<0HK%{&3}e=tovDW zIJSg974uC_Kq%%%^Pi#Z?E_cqJ4?8siUlT5KqwYO^Pi#Z0-v7U*9#Xw6$?#1fKV)q zfvB=~P2*sjE9)u`%uYXXpUpo$}SZuOF3_LW%kvs@dEOX3! zPRDXXsA7r90SLvCNFD?$w*BP)xAUJYGgPtE%pBe^-1M}u+VUQo7D1!hui&fL_J#FWI6L{I{^nfw7mL_rN* Yje`KUG)$Kj219+aAfpyAXEm?`0HZ!00ssI2 delta 1165 zcmZqZV>+;eX@dhJr=PEDh@*mng6+gc5k`Z_3mJ_zPhi}`#bji%`CN@XBct);K3-d< z%#_JzdFL_bX68-K>$7`2(<`B#sp^95$4HD_~%Rx z;18M1!tb-$LBK^6EO0>;B5**hTZmZ!=wClepnpv^_od4+F{kF_Og_i!4&+YDvS#Fu z2=R0DbycucP)|uLNwk{Wo$auA0we3>h5~_l2Neb|C@D%d0AV|mqtAD@K9X}V?T!j; z>q&%*E0rGn@_vV>gS)Bq6-%pPxH!*6!+6h18;3|#b8NpY4|cFF(ssytXYlleei=-? z?W1*1Y^RC*cBp0QI_ch7F94S~T{C}UsKEh;eg_l>*{<7lA-;h8X)uzH!Q!@`{Qq|TlVwKoumeQmX3r(3(rY?MK8A?zI$^_l z_?j7#k0IjIwsammd+09E$D0>Q%5zNKAQ?9KfFie)r>~>CE3iCJ2Vxk|SMbbDOrM;? ztuk=}`@{fgW?eIr$?H<*Pd;mHJh{PAe)4&1!^szTv?nw2%1@lYHd%o;VDbkW(aEAV n_PimH0j|Jolbl}$G!0ZhOpdm3o4nE5ADBHauy1Z~KA;Ey@RY6K From a92b9a8c02931dc37643a7f977c053878a6bf67c Mon Sep 17 00:00:00 2001 From: Arthur Loureiro Date: Tue, 24 Feb 2026 11:51:47 +0100 Subject: [PATCH 2/4] fixed hdf5 extension inconsistency --- src/smokescreen/__main__.py | 2 +- src/smokescreen/datavector.py | 4 ++-- tests/test_datavector.py | 16 ++++++++-------- tests/test_utils.py | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/smokescreen/__main__.py b/src/smokescreen/__main__.py index 017de11..a3ee13d 100644 --- a/src/smokescreen/__main__.py +++ b/src/smokescreen/__main__.py @@ -95,7 +95,7 @@ def datavector_main(path_to_sacc: Path_fr, smoke.save_concealed_datavector(path_to_output, root_name, output_format=input_format) # Determine extension based on format - ext = '.h5' if input_format == 'hdf5' else '.fits' + ext = '.hdf5' if input_format == 'hdf5' else '.fits' outprintfile = f"{path_to_output}/{root_name}_concealed_data_vector{ext}" print(f"\nConcealed sacc file saved as:\n\t{outprintfile}") diff --git a/src/smokescreen/datavector.py b/src/smokescreen/datavector.py index 1de3f78..99200b2 100644 --- a/src/smokescreen/datavector.py +++ b/src/smokescreen/datavector.py @@ -538,7 +538,7 @@ def save_concealed_datavector(self, path_to_save, file_root, Saves the concealed (blinded) data-vector to a file. Saves the blinded data-vector to a file with the appropriate extension - based on the input format: ``.fits`` for FITS files or ``.h5`` for HDF5 files. + based on the input format: ``.fits`` for FITS files or ``.hdf5`` for HDF5 files. Parameters ---------- @@ -576,7 +576,7 @@ def save_concealed_datavector(self, path_to_save, file_root, # Determine file extension based on format if output_format == 'hdf5': - ext = '.h5' + ext = '.hdf5' save_method = concealed_sacc.save_hdf5 else: # default to FITS ext = '.fits' diff --git a/tests/test_datavector.py b/tests/test_datavector.py index c3b25a7..1b72345 100644 --- a/tests/test_datavector.py +++ b/tests/test_datavector.py @@ -796,7 +796,7 @@ def test_save_concealed_datavector_hdf5(mock_getuser): # Save the blinded data vector to a temporary HDF5 file temp_file_path = "./tests/" temp_file_root = "temp_sacc_hdf5" - temp_file_name = f"{temp_file_path}{temp_file_root}_concealed_data_vector.h5" + temp_file_name = f"{temp_file_path}{temp_file_root}_concealed_data_vector.hdf5" # Save with output_format='hdf5' to test HDF5 output returned_sacc = sck.save_concealed_datavector(temp_file_path, @@ -807,10 +807,10 @@ def test_save_concealed_datavector_hdf5(mock_getuser): # Check that the return is a sacc object assert isinstance(returned_sacc, sacc.Sacc) - # Check that the file was created with .h5 extension + # Check that the file was created with .hdf5 extension assert os.path.exists(temp_file_name) # Verify it's an HDF5 file by checking extension in path - assert temp_file_name.endswith('.h5') + assert temp_file_name.endswith('.hdf5') # Load the HDF5 file and check that the data vector matches loaded_sacc = sacc.Sacc.load_hdf5(temp_file_name) @@ -829,7 +829,7 @@ def test_save_concealed_datavector_hdf5(mock_getuser): @patch('src.smokescreen.datavector.getpass.getuser', return_value='test_user') def test_save_concealed_datavector_hdf5_from_fits_input(mock_getuser): # Test that when input format is FITS but output format is explicitly set to HDF5, - # the file is saved with .h5 extension + # the file is saved with .hdf5 extension cosmo = COSMO likelihood = "./examples/cosmic_shear/cosmicshear_likelihood.py" syst_dict = { @@ -853,7 +853,7 @@ def test_save_concealed_datavector_hdf5_from_fits_input(mock_getuser): # Save with explicit HDF5 output format temp_file_path = "./tests/" temp_file_root = "temp_sacc_hdf5_from_fits" - temp_file_name = f"{temp_file_path}{temp_file_root}_concealed_data_vector.h5" + temp_file_name = f"{temp_file_path}{temp_file_root}_concealed_data_vector.hdf5" returned_sacc = sck.save_concealed_datavector(temp_file_path, temp_file_root, @@ -881,7 +881,7 @@ def test_save_concealed_datavector_default_format_uses_input_format(mock_getuser } shift_dict = {"Omega_c": 0.34, "sigma8": 0.85} - # Test with HDF5 input - output should also be HDF5 (.h5) + # Test with HDF5 input - output should also be HDF5 (.hdf5) sacc_data_hdf5, _ = load_sacc_file("./examples/cosmic_shear/cosmicshear_sacc.hdf5") sck = ConcealDataVector(cosmo, likelihood, shift_dict, sacc_data_hdf5, syst_dict, seed=1234) @@ -899,8 +899,8 @@ def test_save_concealed_datavector_default_format_uses_input_format(mock_getuser assert isinstance(returned_sacc, sacc.Sacc) - # Check that the file has .h5 extension (from HDF5 input format) - expected_hdf5_name = f"{temp_file_path}{temp_file_root}_concealed_data_vector.h5" + # Check that the file has .hdf5 extension (from HDF5 input format) + expected_hdf5_name = f"{temp_file_path}{temp_file_root}_concealed_data_vector.hdf5" assert os.path.exists(expected_hdf5_name) # Verify it can be loaded as HDF5 diff --git a/tests/test_utils.py b/tests/test_utils.py index 0352dfb..0fb9082 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -109,11 +109,11 @@ def test_load_sacc_file_hdf5_format(self, tmp_path): def test_load_sacc_file_with_h5_extension(self, tmp_path): import sacc as sacc_mod - # Create an HDF5 SACC file with .h5 extension + # Create an HDF5 SACC file with .hdf5 extension sacc_data = sacc_mod.Sacc() sacc_data.add_tracer('misc', 'test') sacc_data.add_data_point('galaxy_shear_cl_ee', ('test', 'test'), 1.0, ell=10) - h5_path = tmp_path / "test.h5" + h5_path = tmp_path / "test.hdf5" sacc_data.save_hdf5(str(h5_path)) # Load using load_sacc_file - should detect as HDF5 regardless of extension From a0704c35b314e82e2f9e940283d029d693450560 Mon Sep 17 00:00:00 2001 From: Arthur Loureiro Date: Tue, 24 Feb 2026 11:53:52 +0100 Subject: [PATCH 3/4] version bump --- src/smokescreen/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/smokescreen/_version.py b/src/smokescreen/_version.py index 6d9fa95..bd98c14 100644 --- a/src/smokescreen/_version.py +++ b/src/smokescreen/_version.py @@ -1 +1 @@ -__version__ = "v1.5.5" +__version__ = "v1.5.6" From 5e2b311aae4f0f53dfaf11a5f5944c5d4b9cba37 Mon Sep 17 00:00:00 2001 From: Arthur Loureiro Date: Tue, 24 Feb 2026 11:57:59 +0100 Subject: [PATCH 4/4] fixing CI dulicationn --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4fe980b..086326b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ on: - main push: branches: - - '*' + - main tags: - '*'