Skip to content

Commit

Permalink
109 tests are failing update python versions (#110)
Browse files Browse the repository at this point in the history
* change python versions to min 3.8 and max 3.13

* change python versions to min 3.8 and max 3.13 again

* remove 3.13

* use brackets

* replace np.alltrue by np.all

* check for different length
  • Loading branch information
joergfunger authored Mar 12, 2024
1 parent e0cebc2 commit 84deea9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python "3.10"
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: "3.10"
- name: Install dependencies
run: |
pip install pre-commit
Expand All @@ -34,7 +34,7 @@ jobs:
needs: [ lint_and_type_check ]
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
echo "COVERAGE_COL=$(echo $COVERAGE_COL)" >> $GITHUB_ENV
echo "BRANCH_NAME=$(echo $BRANCH_NAME)" >> $GITHUB_ENV
# Upload the coverage value to gist only once
- if: ${{ matrix.python-version == '3.9' }}
- if: ${{ matrix.python-version == '3.12' }}
name: Upload coverage to gist
uses: schneegans/[email protected]
with:
Expand All @@ -102,7 +102,7 @@ jobs:
needs: [ lint_and_type_check ]
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ description = A general framework for setting up parameter estimation problems.
long_description = file: README.md
long_description_content_type = text/markdown
classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Scientific/Engineering
Intended Audience :: Science/Research
Operating System :: OS Independent
License :: OSI Approved :: MIT License
license_files = LICENSE

[options]
python_requires = >= 3.7
python_requires = >= 3.8
packages = find:
include_package_data = True
install_requires =
Expand Down
5 changes: 3 additions & 2 deletions tests/unit_tests/inference/dynesty/test_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def __call__(self, inp):
for prm_name in ["a", "b", "sigma"]:
v1 = inference_data_1a["posterior"][prm_name].values.flatten()
v2 = inference_data_2["posterior"][prm_name].values.flatten()
if np.alltrue(v1 != v2):
min_dim = np.min([len(v1), len(v2)])
if np.all(v1[:min_dim] != v2[:min_dim]):
same_results = False
break
self.assertTrue(not same_results)
Expand All @@ -96,7 +97,7 @@ def __call__(self, inp):
for prm_name in ["a", "b", "sigma"]:
v1 = inference_data_1a["posterior"][prm_name].values.flatten()
v2 = inference_data_1b["posterior"][prm_name].values.flatten()
if np.alltrue(v1 != v2):
if np.all(v1 != v2):
same_results = False
break
self.assertTrue(same_results)
Expand Down

0 comments on commit 84deea9

Please sign in to comment.