diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 5059aabe4..7c7e2e253 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -38,7 +38,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macos-latest"] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] defaults: run: diff --git a/docs/installation.rst b/docs/installation.rst index 5bf659c6b..9efd575d3 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -20,7 +20,7 @@ For a complete list, please see ``nimare/setup.cfg``. .. note:: We only support Python versions that are part of the Python release cycle (i.e., 3.8, 3.9, - 3.10, and 3.11). For more information, see `Python Supported Versions`_. + 3.10, 3.11, and 3.12). For more information, see `Python Supported Versions`_. What Next? ---------- diff --git a/nimare/reports/base.py b/nimare/reports/base.py index a4e6fc139..400ee52e9 100644 --- a/nimare/reports/base.py +++ b/nimare/reports/base.py @@ -26,9 +26,14 @@ from glob import glob from pathlib import Path +try: + from importlib.resources import files +except ImportError: + # Python < 3.9 + from importlib_resources import files + import jinja2 import pandas as pd -from pkg_resources import resource_filename as pkgrf from nimare.meta.cbma.base import CBMAEstimator, PairwiseCBMAEstimator from nimare.reports.figures import ( @@ -545,8 +550,9 @@ def __init__( _gen_figures(self.results, img_key, diag_name, threshold, self.fig_dir) # Default template from nimare - self.template_path = Path(pkgrf("nimare", "reports/report.tpl")) - self._load_config(Path(pkgrf("nimare", "reports/default.yml"))) + nimare_path = files("nimare") + self.template_path = nimare_path / "reports" / "report.tpl" + self._load_config(nimare_path / "reports" / "default.yml") assert self.template_path.exists() def _load_config(self, config): diff --git a/pyproject.toml b/pyproject.toml index 6afd5ff4a..1d6256533 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools==58.2.0", "wheel"] +requires = ["setuptools==68.2.2", "wheel"] [tool.black] line-length = 99 diff --git a/setup.cfg b/setup.cfg index 6e47f2827..8f9e89b87 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,6 +33,7 @@ classifiers = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Topic :: Scientific/Engineering [options] @@ -40,6 +41,7 @@ python_requires = >= 3.8 install_requires = cognitiveatlas>=0.1.11 # nimare.annotate.cogat fuzzywuzzy # nimare.annotate + importlib-resources; python_version < '3.9' # for importlib.resources.files in Python 3.8 jinja2 # nimare.reports joblib>=1.3.0 # parallelization matplotlib>=3.6.0 # this is for nilearn, which doesn't include it in its reqs