From 4b33efe1e7502a0b60f8dc7289b59d99d02d928c Mon Sep 17 00:00:00 2001 From: James Kent Date: Fri, 2 Feb 2024 11:31:00 -0600 Subject: [PATCH] [MAINT] use updated black (#876) use updated black --- nimare/__init__.py | 1 + nimare/annotate/cogat.py | 1 + nimare/annotate/gclda.py | 1 + nimare/annotate/lda.py | 1 + nimare/annotate/text.py | 1 + nimare/annotate/utils.py | 1 + nimare/base.py | 1 + nimare/cli.py | 1 + nimare/correct.py | 7 ++--- nimare/dataset.py | 1 + nimare/decode/base.py | 1 + nimare/decode/continuous.py | 1 + nimare/decode/discrete.py | 1 + nimare/decode/encode.py | 1 + nimare/decode/utils.py | 1 + nimare/diagnostics.py | 9 ++++--- nimare/estimator.py | 1 + nimare/extract/__init__.py | 1 + nimare/extract/extract.py | 1 + nimare/extract/utils.py | 1 + nimare/generate.py | 1 + nimare/io.py | 1 + nimare/meta/cbma/__init__.py | 1 + nimare/meta/cbma/ale.py | 1 + nimare/meta/cbma/base.py | 13 +++++----- nimare/meta/cbma/mkda.py | 13 +++++----- nimare/meta/cbmr.py | 30 +++++++++++----------- nimare/meta/ibma.py | 9 ++++--- nimare/meta/kernel.py | 1 + nimare/meta/models.py | 14 ++++------ nimare/meta/utils.py | 1 + nimare/reports/figures.py | 1 + nimare/results.py | 1 + nimare/stats.py | 1 + nimare/tests/conftest.py | 1 + nimare/tests/test_annotate_cogat.py | 1 + nimare/tests/test_annotate_gclda.py | 1 + nimare/tests/test_annotate_lda.py | 1 + nimare/tests/test_dataset.py | 1 + nimare/tests/test_decode_continuous.py | 1 + nimare/tests/test_decode_discrete.py | 1 + nimare/tests/test_diagnostics.py | 1 + nimare/tests/test_estimator_performance.py | 1 + nimare/tests/test_extract.py | 1 + nimare/tests/test_generate.py | 1 + nimare/tests/test_io.py | 1 + nimare/tests/test_meta_ale.py | 1 + nimare/tests/test_meta_cbmr.py | 1 + nimare/tests/test_meta_ibma.py | 1 + nimare/tests/test_meta_kernel.py | 1 + nimare/tests/test_meta_mkda.py | 1 + nimare/tests/test_nimads.py | 1 + nimare/tests/test_reports.py | 1 + nimare/tests/test_stats.py | 1 + nimare/tests/test_transforms.py | 1 + nimare/tests/test_utils.py | 1 + nimare/tests/test_workflows.py | 1 + nimare/tests/utils.py | 1 + nimare/utils.py | 1 + nimare/workflows/base.py | 1 + nimare/workflows/cbma.py | 1 + nimare/workflows/ibma.py | 1 + nimare/workflows/macm.py | 1 + nimare/workflows/misc.py | 1 + 64 files changed, 107 insertions(+), 45 deletions(-) diff --git a/nimare/__init__.py b/nimare/__init__.py index cf9172712..c4329500d 100755 --- a/nimare/__init__.py +++ b/nimare/__init__.py @@ -1,4 +1,5 @@ """NiMARE: Neuroimaging Meta-Analysis Research Environment.""" + import logging import warnings diff --git a/nimare/annotate/cogat.py b/nimare/annotate/cogat.py index 0f17890d0..8f50ccf33 100755 --- a/nimare/annotate/cogat.py +++ b/nimare/annotate/cogat.py @@ -1,4 +1,5 @@ """Automated annotation of Cognitive Atlas labels.""" + import logging import re diff --git a/nimare/annotate/gclda.py b/nimare/annotate/gclda.py index 2a99be855..24deccf4e 100755 --- a/nimare/annotate/gclda.py +++ b/nimare/annotate/gclda.py @@ -1,4 +1,5 @@ """Topic modeling with generalized correspondence latent Dirichlet allocation.""" + import logging import os.path as op diff --git a/nimare/annotate/lda.py b/nimare/annotate/lda.py index 17fd0438d..a9c277897 100644 --- a/nimare/annotate/lda.py +++ b/nimare/annotate/lda.py @@ -1,4 +1,5 @@ """Topic modeling with latent Dirichlet allocation.""" + import numpy as np import pandas as pd from sklearn.decomposition import LatentDirichletAllocation diff --git a/nimare/annotate/text.py b/nimare/annotate/text.py index 69929e7e4..c574b40b3 100755 --- a/nimare/annotate/text.py +++ b/nimare/annotate/text.py @@ -1,4 +1,5 @@ """Text extraction tools.""" + import logging import os.path as op diff --git a/nimare/annotate/utils.py b/nimare/annotate/utils.py index 4682ca5f7..feb1f79fe 100644 --- a/nimare/annotate/utils.py +++ b/nimare/annotate/utils.py @@ -1,4 +1,5 @@ """Utility functions for ontology tools.""" + import numpy as np import pandas as pd diff --git a/nimare/base.py b/nimare/base.py index ed6594f73..39fa7ccdd 100644 --- a/nimare/base.py +++ b/nimare/base.py @@ -1,4 +1,5 @@ """Base classes for NiMARE.""" + import gzip import inspect import logging diff --git a/nimare/cli.py b/nimare/cli.py index 89ad3bdae..403ab359b 100644 --- a/nimare/cli.py +++ b/nimare/cli.py @@ -1,4 +1,5 @@ """Command-line interfaces for common workflows.""" + import argparse import os.path as op diff --git a/nimare/correct.py b/nimare/correct.py index 9d379bb6a..1b5dceab8 100644 --- a/nimare/correct.py +++ b/nimare/correct.py @@ -1,4 +1,5 @@ """Multiple comparisons correction methods.""" + import inspect import logging from abc import abstractproperty @@ -142,9 +143,9 @@ def inspect(cls, result): duplicate_methods = list(set(corr_methods) & set(est_methods)) for duplicate_method in duplicate_methods: if duplicate_method in corr_methods: - corr_methods[ - corr_methods.index(duplicate_method) - ] = f"{duplicate_method} (overridden)" + corr_methods[corr_methods.index(duplicate_method)] = ( + f"{duplicate_method} (overridden)" + ) LGR.info( f"Available non-specific methods: {', '.join(corr_methods)}\n" diff --git a/nimare/dataset.py b/nimare/dataset.py index 3c93d542f..21cd5952d 100755 --- a/nimare/dataset.py +++ b/nimare/dataset.py @@ -1,4 +1,5 @@ """Classes for representing datasets of images and/or coordinates.""" + import copy import inspect import json diff --git a/nimare/decode/base.py b/nimare/decode/base.py index ae70fa699..cc65cf65d 100644 --- a/nimare/decode/base.py +++ b/nimare/decode/base.py @@ -1,4 +1,5 @@ """Base classes for the decode module.""" + import logging from abc import abstractmethod diff --git a/nimare/decode/continuous.py b/nimare/decode/continuous.py index 7d110e15e..9ac757c7f 100755 --- a/nimare/decode/continuous.py +++ b/nimare/decode/continuous.py @@ -1,4 +1,5 @@ """Methods for decoding unthresholded brain maps into text.""" + import inspect import logging import os diff --git a/nimare/decode/discrete.py b/nimare/decode/discrete.py index d624134fc..c02955c78 100755 --- a/nimare/decode/discrete.py +++ b/nimare/decode/discrete.py @@ -1,4 +1,5 @@ """Methods for decoding subsets of voxels or experiments into text.""" + import numpy as np import pandas as pd from nilearn._utils import load_niimg diff --git a/nimare/decode/encode.py b/nimare/decode/encode.py index b4f335009..e1ae2854a 100755 --- a/nimare/decode/encode.py +++ b/nimare/decode/encode.py @@ -1,4 +1,5 @@ """Methods for encoding text into brain maps.""" + import numpy as np from nilearn.masking import unmask from sklearn.feature_extraction.text import CountVectorizer diff --git a/nimare/decode/utils.py b/nimare/decode/utils.py index b379808ff..dae58dacc 100644 --- a/nimare/decode/utils.py +++ b/nimare/decode/utils.py @@ -1,4 +1,5 @@ """Utility functions for decoding/encoding.""" + import numpy as np diff --git a/nimare/diagnostics.py b/nimare/diagnostics.py index 31774e5f0..d1b5c388e 100644 --- a/nimare/diagnostics.py +++ b/nimare/diagnostics.py @@ -1,4 +1,5 @@ """Methods for diagnosing problems in meta-analytic datasets or analyses.""" + import copy import logging from abc import abstractmethod @@ -154,9 +155,11 @@ def transform(self, result): clusters_table = clusters_table.astype({"Cluster ID": "str"}) # Rename the clusters_table cluster IDs to match the contribution table columns clusters_table["Cluster ID"] = [ - f"{POSTAIL_LBL} {row['Cluster ID']}" - if row["Peak Stat"] > 0 - else f"{NEGTAIL_LBL} {row['Cluster ID']}" + ( + f"{POSTAIL_LBL} {row['Cluster ID']}" + if row["Peak Stat"] > 0 + else f"{NEGTAIL_LBL} {row['Cluster ID']}" + ) for _, row in clusters_table.iterrows() ] diff --git a/nimare/estimator.py b/nimare/estimator.py index 6cfba9d4c..1346ecdfb 100644 --- a/nimare/estimator.py +++ b/nimare/estimator.py @@ -1,4 +1,5 @@ """Base class for estimators.""" + from abc import abstractmethod from joblib import Memory diff --git a/nimare/extract/__init__.py b/nimare/extract/__init__.py index 3a832bf13..c7b2b8b2d 100644 --- a/nimare/extract/__init__.py +++ b/nimare/extract/__init__.py @@ -1,4 +1,5 @@ """Dataset and trained model downloading functions.""" + from . import utils from .extract import ( download_abstracts, diff --git a/nimare/extract/extract.py b/nimare/extract/extract.py index b3f190365..8501b972f 100644 --- a/nimare/extract/extract.py +++ b/nimare/extract/extract.py @@ -1,4 +1,5 @@ """Tools for downloading datasets.""" + import itertools import json import logging diff --git a/nimare/extract/utils.py b/nimare/extract/utils.py index 66b59bcd5..783c6e584 100644 --- a/nimare/extract/utils.py +++ b/nimare/extract/utils.py @@ -1,4 +1,5 @@ """Utility functions for the extract module.""" + from __future__ import division import logging diff --git a/nimare/generate.py b/nimare/generate.py index e952ae0e4..6129ee45d 100644 --- a/nimare/generate.py +++ b/nimare/generate.py @@ -1,4 +1,5 @@ """Utilities for generating data for testing.""" + from itertools import zip_longest import numpy as np diff --git a/nimare/io.py b/nimare/io.py index abc9f4472..7ea42d092 100644 --- a/nimare/io.py +++ b/nimare/io.py @@ -1,4 +1,5 @@ """Input/Output operations.""" + import json import logging import re diff --git a/nimare/meta/cbma/__init__.py b/nimare/meta/cbma/__init__.py index d351a828f..80fd586d5 100644 --- a/nimare/meta/cbma/__init__.py +++ b/nimare/meta/cbma/__init__.py @@ -1,4 +1,5 @@ """Coordinate-based meta-analytic estimators.""" + from .ale import ALE, SCALE, ALESubtraction from .mkda import KDA, MKDAChi2, MKDADensity diff --git a/nimare/meta/cbma/ale.py b/nimare/meta/cbma/ale.py index cf794839a..8494a1835 100755 --- a/nimare/meta/cbma/ale.py +++ b/nimare/meta/cbma/ale.py @@ -1,4 +1,5 @@ """CBMA methods from the activation likelihood estimation (ALE) family.""" + import logging import numpy as np diff --git a/nimare/meta/cbma/base.py b/nimare/meta/cbma/base.py index 0899dd3e5..20ac28b9d 100644 --- a/nimare/meta/cbma/base.py +++ b/nimare/meta/cbma/base.py @@ -1,4 +1,5 @@ """CBMA methods from the ALE and MKDA families.""" + import logging from abc import abstractmethod @@ -523,9 +524,9 @@ def _compute_null_montecarlo(self, n_iters, n_cores): for perm in fwe_voxel_max: histweights[perm] += 1 - self.null_distributions_[ - "histweights_level-voxel_corr-fwe_method-montecarlo" - ] = histweights + self.null_distributions_["histweights_level-voxel_corr-fwe_method-montecarlo"] = ( + histweights + ) def _correct_fwe_montecarlo_permutation( self, @@ -793,9 +794,9 @@ def correct_fwe_montecarlo( # Voxel-level FWE LGR.info("Using null distribution for voxel-level FWE correction.") p_vfwe_values = null_to_p(stat_values, fwe_voxel_max, tail="upper") - self.null_distributions_[ - "values_level-voxel_corr-fwe_method-montecarlo" - ] = fwe_voxel_max + self.null_distributions_["values_level-voxel_corr-fwe_method-montecarlo"] = ( + fwe_voxel_max + ) z_vfwe_values = p_to_z(p_vfwe_values, tail="one") logp_vfwe_values = -np.log10(p_vfwe_values) diff --git a/nimare/meta/cbma/mkda.py b/nimare/meta/cbma/mkda.py index 2faf529bb..23814abe2 100644 --- a/nimare/meta/cbma/mkda.py +++ b/nimare/meta/cbma/mkda.py @@ -1,4 +1,5 @@ """CBMA methods from the multilevel kernel density analysis (MKDA) family.""" + import logging import nibabel as nib @@ -884,9 +885,9 @@ def correct_fwe_montecarlo(self, result, voxel_thresh=0.001, n_iters=1000, n_cor cmfwe_null=pAgF_cmfwe_null, ) - self.null_distributions_[ - "values_desc-pAgF_level-voxel_corr-fwe_method-montecarlo" - ] = pAgF_vfwe_null + self.null_distributions_["values_desc-pAgF_level-voxel_corr-fwe_method-montecarlo"] = ( + pAgF_vfwe_null + ) self.null_distributions_[ "values_desc-pAgFsize_level-cluster_corr-fwe_method-montecarlo" ] = pAgF_csfwe_null @@ -905,9 +906,9 @@ def correct_fwe_montecarlo(self, result, voxel_thresh=0.001, n_iters=1000, n_cor cmfwe_null=pFgA_cmfwe_null, ) - self.null_distributions_[ - "values_desc-pFgA_level-voxel_corr-fwe_method-montecarlo" - ] = pFgA_vfwe_null + self.null_distributions_["values_desc-pFgA_level-voxel_corr-fwe_method-montecarlo"] = ( + pFgA_vfwe_null + ) self.null_distributions_[ "values_desc-pFgAsize_level-cluster_corr-fwe_method-montecarlo" ] = pFgA_csfwe_null diff --git a/nimare/meta/cbmr.py b/nimare/meta/cbmr.py index 53268f148..370d31bde 100644 --- a/nimare/meta/cbmr.py +++ b/nimare/meta/cbmr.py @@ -835,12 +835,12 @@ def _glh_con_group(self): self.result.maps[ f"chiSquare_group-{self.t_con_groups_name[con_group_count]}" ] = chi_sq_spatial - self.result.maps[ - f"p_group-{self.t_con_groups_name[con_group_count]}" - ] = p_vals_spatial - self.result.maps[ - f"z_group-{self.t_con_groups_name[con_group_count]}" - ] = z_stats_spatial + self.result.maps[f"p_group-{self.t_con_groups_name[con_group_count]}"] = ( + p_vals_spatial + ) + self.result.maps[f"z_group-{self.t_con_groups_name[con_group_count]}"] = ( + z_stats_spatial + ) else: if m > 1: # GLH tests (with multiple contrasts) self.result.maps[f"chiSquare_GLH_groups_{con_group_count}"] = chi_sq_spatial @@ -950,17 +950,17 @@ def _glh_con_moderator(self): self.result.tables[ f"chi_square_{self.t_con_moderators_name[con_moderator_count]}" ] = pd.DataFrame(data=np.array(chi_sq_moderator), columns=["chi_square"]) - self.result.tables[ - f"p_{self.t_con_moderators_name[con_moderator_count]}" - ] = pd.DataFrame(data=np.array(p_vals_moderator), columns=["p"]) - self.result.tables[ - f"z_{self.t_con_moderators_name[con_moderator_count]}" - ] = pd.DataFrame(data=np.array(z_stats_moderator), columns=["z"]) + self.result.tables[f"p_{self.t_con_moderators_name[con_moderator_count]}"] = ( + pd.DataFrame(data=np.array(p_vals_moderator), columns=["p"]) + ) + self.result.tables[f"z_{self.t_con_moderators_name[con_moderator_count]}"] = ( + pd.DataFrame(data=np.array(z_stats_moderator), columns=["z"]) + ) else: if m_con_moderator > 1: - self.result.tables[ - f"chi_square_GLH_moderators_{con_moderator_count}" - ] = pd.DataFrame(data=np.array(chi_sq_moderator), columns=["chi_square"]) + self.result.tables[f"chi_square_GLH_moderators_{con_moderator_count}"] = ( + pd.DataFrame(data=np.array(chi_sq_moderator), columns=["chi_square"]) + ) self.result.tables[f"p_GLH_moderators_{con_moderator_count}"] = pd.DataFrame( data=np.array(p_vals_moderator), columns=["p"] ) diff --git a/nimare/meta/ibma.py b/nimare/meta/ibma.py index ba1438ffa..daef906dd 100755 --- a/nimare/meta/ibma.py +++ b/nimare/meta/ibma.py @@ -1,4 +1,5 @@ """Image-based meta-analysis estimators.""" + from __future__ import division import logging @@ -102,9 +103,11 @@ def _preprocess_input(self, dataset): if type_ == "image": # Resampling will only occur if shape/affines are different imgs = [ - nib.load(img) - if _check_same_fov(nib.load(img), reference_masker=mask_img) - else resample_to_img(nib.load(img), mask_img, **self._resample_kwargs) + ( + nib.load(img) + if _check_same_fov(nib.load(img), reference_masker=mask_img) + else resample_to_img(nib.load(img), mask_img, **self._resample_kwargs) + ) for img in self.inputs_[name] ] diff --git a/nimare/meta/kernel.py b/nimare/meta/kernel.py index d6919d570..d076c35ce 100644 --- a/nimare/meta/kernel.py +++ b/nimare/meta/kernel.py @@ -4,6 +4,7 @@ (Contrasts) from sets of foci and optional additional information (e.g., sample size and test statistic values). """ + from __future__ import division import logging diff --git a/nimare/meta/models.py b/nimare/meta/models.py index 813280367..0199ee74b 100644 --- a/nimare/meta/models.py +++ b/nimare/meta/models.py @@ -1,4 +1,5 @@ """CBMR Models.""" + import abc import logging @@ -290,9 +291,9 @@ def extract_optimized_params(self, coef_spline_bases, moderators_by_group): group_spatial_intensity_estimation = np.exp( np.matmul(coef_spline_bases, group_spatial_coef_linear_weight) ) - spatial_intensity_estimation[ - "spatialIntensity_group-" + group - ] = group_spatial_intensity_estimation + spatial_intensity_estimation["spatialIntensity_group-" + group] = ( + group_spatial_intensity_estimation + ) # Extract optimized regression coefficient of study-level moderators from the model if self.moderators_coef_dim: @@ -913,12 +914,7 @@ def _log_likelihood_single_group( ).reshape((-1, 1)) mu_moderators = torch.exp(log_mu_moderators) # parameter of a NB variable to approximate a sum of NB variables - r = ( - 1 - / group_overdispersion - * torch.sum(mu_moderators) ** 2 - / torch.sum(mu_moderators**2) - ) + r = 1 / group_overdispersion * torch.sum(mu_moderators) ** 2 / torch.sum(mu_moderators**2) p = 1 / ( 1 + torch.sum(mu_moderators) diff --git a/nimare/meta/utils.py b/nimare/meta/utils.py index d445277ec..c1d1198ee 100755 --- a/nimare/meta/utils.py +++ b/nimare/meta/utils.py @@ -1,4 +1,5 @@ """Utilities for coordinate-based meta-analysis estimators.""" + import warnings import numpy as np diff --git a/nimare/reports/figures.py b/nimare/reports/figures.py index 6feb6accf..b5e7f3353 100644 --- a/nimare/reports/figures.py +++ b/nimare/reports/figures.py @@ -1,4 +1,5 @@ """Plot figures for report.""" + import matplotlib.colors as mcolors import matplotlib.patches as mpatches import matplotlib.pyplot as plt diff --git a/nimare/results.py b/nimare/results.py index 8751d3620..5da68dcdb 100644 --- a/nimare/results.py +++ b/nimare/results.py @@ -1,4 +1,5 @@ """Tools for managing meta-analytic results.""" + import copy import logging import os diff --git a/nimare/stats.py b/nimare/stats.py index 9e0d044f7..036e9fc34 100755 --- a/nimare/stats.py +++ b/nimare/stats.py @@ -1,4 +1,5 @@ """Various statistical helper functions.""" + import logging import warnings diff --git a/nimare/tests/conftest.py b/nimare/tests/conftest.py index dd974e6a9..e5a4ad01d 100644 --- a/nimare/tests/conftest.py +++ b/nimare/tests/conftest.py @@ -1,4 +1,5 @@ """Generate fixtures for tests.""" + import json import os from shutil import copyfile diff --git a/nimare/tests/test_annotate_cogat.py b/nimare/tests/test_annotate_cogat.py index c75025d9d..738e9bbaf 100644 --- a/nimare/tests/test_annotate_cogat.py +++ b/nimare/tests/test_annotate_cogat.py @@ -1,4 +1,5 @@ """Test nimare.annotate.cogat (Cognitive Atlas extraction methods).""" + import pandas as pd from nimare import annotate, extract, utils diff --git a/nimare/tests/test_annotate_gclda.py b/nimare/tests/test_annotate_gclda.py index c66ea750e..59bbb74cd 100644 --- a/nimare/tests/test_annotate_gclda.py +++ b/nimare/tests/test_annotate_gclda.py @@ -1,4 +1,5 @@ """Test nimare.annotate.gclda (GCLDA).""" + import nibabel as nib import numpy as np import pandas as pd diff --git a/nimare/tests/test_annotate_lda.py b/nimare/tests/test_annotate_lda.py index 550c3e7fc..05ca9c898 100644 --- a/nimare/tests/test_annotate_lda.py +++ b/nimare/tests/test_annotate_lda.py @@ -1,4 +1,5 @@ """Test nimare.annotate.lda (LDA).""" + import numpy as np import pandas as pd diff --git a/nimare/tests/test_dataset.py b/nimare/tests/test_dataset.py index 7bd14b7a0..5c9da3170 100644 --- a/nimare/tests/test_dataset.py +++ b/nimare/tests/test_dataset.py @@ -1,4 +1,5 @@ """Test nimare.dataset (Dataset IO/transformations).""" + import copy import json import os.path as op diff --git a/nimare/tests/test_decode_continuous.py b/nimare/tests/test_decode_continuous.py index 2884a4736..9443ed4bf 100644 --- a/nimare/tests/test_decode_continuous.py +++ b/nimare/tests/test_decode_continuous.py @@ -2,6 +2,7 @@ Tests for nimare.decode.continuous.gclda_decode_map are in test_annotate_gclda. """ + import os import numpy as np diff --git a/nimare/tests/test_decode_discrete.py b/nimare/tests/test_decode_discrete.py index 17b65c771..0c8314157 100644 --- a/nimare/tests/test_decode_discrete.py +++ b/nimare/tests/test_decode_discrete.py @@ -2,6 +2,7 @@ Tests for nimare.decode.discrete.gclda_decode_roi are in test_annotate_gclda. """ + import pandas as pd import pytest diff --git a/nimare/tests/test_diagnostics.py b/nimare/tests/test_diagnostics.py index 87d2c82a7..9dbee2b02 100644 --- a/nimare/tests/test_diagnostics.py +++ b/nimare/tests/test_diagnostics.py @@ -1,4 +1,5 @@ """Tests for the nimare.diagnostics module.""" + import os.path as op import pytest diff --git a/nimare/tests/test_estimator_performance.py b/nimare/tests/test_estimator_performance.py index 55d9de620..1a6204c65 100644 --- a/nimare/tests/test_estimator_performance.py +++ b/nimare/tests/test_estimator_performance.py @@ -1,4 +1,5 @@ """Test estimator, kerneltransformer, and multiple comparisons corrector performance.""" + import os from contextlib import ExitStack as does_not_raise diff --git a/nimare/tests/test_extract.py b/nimare/tests/test_extract.py index 05ef6b21f..5df7897b0 100644 --- a/nimare/tests/test_extract.py +++ b/nimare/tests/test_extract.py @@ -1,4 +1,5 @@ """Test nimare.extract.""" + import os from glob import glob diff --git a/nimare/tests/test_generate.py b/nimare/tests/test_generate.py index 67e3ef367..39a09b433 100644 --- a/nimare/tests/test_generate.py +++ b/nimare/tests/test_generate.py @@ -1,4 +1,5 @@ """Tests for the nimare.generate module.""" + from contextlib import ExitStack as does_not_raise import pytest diff --git a/nimare/tests/test_io.py b/nimare/tests/test_io.py index 7b1299026..fdc3da632 100644 --- a/nimare/tests/test_io.py +++ b/nimare/tests/test_io.py @@ -1,4 +1,5 @@ """Test nimare.io (Dataset IO/transformations).""" + import os import pytest diff --git a/nimare/tests/test_meta_ale.py b/nimare/tests/test_meta_ale.py index 61f1dae3a..4cc94112c 100644 --- a/nimare/tests/test_meta_ale.py +++ b/nimare/tests/test_meta_ale.py @@ -1,4 +1,5 @@ """Test nimare.meta.ale (ALE/SCALE meta-analytic algorithms).""" + import os import pickle diff --git a/nimare/tests/test_meta_cbmr.py b/nimare/tests/test_meta_cbmr.py index 908f653d8..8fb243dbb 100644 --- a/nimare/tests/test_meta_cbmr.py +++ b/nimare/tests/test_meta_cbmr.py @@ -1,4 +1,5 @@ """Tests for CBMR meta-analytic methods.""" + import logging import warnings diff --git a/nimare/tests/test_meta_ibma.py b/nimare/tests/test_meta_ibma.py index 2597ab46c..0a245d759 100644 --- a/nimare/tests/test_meta_ibma.py +++ b/nimare/tests/test_meta_ibma.py @@ -1,4 +1,5 @@ """Test nimare.meta.ibma (image-based meta-analytic estimators).""" + import logging import os.path as op diff --git a/nimare/tests/test_meta_kernel.py b/nimare/tests/test_meta_kernel.py index 870e4f665..2a8099be9 100644 --- a/nimare/tests/test_meta_kernel.py +++ b/nimare/tests/test_meta_kernel.py @@ -1,4 +1,5 @@ """Test nimare.meta.kernel (CBMA kernel estimators).""" + import time import nibabel as nib diff --git a/nimare/tests/test_meta_mkda.py b/nimare/tests/test_meta_mkda.py index e4574ec2a..2c57f3398 100644 --- a/nimare/tests/test_meta_mkda.py +++ b/nimare/tests/test_meta_mkda.py @@ -1,4 +1,5 @@ """Test nimare.meta.mkda (KDA-based meta-analytic algorithms).""" + import logging import numpy as np diff --git a/nimare/tests/test_nimads.py b/nimare/tests/test_nimads.py index 69d6958b5..2261ffa3a 100644 --- a/nimare/tests/test_nimads.py +++ b/nimare/tests/test_nimads.py @@ -1,4 +1,5 @@ """Test NiMADS functionality.""" + from nimare import nimads from nimare.dataset import Dataset diff --git a/nimare/tests/test_reports.py b/nimare/tests/test_reports.py index e7785b52a..f89983754 100644 --- a/nimare/tests/test_reports.py +++ b/nimare/tests/test_reports.py @@ -1,4 +1,5 @@ """Test nimare.reports.""" + import os.path as op import pytest diff --git a/nimare/tests/test_stats.py b/nimare/tests/test_stats.py index bd22df696..072a37b94 100644 --- a/nimare/tests/test_stats.py +++ b/nimare/tests/test_stats.py @@ -1,4 +1,5 @@ """Test nimare.stats.""" + import math import numpy as np diff --git a/nimare/tests/test_transforms.py b/nimare/tests/test_transforms.py index 7f3928837..fb75d1473 100644 --- a/nimare/tests/test_transforms.py +++ b/nimare/tests/test_transforms.py @@ -1,4 +1,5 @@ """Test nimare.transforms.""" + import re import nibabel as nib diff --git a/nimare/tests/test_utils.py b/nimare/tests/test_utils.py index 706308c93..445d76b26 100644 --- a/nimare/tests/test_utils.py +++ b/nimare/tests/test_utils.py @@ -1,4 +1,5 @@ """Test nimare.utils.""" + import logging import os import os.path as op diff --git a/nimare/tests/test_workflows.py b/nimare/tests/test_workflows.py index 002b2645f..e7f294dee 100644 --- a/nimare/tests/test_workflows.py +++ b/nimare/tests/test_workflows.py @@ -1,4 +1,5 @@ """Test nimare.workflows.""" + import os.path as op import nibabel as nib diff --git a/nimare/tests/utils.py b/nimare/tests/utils.py index 0afadcb22..3e75e1d8e 100644 --- a/nimare/tests/utils.py +++ b/nimare/tests/utils.py @@ -1,4 +1,5 @@ """Utility functions for testing nimare.""" + import logging import os.path as op from contextlib import ExitStack as does_not_raise diff --git a/nimare/utils.py b/nimare/utils.py index 8d067d2ad..3efea4dc3 100755 --- a/nimare/utils.py +++ b/nimare/utils.py @@ -1,4 +1,5 @@ """Utility functions for NiMARE.""" + import contextlib import datetime import inspect diff --git a/nimare/workflows/base.py b/nimare/workflows/base.py index e0b80d1a5..59cac1ca5 100644 --- a/nimare/workflows/base.py +++ b/nimare/workflows/base.py @@ -1,4 +1,5 @@ """Base class for workflow.""" + import copy import itertools import logging diff --git a/nimare/workflows/cbma.py b/nimare/workflows/cbma.py index 8e3fe3bbc..493d13e2a 100644 --- a/nimare/workflows/cbma.py +++ b/nimare/workflows/cbma.py @@ -1,4 +1,5 @@ """Workflow for running an coordinates-based meta-analysis from a NiMARE database.""" + import logging from nimare.correct import FWECorrector diff --git a/nimare/workflows/ibma.py b/nimare/workflows/ibma.py index ac7c9ce89..976d63bec 100644 --- a/nimare/workflows/ibma.py +++ b/nimare/workflows/ibma.py @@ -1,4 +1,5 @@ """Workflow for running an image-based meta-analysis from a NiMARE database.""" + import logging from nimare.correct import FDRCorrector diff --git a/nimare/workflows/macm.py b/nimare/workflows/macm.py index 3fe0b8676..15a7704cf 100644 --- a/nimare/workflows/macm.py +++ b/nimare/workflows/macm.py @@ -1,4 +1,5 @@ """Perform MACM with ALE algorithm.""" + import logging import os import pathlib diff --git a/nimare/workflows/misc.py b/nimare/workflows/misc.py index 607fda27b..9b5de81d8 100644 --- a/nimare/workflows/misc.py +++ b/nimare/workflows/misc.py @@ -1,4 +1,5 @@ """Miscellaneous Workflows.""" + import logging import nibabel as nib