Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.12 #853

Merged
merged 8 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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?
----------
Expand Down
12 changes: 9 additions & 3 deletions nimare/reports/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools==58.2.0", "wheel"]
requires = ["setuptools==68.2.2", "wheel"]

[tool.black]
line-length = 99
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ 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]
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
Expand Down
Loading