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

Updated continuous integration #38

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Need astropy-dev and pandas-dev to go with numpy-dev
Handle FutureWarning from pandas 3.0

Skip failing pandas test caused by numpy 2.0

Updated matrix to run a stable job in py312
pllim committed Nov 15, 2023
commit 754a8bd3a2cc45ec94951d9da04761fbd4555bb9
8 changes: 4 additions & 4 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
@@ -23,12 +23,12 @@ jobs:
- linux: py38-test-pytest53
- macos: py39-test-pytest60
- windows: py39-test-pytest61
- linux: py39-test-pytest62
- linux: py310-test-pytest62
- macos: py310-test-pytest70
- windows: py310-test-pytest71
- linux: py310-test-pytest72
- macos: py310-test-pytest73
- windows: py311-test-pytest74
- linux: py311-test-pytest72
- macos: py311-test-pytest73
- windows: py312-test-pytest74
- linux: py312-test-devdeps
publish:
Copy link
Member

Choose a reason for hiding this comment

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

What does this mean? Can we still use the "Build wheels" label on PRs here?

Copy link
Member Author

@astrofrog astrofrog Sep 11, 2023

Choose a reason for hiding this comment

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

The wheels are always built in PRs with this config. It's so fast there's no point making it optional.

Copy link
Member Author

Choose a reason for hiding this comment

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

Wheels will always be built but only published to PyPI on a tag

Copy link
Member

Choose a reason for hiding this comment

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

OK so after we have merged this, we should delete that "Build wheels" label.

needs: tests
2 changes: 1 addition & 1 deletion pytest_arraydiff/plugin.py
Original file line number Diff line number Diff line change
@@ -148,7 +148,7 @@ def read(filename):
def write(filename, data, **kwargs):
import pandas as pd # noqa: F401
key = os.path.basename(filename).replace('.h5', '')
return data.to_hdf(filename, key, **kwargs)
return data.to_hdf(filename, key=key, **kwargs)

@classmethod
def compare(cls, reference_file, test_file, atol=None, rtol=None):
4 changes: 4 additions & 0 deletions tests/test_pytest_arraydiff.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,9 @@

import pytest
import numpy as np
from packaging.version import Version

NUMPY_LT_2_0 = Version(np.__version__) < Version("2.0.dev")

reference_dir = 'baseline'

@@ -18,6 +21,7 @@ def test_succeeds_func_text():
return np.arange(3 * 5).reshape((3, 5))


@pytest.mark.skipif(not NUMPY_LT_2_0, reason="AttributeError: `np.unicode_` was removed in the NumPy 2.0 release. Use `np.str_` instead.")
@pytest.mark.array_compare(file_format='pd_hdf', reference_dir=reference_dir)
def test_succeeds_func_pdhdf():
pd = pytest.importorskip('pandas')
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ isolated_build = true
[testenv]
changedir = .tmp/{envname}
setenv =
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
description = run tests
deps =
pytestoldest: pytest==4.6.0
@@ -27,6 +27,8 @@ deps =
pytest74: pytest==7.4.*
devdeps: git+https://github.com/pytest-dev/pytest#egg=pytest
devdeps: numpy>=0.0.dev0
devdeps: pandas>=0.0.dev0
devdeps: astropy>=0.0.dev0
extras =
test
commands =