junifer 0.0.6.dev248__py3-none-any.whl → 0.0.6.dev252__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. junifer/_version.py +2 -2
  2. junifer/api/decorators.py +1 -2
  3. junifer/api/functions.py +18 -18
  4. junifer/api/queue_context/gnu_parallel_local_adapter.py +4 -4
  5. junifer/api/queue_context/htcondor_adapter.py +4 -4
  6. junifer/api/queue_context/tests/test_gnu_parallel_local_adapter.py +3 -3
  7. junifer/api/queue_context/tests/test_htcondor_adapter.py +3 -3
  8. junifer/api/tests/test_functions.py +32 -32
  9. junifer/cli/cli.py +3 -3
  10. junifer/cli/parser.py +4 -4
  11. junifer/cli/tests/test_cli.py +5 -5
  12. junifer/cli/utils.py +5 -6
  13. junifer/configs/juseless/datagrabbers/ixi_vbm.py +2 -2
  14. junifer/configs/juseless/datagrabbers/tests/test_ucla.py +2 -2
  15. junifer/configs/juseless/datagrabbers/ucla.py +4 -4
  16. junifer/data/_dispatch.py +11 -14
  17. junifer/data/coordinates/_ants_coordinates_warper.py +3 -3
  18. junifer/data/coordinates/_coordinates.py +6 -6
  19. junifer/data/coordinates/_fsl_coordinates_warper.py +3 -3
  20. junifer/data/masks/_ants_mask_warper.py +3 -3
  21. junifer/data/masks/_fsl_mask_warper.py +3 -3
  22. junifer/data/masks/_masks.py +6 -9
  23. junifer/data/masks/tests/test_masks.py +4 -4
  24. junifer/data/parcellations/_ants_parcellation_warper.py +3 -3
  25. junifer/data/parcellations/_fsl_parcellation_warper.py +3 -3
  26. junifer/data/parcellations/_parcellations.py +19 -19
  27. junifer/data/parcellations/tests/test_parcellations.py +1 -2
  28. junifer/data/pipeline_data_registry_base.py +3 -2
  29. junifer/data/template_spaces.py +3 -3
  30. junifer/data/tests/test_data_utils.py +1 -2
  31. junifer/data/utils.py +4 -3
  32. junifer/datagrabber/aomic/id1000.py +2 -2
  33. junifer/datagrabber/aomic/piop1.py +5 -5
  34. junifer/datagrabber/aomic/piop2.py +5 -5
  35. junifer/datagrabber/aomic/tests/test_id1000.py +3 -3
  36. junifer/datagrabber/aomic/tests/test_piop1.py +4 -4
  37. junifer/datagrabber/aomic/tests/test_piop2.py +4 -4
  38. junifer/datagrabber/base.py +12 -11
  39. junifer/datagrabber/datalad_base.py +3 -3
  40. junifer/datagrabber/dmcc13_benchmark.py +8 -8
  41. junifer/datagrabber/hcp1200/datalad_hcp1200.py +3 -3
  42. junifer/datagrabber/hcp1200/hcp1200.py +8 -8
  43. junifer/datagrabber/hcp1200/tests/test_hcp1200.py +2 -1
  44. junifer/datagrabber/multiple.py +7 -7
  45. junifer/datagrabber/pattern.py +10 -10
  46. junifer/datagrabber/pattern_validation_mixin.py +10 -10
  47. junifer/datagrabber/tests/test_datalad_base.py +7 -8
  48. junifer/datagrabber/tests/test_dmcc13_benchmark.py +2 -2
  49. junifer/datagrabber/tests/test_pattern_validation_mixin.py +6 -6
  50. junifer/datareader/default.py +6 -6
  51. junifer/external/nilearn/junifer_connectivity_measure.py +2 -2
  52. junifer/external/nilearn/junifer_nifti_spheres_masker.py +4 -4
  53. junifer/external/nilearn/tests/test_junifer_connectivity_measure.py +15 -15
  54. junifer/external/nilearn/tests/test_junifer_nifti_spheres_masker.py +2 -3
  55. junifer/markers/base.py +8 -8
  56. junifer/markers/brainprint.py +7 -9
  57. junifer/markers/complexity/complexity_base.py +6 -8
  58. junifer/markers/complexity/hurst_exponent.py +5 -5
  59. junifer/markers/complexity/multiscale_entropy_auc.py +5 -5
  60. junifer/markers/complexity/perm_entropy.py +5 -5
  61. junifer/markers/complexity/range_entropy.py +5 -5
  62. junifer/markers/complexity/range_entropy_auc.py +5 -5
  63. junifer/markers/complexity/sample_entropy.py +5 -5
  64. junifer/markers/complexity/weighted_perm_entropy.py +5 -5
  65. junifer/markers/ets_rss.py +7 -7
  66. junifer/markers/falff/_afni_falff.py +1 -2
  67. junifer/markers/falff/_junifer_falff.py +1 -2
  68. junifer/markers/falff/falff_base.py +2 -4
  69. junifer/markers/falff/falff_parcels.py +7 -7
  70. junifer/markers/falff/falff_spheres.py +6 -6
  71. junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py +6 -6
  72. junifer/markers/functional_connectivity/edge_functional_connectivity_parcels.py +7 -7
  73. junifer/markers/functional_connectivity/edge_functional_connectivity_spheres.py +6 -6
  74. junifer/markers/functional_connectivity/functional_connectivity_base.py +10 -10
  75. junifer/markers/functional_connectivity/functional_connectivity_parcels.py +7 -7
  76. junifer/markers/functional_connectivity/functional_connectivity_spheres.py +6 -6
  77. junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_parcels.py +1 -2
  78. junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_spheres.py +1 -2
  79. junifer/markers/functional_connectivity/tests/test_functional_connectivity_parcels.py +3 -3
  80. junifer/markers/functional_connectivity/tests/test_functional_connectivity_spheres.py +3 -3
  81. junifer/markers/parcel_aggregation.py +8 -8
  82. junifer/markers/reho/_afni_reho.py +1 -2
  83. junifer/markers/reho/_junifer_reho.py +1 -2
  84. junifer/markers/reho/reho_base.py +2 -4
  85. junifer/markers/reho/reho_parcels.py +8 -8
  86. junifer/markers/reho/reho_spheres.py +7 -7
  87. junifer/markers/sphere_aggregation.py +8 -8
  88. junifer/markers/temporal_snr/temporal_snr_base.py +8 -8
  89. junifer/markers/temporal_snr/temporal_snr_parcels.py +6 -6
  90. junifer/markers/temporal_snr/temporal_snr_spheres.py +5 -5
  91. junifer/markers/utils.py +3 -3
  92. junifer/onthefly/_brainprint.py +2 -2
  93. junifer/onthefly/read_transform.py +3 -3
  94. junifer/pipeline/marker_collection.py +4 -4
  95. junifer/pipeline/pipeline_component_registry.py +5 -4
  96. junifer/pipeline/pipeline_step_mixin.py +7 -7
  97. junifer/pipeline/tests/test_pipeline_component_registry.py +2 -3
  98. junifer/pipeline/tests/test_pipeline_step_mixin.py +19 -19
  99. junifer/pipeline/tests/test_update_meta_mixin.py +4 -4
  100. junifer/pipeline/update_meta_mixin.py +2 -2
  101. junifer/pipeline/utils.py +5 -5
  102. junifer/preprocess/base.py +10 -10
  103. junifer/preprocess/confounds/fmriprep_confound_remover.py +11 -14
  104. junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py +1 -2
  105. junifer/preprocess/smoothing/smoothing.py +7 -7
  106. junifer/preprocess/warping/_ants_warper.py +3 -4
  107. junifer/preprocess/warping/_fsl_warper.py +3 -4
  108. junifer/preprocess/warping/space_warper.py +6 -6
  109. junifer/preprocess/warping/tests/test_space_warper.py +3 -4
  110. junifer/stats.py +4 -4
  111. junifer/storage/base.py +14 -13
  112. junifer/storage/hdf5.py +21 -20
  113. junifer/storage/pandas_base.py +12 -11
  114. junifer/storage/sqlite.py +11 -11
  115. junifer/storage/tests/test_hdf5.py +1 -2
  116. junifer/storage/tests/test_sqlite.py +2 -2
  117. junifer/storage/tests/test_utils.py +8 -7
  118. junifer/storage/utils.py +7 -7
  119. junifer/testing/datagrabbers.py +9 -10
  120. junifer/tests/test_stats.py +2 -2
  121. junifer/typing/_typing.py +6 -9
  122. junifer/utils/helpers.py +2 -3
  123. junifer/utils/logging.py +5 -5
  124. junifer/utils/singleton.py +3 -3
  125. {junifer-0.0.6.dev248.dist-info → junifer-0.0.6.dev252.dist-info}/METADATA +2 -2
  126. {junifer-0.0.6.dev248.dist-info → junifer-0.0.6.dev252.dist-info}/RECORD +131 -131
  127. {junifer-0.0.6.dev248.dist-info → junifer-0.0.6.dev252.dist-info}/AUTHORS.rst +0 -0
  128. {junifer-0.0.6.dev248.dist-info → junifer-0.0.6.dev252.dist-info}/LICENSE.md +0 -0
  129. {junifer-0.0.6.dev248.dist-info → junifer-0.0.6.dev252.dist-info}/WHEEL +0 -0
  130. {junifer-0.0.6.dev248.dist-info → junifer-0.0.6.dev252.dist-info}/entry_points.txt +0 -0
  131. {junifer-0.0.6.dev248.dist-info → junifer-0.0.6.dev252.dist-info}/top_level.txt +0 -0
@@ -6,7 +6,6 @@
6
6
 
7
7
  import tempfile
8
8
  from pathlib import Path
9
- from typing import Dict, List
10
9
 
11
10
  import nibabel as nib
12
11
  from nilearn import datasets, image
@@ -35,7 +34,7 @@ class OasisVBMTestingDataGrabber(BaseDataGrabber):
35
34
  types = ["VBM_GM"]
36
35
  super().__init__(types=types, datadir=datadir)
37
36
 
38
- def get_element_keys(self) -> List[str]:
37
+ def get_element_keys(self) -> list[str]:
39
38
  """Get element keys.
40
39
 
41
40
  Returns
@@ -46,7 +45,7 @@ class OasisVBMTestingDataGrabber(BaseDataGrabber):
46
45
  """
47
46
  return ["subject"]
48
47
 
49
- def get_item(self, subject: str) -> Dict[str, Dict]:
48
+ def get_item(self, subject: str) -> dict[str, dict]:
50
49
  """Implement indexing support.
51
50
 
52
51
  Parameters
@@ -80,7 +79,7 @@ class OasisVBMTestingDataGrabber(BaseDataGrabber):
80
79
  self._dataset = datasets.fetch_oasis_vbm(n_subjects=10)
81
80
  return self
82
81
 
83
- def get_elements(self) -> List[str]:
82
+ def get_elements(self) -> list[str]:
84
83
  """Get elements.
85
84
 
86
85
  Returns
@@ -106,7 +105,7 @@ class SPMAuditoryTestingDataGrabber(BaseDataGrabber):
106
105
  types = ["BOLD", "T1w"] # TODO: Check that they are T1w
107
106
  super().__init__(types=types, datadir=datadir)
108
107
 
109
- def get_element_keys(self) -> List[str]:
108
+ def get_element_keys(self) -> list[str]:
110
109
  """Get element keys.
111
110
 
112
111
  Returns
@@ -117,7 +116,7 @@ class SPMAuditoryTestingDataGrabber(BaseDataGrabber):
117
116
  """
118
117
  return ["subject"]
119
118
 
120
- def get_elements(self) -> List[str]:
119
+ def get_elements(self) -> list[str]:
121
120
  """Get elements.
122
121
 
123
122
  Returns
@@ -128,7 +127,7 @@ class SPMAuditoryTestingDataGrabber(BaseDataGrabber):
128
127
  """
129
128
  return [f"sub{x:03d}" for x in list(range(1, 11))]
130
129
 
131
- def get_item(self, subject: str) -> Dict[str, Dict]:
130
+ def get_item(self, subject: str) -> dict[str, dict]:
132
131
  """Implement indexing support.
133
132
 
134
133
  Parameters
@@ -208,7 +207,7 @@ class PartlyCloudyTestingDataGrabber(BaseDataGrabber):
208
207
  )
209
208
  return self
210
209
 
211
- def get_element_keys(self) -> List[str]:
210
+ def get_element_keys(self) -> list[str]:
212
211
  """Get element keys.
213
212
 
214
213
  Returns
@@ -219,7 +218,7 @@ class PartlyCloudyTestingDataGrabber(BaseDataGrabber):
219
218
  """
220
219
  return ["subject"]
221
220
 
222
- def get_elements(self) -> List[str]:
221
+ def get_elements(self) -> list[str]:
223
222
  """Get elements.
224
223
 
225
224
  Returns
@@ -230,7 +229,7 @@ class PartlyCloudyTestingDataGrabber(BaseDataGrabber):
230
229
  """
231
230
  return [f"sub-{x:02d}" for x in list(range(1, 11))]
232
231
 
233
- def get_item(self, subject: str) -> Dict[str, Dict]:
232
+ def get_item(self, subject: str) -> dict[str, dict]:
234
233
  """Implement indexing support.
235
234
 
236
235
  Parameters
@@ -3,7 +3,7 @@
3
3
  # Authors: Synchon Mandal <s.mandal@fz-juelich.de>
4
4
  # License: AGPL
5
5
 
6
- from typing import Dict, Optional
6
+ from typing import Optional
7
7
 
8
8
  import numpy as np
9
9
  import pytest
@@ -25,7 +25,7 @@ from junifer.stats import count, get_aggfunc_by_name, select, winsorized_mean
25
25
  ("mode", {"keepdims": True}),
26
26
  ],
27
27
  )
28
- def test_get_aggfunc_by_name(name: str, params: Optional[Dict]) -> None:
28
+ def test_get_aggfunc_by_name(name: str, params: Optional[dict]) -> None:
29
29
  """Test aggregation function retrieval by name.
30
30
 
31
31
  Parameters
junifer/typing/_typing.py CHANGED
@@ -3,12 +3,9 @@
3
3
  # Authors: Synchon Mandal <s.mandal@fz-juelich.de>
4
4
  # License: AGPL
5
5
 
6
+ from collections.abc import MutableMapping, Sequence
6
7
  from typing import (
7
8
  TYPE_CHECKING,
8
- AbstractSet,
9
- MutableMapping,
10
- Sequence,
11
- Type,
12
9
  Union,
13
10
  )
14
11
 
@@ -34,10 +31,10 @@ __all__ = [
34
31
  ]
35
32
 
36
33
 
37
- DataGrabberLike = Type["BaseDataGrabber"]
38
- PreprocessorLike = Type["BasePreprocessor"]
39
- MarkerLike = Type["BaseMarker"]
40
- StorageLike = Type["BaseFeatureStorage"]
34
+ DataGrabberLike = type["BaseDataGrabber"]
35
+ PreprocessorLike = type["BasePreprocessor"]
36
+ MarkerLike = type["BaseMarker"]
37
+ StorageLike = type["BaseFeatureStorage"]
41
38
  PipelineComponent = Union[
42
39
  "DataGrabberLike",
43
40
  "DefaultDataReader",
@@ -45,7 +42,7 @@ PipelineComponent = Union[
45
42
  "MarkerLike",
46
43
  "StorageLike",
47
44
  ]
48
- Dependencies = AbstractSet[str]
45
+ Dependencies = set[str]
49
46
  ConditionalDependencies = Sequence[
50
47
  MutableMapping[
51
48
  str,
junifer/utils/helpers.py CHANGED
@@ -6,7 +6,6 @@
6
6
  import collections.abc
7
7
  import subprocess
8
8
  import sys
9
- from typing import Dict, List
10
9
 
11
10
  from .logging import logger, raise_error
12
11
 
@@ -14,7 +13,7 @@ from .logging import logger, raise_error
14
13
  __all__ = ["run_ext_cmd", "deep_update"]
15
14
 
16
15
 
17
- def run_ext_cmd(name: str, cmd: List[str]) -> None:
16
+ def run_ext_cmd(name: str, cmd: list[str]) -> None:
18
17
  """Run external command via subprocess.
19
18
 
20
19
  Parameters
@@ -58,7 +57,7 @@ def run_ext_cmd(name: str, cmd: List[str]) -> None:
58
57
  )
59
58
 
60
59
 
61
- def deep_update(d: Dict, u: Dict) -> Dict:
60
+ def deep_update(d: dict, u: dict) -> dict:
62
61
  """Deep update `d` with `u`.
63
62
 
64
63
  From: "https://stackoverflow.com/questions/3232943/update-value-of-a-nested
junifer/utils/logging.py CHANGED
@@ -16,7 +16,7 @@ import logging
16
16
  import warnings
17
17
  from pathlib import Path
18
18
  from subprocess import PIPE, Popen, TimeoutExpired
19
- from typing import Dict, NoReturn, Optional, Type, Union
19
+ from typing import NoReturn, Optional, Union
20
20
  from warnings import warn
21
21
 
22
22
  import datalad
@@ -119,7 +119,7 @@ def _get_git_head(path: Path) -> str:
119
119
  return proc_stdout
120
120
 
121
121
 
122
- def get_versions() -> Dict:
122
+ def get_versions() -> dict:
123
123
  """Import stuff and get versions if module.
124
124
 
125
125
  Returns
@@ -189,7 +189,7 @@ def _close_handlers(logger: logging.Logger) -> None:
189
189
  logger.removeHandler(handler)
190
190
 
191
191
 
192
- def _safe_log(versions: Dict, name: str) -> None:
192
+ def _safe_log(versions: dict, name: str) -> None:
193
193
  """Log with safety.
194
194
 
195
195
  Parameters
@@ -308,7 +308,7 @@ def configure_logging(
308
308
 
309
309
  def raise_error(
310
310
  msg: str,
311
- klass: Type[Exception] = ValueError,
311
+ klass: type[Exception] = ValueError,
312
312
  exception: Optional[Exception] = None,
313
313
  ) -> NoReturn:
314
314
  """Raise error, but first log it.
@@ -331,7 +331,7 @@ def raise_error(
331
331
 
332
332
 
333
333
  def warn_with_log(
334
- msg: str, category: Optional[Type[Warning]] = RuntimeWarning
334
+ msg: str, category: Optional[type[Warning]] = RuntimeWarning
335
335
  ) -> None:
336
336
  """Warn, but first log it.
337
337
 
@@ -5,7 +5,7 @@
5
5
  # License: AGPL
6
6
 
7
7
  from abc import ABCMeta
8
- from typing import Any, ClassVar, Dict, Type
8
+ from typing import Any, ClassVar
9
9
 
10
10
 
11
11
  __all__ = ["Singleton", "ABCSingleton"]
@@ -21,9 +21,9 @@ class Singleton(type):
21
21
 
22
22
  """
23
23
 
24
- instances: ClassVar[Dict] = {}
24
+ instances: ClassVar[dict] = {}
25
25
 
26
- def __call__(cls, *args: Any, **kwargs: Any) -> Type:
26
+ def __call__(cls, *args: Any, **kwargs: Any) -> type:
27
27
  """Get the only instance for a class.
28
28
 
29
29
  Parameters
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: junifer
3
- Version: 0.0.6.dev248
3
+ Version: 0.0.6.dev252
4
4
  Summary: JUelich NeuroImaging FEature extractoR
5
5
  Author-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
6
6
  Maintainer-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
@@ -24,7 +24,7 @@ Classifier: Programming Language :: Python :: 3.10
24
24
  Classifier: Programming Language :: Python :: 3.11
25
25
  Classifier: Programming Language :: Python :: 3.12
26
26
  Classifier: Programming Language :: Python :: 3.13
27
- Requires-Python: >=3.8
27
+ Requires-Python: >=3.9
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE.md
30
30
  License-File: AUTHORS.rst