chore(deps): bump sigstore/cosign-installer from 3.9.2 to 3.10.0 in the actions group #463

Merged
dependabot[bot] merged 2 commits from dependabot/github_actions/actions-de611169ce into main 2025-09-16 15:54:00 +00:00
11 changed files with 66 additions and 65 deletions

View file

@ -45,7 +45,7 @@ jobs:
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 #v3.9.2
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 #v3.10.0
with:
cosign-release: 'v2.2.4'

View file

@ -42,7 +42,7 @@ jobs:
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 #v3.9.2
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 #v3.10.0
with:
cosign-release: 'v2.2.4'

View file

@ -14,7 +14,7 @@ from junifer.api.queue_context import GnuParallelLocalAdapter
def test_GnuParallelLocalAdapter_env_kind_error() -> None:
"""Test error for invalid env kind."""
with pytest.raises(ValueError, match="Invalid value for `env.kind`"):
with pytest.raises(ValueError, match=r"Invalid value for `env.kind`"):
GnuParallelLocalAdapter(
job_name="check_env_kind",
job_dir=Path("."),
@ -26,7 +26,7 @@ def test_GnuParallelLocalAdapter_env_kind_error() -> None:
def test_GnuParallelLocalAdapter_env_shell_error() -> None:
"""Test error for invalid env shell."""
with pytest.raises(ValueError, match="Invalid value for `env.shell`"):
with pytest.raises(ValueError, match=r"Invalid value for `env.shell`"):
GnuParallelLocalAdapter(
job_name="check_env_shell",
job_dir=Path("."),

View file

@ -14,7 +14,7 @@ from junifer.api.queue_context import HTCondorAdapter
def test_HTCondorAdapter_env_kind_error() -> None:
"""Test error for invalid env kind."""
with pytest.raises(ValueError, match="Invalid value for `env.kind`"):
with pytest.raises(ValueError, match=r"Invalid value for `env.kind`"):
HTCondorAdapter(
job_name="check_env_kind",
job_dir=Path("."),
@ -26,7 +26,7 @@ def test_HTCondorAdapter_env_kind_error() -> None:
def test_HTCondorAdapter_env_shell_error() -> None:
"""Test error for invalid env shell."""
with pytest.raises(ValueError, match="Invalid value for `env.shell`"):
with pytest.raises(ValueError, match=r"Invalid value for `env.shell`"):
HTCondorAdapter(
job_name="check_env_shell",
job_dir=Path("."),
@ -38,7 +38,7 @@ def test_HTCondorAdapter_env_shell_error() -> None:
def test_HTCondorAdapter_collect_error() -> None:
"""Test error for invalid collect option."""
with pytest.raises(ValueError, match="Invalid value for `collect`"):
with pytest.raises(ValueError, match=r"Invalid value for `collect`"):
HTCondorAdapter(
job_name="check_collect",
job_dir=Path("."),

View file

@ -634,7 +634,7 @@ def test_aicha(version: int) -> None:
def test_retrieve_aicha_incorrect_version() -> None:
"""Test retrieve AICHA with incorrect version."""
with pytest.raises(ValueError, match="The parameter `version`"):
with pytest.raises(ValueError, match=r"The parameter `version`"):
_retrieve_aicha(
version=100,
)
@ -697,7 +697,7 @@ def test_shen(
def test_retrieve_shen_incorrect_year() -> None:
"""Test retrieve Shen with incorrect year."""
with pytest.raises(ValueError, match="The parameter `year`"):
with pytest.raises(ValueError, match=r"The parameter `year`"):
_retrieve_shen(
year=1969,
)
@ -705,7 +705,7 @@ def test_retrieve_shen_incorrect_year() -> None:
def test_retrieve_shen_incorrect_n_rois() -> None:
"""Test retrieve Shen with incorrect ROIs."""
with pytest.raises(ValueError, match="The parameter `n_rois`"):
with pytest.raises(ValueError, match=r"The parameter `n_rois`"):
_retrieve_shen(
year=2015,
n_rois=10,
@ -747,7 +747,7 @@ def test_retrieve_shen_incorrect_param_combo(
The parametrized ROI count values.
"""
with pytest.raises(ValueError, match="The parameter combination"):
with pytest.raises(ValueError, match=r"The parameter combination"):
_retrieve_shen(
resolution=resolution,
year=year,
@ -875,7 +875,7 @@ def test_yan(
def test_retrieve_yan_incorrect_networks() -> None:
"""Test retrieve Yan with incorrect networks."""
with pytest.raises(
ValueError, match="Either one of `yeo_networks` or `kong_networks`"
ValueError, match=r"Either one of `yeo_networks` or `kong_networks`"
):
_retrieve_yan(
n_rois=31418,
@ -884,7 +884,7 @@ def test_retrieve_yan_incorrect_networks() -> None:
)
with pytest.raises(
ValueError, match="Either one of `yeo_networks` or `kong_networks`"
ValueError, match=r"Either one of `yeo_networks` or `kong_networks`"
):
_retrieve_yan(
n_rois=31418,
@ -895,7 +895,7 @@ def test_retrieve_yan_incorrect_networks() -> None:
def test_retrieve_yan_incorrect_n_rois() -> None:
"""Test retrieve Yan with incorrect ROIs."""
with pytest.raises(ValueError, match="The parameter `n_rois`"):
with pytest.raises(ValueError, match=r"The parameter `n_rois`"):
_retrieve_yan(
n_rois=31418,
yeo_networks=7,
@ -904,7 +904,7 @@ def test_retrieve_yan_incorrect_n_rois() -> None:
def test_retrieve_yan_incorrect_yeo_networks() -> None:
"""Test retrieve Yan with incorrect Yeo networks."""
with pytest.raises(ValueError, match="The parameter `yeo_networks`"):
with pytest.raises(ValueError, match=r"The parameter `yeo_networks`"):
_retrieve_yan(
n_rois=100,
yeo_networks=27,
@ -913,7 +913,7 @@ def test_retrieve_yan_incorrect_yeo_networks() -> None:
def test_retrieve_yan_incorrect_kong_networks() -> None:
"""Test retrieve Yan with incorrect Kong networks."""
with pytest.raises(ValueError, match="The parameter `kong_networks`"):
with pytest.raises(ValueError, match=r"The parameter `kong_networks`"):
_retrieve_yan(
n_rois=100,
kong_networks=27,
@ -976,7 +976,7 @@ def test_brainnetome(
def test_retrieve_brainnetome_incorrect_threshold() -> None:
"""Test retrieve Brainnetome with incorrect threshold."""
with pytest.raises(ValueError, match="The parameter `threshold`"):
with pytest.raises(ValueError, match=r"The parameter `threshold`"):
_retrieve_brainnetome(
threshold=100,
)
@ -1091,7 +1091,7 @@ def test_merge_parcellations_3D_multiple_overlapping() -> None:
names = ["high", "low"]
labels_lists = [labels1, labels2]
with pytest.warns(RuntimeWarning, match="overlapping voxels"):
with pytest.warns(RuntimeWarning, match=r"overlapping voxels"):
merge_parcellations(parcellation_list, names, labels_lists)
parc_data = parcellation.get_fdata()
@ -1128,7 +1128,7 @@ def test_merge_parcellations_3D_multiple_duplicated_labels() -> None:
names = ["high", "low"]
labels_lists = [labels1, labels2]
with pytest.warns(RuntimeWarning, match="duplicated labels."):
with pytest.warns(RuntimeWarning, match=r"duplicated labels."):
merged_parc, _ = merge_parcellations(
parcellation_list, names, labels_lists
)

View file

@ -223,7 +223,7 @@ def signals_and_covariances(
def test_check_square() -> None:
"""Test square matrix assertion."""
non_square = np.ones((2, 3))
with pytest.raises(ValueError, match="Expected a square matrix"):
with pytest.raises(ValueError, match=r"Expected a square matrix"):
_check_square(non_square)
@ -244,7 +244,7 @@ def test_check_spd(invalid_input: np.ndarray) -> None:
"""
with pytest.raises(
ValueError, match="Expected a symmetric positive definite matrix."
ValueError, match=r"Expected a symmetric positive definite matrix."
):
_check_spd(invalid_input)
@ -555,7 +555,7 @@ def test_geometric_mean_error_non_square_matrix() -> None:
n_features = 5
mat1 = np.ones((n_features, n_features + 1))
with pytest.raises(ValueError, match="Expected a square matrix"):
with pytest.raises(ValueError, match=r"Expected a square matrix"):
_geometric_mean([mat1])
@ -566,7 +566,7 @@ def test_geometric_mean_error_input_matrices_have_different_shapes() -> None:
mat2 = np.ones((n_features + 1, n_features + 1))
with pytest.raises(
ValueError, match="Matrices are not of the same shape."
ValueError, match=r"Matrices are not of the same shape."
):
_geometric_mean([mat1, mat2])
@ -577,7 +577,7 @@ def test_geometric_mean_error_non_spd_input_matrix() -> None:
mat2 = np.ones((n_features + 1, n_features + 1))
with pytest.raises(
ValueError, match="Expected a symmetric positive definite matrix."
ValueError, match=r"Expected a symmetric positive definite matrix."
):
_geometric_mean([mat2])
@ -588,19 +588,20 @@ def test_connectivity_measure_errors():
conn_measure = JuniferConnectivityMeasure()
with pytest.raises(
ValueError, match="'subjects' input argument must be an iterable"
ValueError, match=r"'subjects' input argument must be an iterable"
):
conn_measure.fit(1.0)
# input subjects not 2D numpy.ndarrays
with pytest.raises(
ValueError, match="Each subject must be 2D numpy.ndarray."
ValueError, match=r"Each subject must be 2D numpy.ndarray."
):
conn_measure.fit([np.ones((100, 40)), np.ones((10,))])
# input subjects with different number of features
with pytest.raises(
ValueError, match="All subjects must have the same number of features."
ValueError,
match=r"All subjects must have the same number of features.",
):
conn_measure.fit([np.ones((100, 40)), np.ones((100, 41))])
@ -609,7 +610,7 @@ def test_connectivity_measure_errors():
with pytest.raises(
ValueError,
match="Tangent space parametrization .* only be .* group of subjects",
match=r"Tangent space parametrization .* only be .* group of subjects",
):
conn_measure.fit_transform([np.ones((100, 40))])
@ -873,7 +874,7 @@ def test_connectivity_measure_check_vectorization_option(
)
# Check not fitted error
with pytest.raises(ValueError, match="has not been fitted. "):
with pytest.raises(ValueError, match=r"has not been fitted. "):
JuniferConnectivityMeasure().inverse_transform(
vectorized_connectivities
)
@ -956,7 +957,7 @@ def test_connectivity_measure_check_inverse_transformation_discard_diag(
assert_array_almost_equal(inverse_transformed, connectivities)
with pytest.raises(
ValueError, match="cannot reconstruct connectivity matrices"
ValueError, match=r"cannot reconstruct connectivity matrices"
):
conn_measure.inverse_transform(vectorized_connectivities)
@ -1010,7 +1011,7 @@ def test_connectivity_measure_inverse_transform_tangent(
assert_array_almost_equal(inverse_transformed, covariances)
with pytest.raises(
ValueError, match="cannot reconstruct connectivity matrices"
ValueError, match=r"cannot reconstruct connectivity matrices"
):
tangent_measure.inverse_transform(vectorized_displacements)
@ -1050,7 +1051,7 @@ def test_confounds_connectivity_measure_errors() -> None:
# Raising error for input confounds are not iterable
conn_measure = JuniferConnectivityMeasure(vectorize=True)
msg = "'confounds' input argument must be an iterable"
msg = r"'confounds' input argument must be an iterable"
with pytest.raises(ValueError, match=msg):
conn_measure._check_input(X=signals, confounds=1.0)
@ -1066,7 +1067,7 @@ def test_confounds_connectivity_measure_errors() -> None:
# Raising error for input confounds are given but not vectorize=True
conn_measure = JuniferConnectivityMeasure(vectorize=False)
with pytest.raises(
ValueError, match="'confounds' are provided but vectorize=False"
ValueError, match=r"'confounds' are provided but vectorize=False"
):
conn_measure.fit_transform(signals, None, confounds[:10])
@ -1082,7 +1083,7 @@ def test_connectivity_measure_standardize(
The input signals.
"""
match = "default strategy for standardize"
match = r"default strategy for standardize"
with pytest.warns(DeprecationWarning, match=match):
JuniferConnectivityMeasure(kind="correlation").fit_transform(signals)
@ -1101,7 +1102,7 @@ def test_connectivity_measure_standardize(
)
def test_xi_correlation_error() -> None:
"""Check xi correlation according to paper."""
with pytest.raises(RuntimeError, match="scipy.stats.chatterjeexi"):
with pytest.raises(RuntimeError, match=r"scipy.stats.chatterjeexi"):
JuniferConnectivityMeasure(kind="xi correlation").fit_transform(
np.zeros((2, 2))
)

View file

@ -144,7 +144,7 @@ def test_anisotropic_sphere_extraction() -> None:
def test_errors() -> None:
"""Test errors."""
masker = JuniferNiftiSpheresMasker(seeds=([1, 2]), radius=0.2)
with pytest.raises(ValueError, match="Seeds must be a list .+"):
with pytest.raises(ValueError, match=r"Seeds must be a list .+"):
masker.fit()
@ -183,7 +183,7 @@ def test_nifti_spheres_masker_overlap() -> None:
radius=2,
allow_overlap=False,
)
with pytest.raises(ValueError, match="Overlap detected"):
with pytest.raises(ValueError, match=r"Overlap detected"):
noverlapping_masker.fit_transform(fmri_img)
@ -288,7 +288,7 @@ def test_nifti_spheres_masker_inverse_transform() -> None:
masker = JuniferNiftiSpheresMasker(seeds=[(1, 1, 1)], radius=1)
with pytest.raises(
NotImplementedError,
match="some of which are non-reversible",
match=r"some of which are non-reversible",
):
masker.inverse_transform(data[0, 0, 0, :])
@ -319,7 +319,7 @@ def test_nifti_spheres_masker_io_shapes() -> None:
masker.fit()
# DeprecationWarning *should* be raised for 3D inputs
with pytest.warns(DeprecationWarning, match="Starting in version 0.12"):
with pytest.warns(DeprecationWarning, match=r"Starting in version 0.12"):
test_data = masker.transform(img_3d)
assert test_data.shape == (1, n_regions)

View file

@ -26,16 +26,16 @@ from junifer.testing.datagrabbers import (
def test_fMRIPrepConfoundRemover_init() -> None:
"""Test fMRIPrepConfoundRemover init."""
with pytest.raises(ValueError, match="keys must be strings"):
with pytest.raises(ValueError, match=r"keys must be strings"):
fMRIPrepConfoundRemover(strategy={1: "full"}) # type: ignore
with pytest.raises(ValueError, match="values must be strings"):
with pytest.raises(ValueError, match=r"values must be strings"):
fMRIPrepConfoundRemover(strategy={"motion": 1}) # type: ignore
with pytest.raises(ValueError, match="component names"):
with pytest.raises(ValueError, match=r"component names"):
fMRIPrepConfoundRemover(strategy={"wrong": "full"})
with pytest.raises(ValueError, match="confound types"):
with pytest.raises(ValueError, match=r"confound types"):
fMRIPrepConfoundRemover(strategy={"motion": "wrong"})
@ -342,7 +342,7 @@ def test_fMRIPrepConfoundRemover__get_scrub_regressors_errors(
The parametrized preprocessor.
"""
with pytest.raises(RuntimeError, match="Invalid confounds file."):
with pytest.raises(RuntimeError, match=r"Invalid confounds file."):
preprocessor._get_scrub_regressors(pd.DataFrame({"a": [1, 2]}))
@ -354,7 +354,7 @@ def test_fMRIPrepConfoundRemover__validate_data() -> None:
element_data = DefaultDataReader().fit_transform(dg["sub-01"])
vbm = element_data["VBM_GM"]
with pytest.raises(
DimensionError, match="incompatible dimensionality"
DimensionError, match=r"incompatible dimensionality"
):
confound_remover._validate_data(vbm)
# Check missing nested type in correct data type
@ -363,22 +363,22 @@ def test_fMRIPrepConfoundRemover__validate_data() -> None:
bold = element_data["BOLD"]
# Test confound type
with pytest.raises(
ValueError, match="`BOLD.confounds` data type not provided"
ValueError, match=r"`BOLD.confounds` data type not provided"
):
confound_remover._validate_data(bold)
# Test confound data
bold["confounds"] = {}
with pytest.raises(
ValueError, match="`BOLD.confounds.data` not provided"
ValueError, match=r"`BOLD.confounds.data` not provided"
):
confound_remover._validate_data(bold)
# Test confound data is valid type
bold["confounds"] = {"data": None}
with pytest.raises(ValueError, match="must be a `pandas.DataFrame`"):
with pytest.raises(ValueError, match=r"must be a `pandas.DataFrame`"):
confound_remover._validate_data(bold)
# Test confound data dimension mismatch with BOLD
bold["confounds"] = {"data": pd.DataFrame()}
with pytest.raises(ValueError, match="Image time series and"):
with pytest.raises(ValueError, match=r"Image time series and"):
confound_remover._validate_data(bold)
# Check nested type variations
with PartlyCloudyTestingDataGrabber(reduce_confounds=False) as dg:
@ -393,19 +393,19 @@ def test_fMRIPrepConfoundRemover__validate_data() -> None:
}
# Test incorrect format
modified_bold["confounds"].update({"format": "wrong"})
with pytest.raises(ValueError, match="Invalid confounds format"):
with pytest.raises(ValueError, match=r"Invalid confounds format"):
confound_remover._validate_data(modified_bold)
# Test missing mappings for adhoc
modified_bold["confounds"].update({"format": "adhoc"})
with pytest.raises(
ValueError, match="`BOLD.confounds.mappings` need to be set"
ValueError, match=r"`BOLD.confounds.mappings` need to be set"
):
confound_remover._validate_data(modified_bold)
# Test missing fmriprep mappings for adhoc
modified_bold["confounds"].update({"mappings": {}})
with pytest.raises(
ValueError,
match="`BOLD.confounds.mappings.fmriprep` need to be set",
match=r"`BOLD.confounds.mappings.fmriprep` need to be set",
):
confound_remover._validate_data(modified_bold)
# Test incorrect fmriprep mappings for adhoc

View file

@ -1174,7 +1174,7 @@ def test_collect_error_single_output() -> None:
"""Test error for collect in single output storage."""
with pytest.raises(
NotImplementedError,
match="is not implemented for single output.",
match=r"is not implemented for single output.",
):
storage = HDF5FeatureStorage(uri="/tmp", single_output=True)
storage.collect()

View file

@ -211,7 +211,7 @@ def test_process_meta_element(meta: dict, elements: list[str]) -> None:
The parametrized elements to assert against.
"""
hash1, processed_meta, _ = process_meta(meta)
_, processed_meta, _ = process_meta(meta)
assert "_element_keys" in processed_meta
assert processed_meta["_element_keys"] == elements
assert "A" in processed_meta

View file

@ -41,41 +41,41 @@ def test_get_aggfunc_by_name(name: str, params: Optional[dict]) -> None:
def test_get_aggfunc_by_name_errors() -> None:
"""Test aggregation function retrieval using wrong name."""
with pytest.raises(ValueError, match="unknown. Please provide any of"):
with pytest.raises(ValueError, match=r"unknown. Please provide any of"):
get_aggfunc_by_name(name="invalid", func_params=None)
with pytest.raises(ValueError, match="list of limits"):
with pytest.raises(ValueError, match=r"list of limits"):
get_aggfunc_by_name(name="winsorized_mean", func_params=None)
with pytest.raises(ValueError, match="list of limits"):
with pytest.raises(ValueError, match=r"list of limits"):
get_aggfunc_by_name(
name="winsorized_mean", func_params={"limits": 0.1}
)
with pytest.raises(ValueError, match="list of two limits"):
with pytest.raises(ValueError, match=r"list of two limits"):
get_aggfunc_by_name(
name="winsorized_mean", func_params={"limits": [0.2]}
)
with pytest.raises(ValueError, match="list of two"):
with pytest.raises(ValueError, match=r"list of two"):
get_aggfunc_by_name(
name="winsorized_mean", func_params={"limits": [0.2, 0.7, 0.1]}
)
with pytest.raises(ValueError, match="must be between 0 and 1"):
with pytest.raises(ValueError, match=r"must be between 0 and 1"):
get_aggfunc_by_name(
name="winsorized_mean", func_params={"limits": [-1, 0.7]}
)
with pytest.raises(ValueError, match="must be between 0 and 1"):
with pytest.raises(ValueError, match=r"must be between 0 and 1"):
get_aggfunc_by_name(
name="winsorized_mean", func_params={"limits": [0.1, 2]}
)
with pytest.raises(ValueError, match="must be specified."):
with pytest.raises(ValueError, match=r"must be specified."):
get_aggfunc_by_name(name="select", func_params=None)
with pytest.raises(ValueError, match="must be specified, not both."):
with pytest.raises(ValueError, match=r"must be specified, not both."):
get_aggfunc_by_name(
name="select", func_params={"pick": [0], "drop": [1]}
)
@ -110,10 +110,10 @@ def test_select() -> None:
"""Test select."""
input = np.arange(28).reshape(7, 4)
with pytest.raises(ValueError, match="must be specified."):
with pytest.raises(ValueError, match=r"must be specified."):
select(input, axis=2)
with pytest.raises(ValueError, match="must be specified, not both."):
with pytest.raises(ValueError, match=r"must be specified, not both."):
select(input, pick=[1], drop=[2], axis=2)
out1 = select(input, pick=[1], axis=0)