From 1603f2ec880dd9621474dd63d885b45aefa55251 Mon Sep 17 00:00:00 2001 From: James Kent Date: Mon, 28 Apr 2025 08:53:58 -0500 Subject: [PATCH 1/4] switch from np.math to math --- pymare/results.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pymare/results.py b/pymare/results.py index 19ec5d1..27e9f6b 100644 --- a/pymare/results.py +++ b/pymare/results.py @@ -4,6 +4,7 @@ from functools import lru_cache from inspect import getfullargspec from warnings import warn +import math import numpy as np import pandas as pd @@ -322,7 +323,7 @@ def permutation_test(self, n_perm=1000): # Calculate # of permutations and determine whether to use exact test if has_mods: - n_exact = np.math.factorial(n_obs) + n_exact = math.factorial(n_obs) else: n_exact = 2**n_obs if n_exact < n_perm: From 560d76970456d85971bb46a99d855cb85a70d793 Mon Sep 17 00:00:00 2001 From: James Kent Date: Mon, 28 Apr 2025 10:48:02 -0500 Subject: [PATCH 2/4] fix numpy version for python 3.9 --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 923d850..0df3a1d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,8 @@ classifiers = [options] python_requires = >= 3.8 install_requires = - numpy>=1.8.0 + numpy>=1.8.0,<2.0; python_version == "3.9" and extra == 'stan' + numpy>=1.8.0; python_version != "3.9" or extra != 'stan' pandas scipy sympy From 4b5a6d3847f60c0ea8c4e218ff1174a0109bb250 Mon Sep 17 00:00:00 2001 From: James Kent Date: Mon, 28 Apr 2025 11:34:31 -0500 Subject: [PATCH 3/4] checkout pr branch code for testing --- .github/workflows/testing.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ae4b692..9080614 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - pull_request_target: + pull_request: branches: - "*" schedule: @@ -27,7 +27,7 @@ jobs: outputs: skip: ${{ steps.result_step.outputs.ci-skip }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - id: result_step @@ -51,7 +51,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: "Set up python" uses: actions/setup-python@v2 with: @@ -74,7 +74,7 @@ jobs: name: Lint with flake8 steps: - name: Check out source repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Python environment uses: actions/setup-python@v2 From 176f52fc1d0e68dc1452cc1932954011a9c02824 Mon Sep 17 00:00:00 2001 From: James Kent Date: Mon, 28 Apr 2025 11:42:09 -0500 Subject: [PATCH 4/4] fix isort --- pymare/results.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymare/results.py b/pymare/results.py index 27e9f6b..4981430 100644 --- a/pymare/results.py +++ b/pymare/results.py @@ -1,10 +1,10 @@ """Tools for representing and manipulating meta-regression results.""" import itertools +import math from functools import lru_cache from inspect import getfullargspec from warnings import warn -import math import numpy as np import pandas as pd