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

MAINT: updates for numpy2 closes #509 #510

Merged
merged 5 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
26 changes: 25 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would only add 3.11 and 3.12 and not remove 3.7 (maybe because EOL) and 3.8.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The leading_edge job either way only runs on py 3.12 and numpy 2 wont be available for py 3.8 and lower.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll go with what @dfm decides.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to test 3.9-3.12 as implemented in this PR. Thanks!!

os: ["ubuntu-latest"]
include:
- python-version: "3.9"
Expand Down Expand Up @@ -49,6 +49,30 @@ jobs:
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}-${{ matrix.os }}

leading_edge:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install pip install pytest "numpy>=2.0.0rc1"
python -m pip install -e.
- name: Run tests
run: pytest

coverage:
needs: tests
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion src/emcee/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def compute_log_prob(self, coords):
try:
with warnings.catch_warnings(record=True):
warnings.simplefilter(
"error", np.VisibleDeprecationWarning
"error", np.exceptions.VisibleDeprecationWarning
)
try:
dt = np.atleast_1d(blob[0]).dtype
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tox]
envlist = py{37,38,39,310}{,-extras},lint
envlist = py{39,310,311,312}{,-extras},lint

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39-extras
3.9: py39
3.10: py310
3.11: py311-extras
3.12: py312

[testenv]
deps = coverage[toml]
Expand Down