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

Update tox.ini #182

Merged
merged 13 commits into from
Mar 30, 2024
21 changes: 13 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,23 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
architecture: [x86, x64]
architecture: [x64, arm64]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8] #, 3.9] still disabled as astropy has problems
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
exclude:
- os: windows-latest
architecture: arm64
- os: ubuntu-latest
architecture: x86
architecture: arm64
- os: macos-latest # Support from 3.10 onwards
architecture: arm64
python-version: '3.7'
- os: macos-latest
architecture: x86
# disabled for now as python 3.9 not yet in matrix
#- python-version: [3.9] # exclude python >= 3.9 cause no h5py win32 wheels
# - os: windows-latest
# architecture: x86
architecture: arm64
python-version: '3.8'
- os: macos-latest
architecture: arm64
python-version: '3.9'
fail-fast: false

steps:
Expand Down
8 changes: 4 additions & 4 deletions hickle/tests/test_01_hickle_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ def test_H5NodeFilterProxy(h5_data):
# load data and try to directly modify 'type' and 'base_type' Attributes
# which will fail cause hdf5 file is opened for read only
h5_node = h5_data['somedata']
with pytest.raises(OSError):
with pytest.raises((KeyError, OSError)):
try:
h5_node.attrs['type'] = pickle.dumps(list)
except RuntimeError as re:
raise OSError(re).with_traceback(re.__traceback__)
with pytest.raises(OSError):
raise KeyError(re).with_traceback(re.__traceback__)
with pytest.raises((KeyError, OSError)):
try:
h5_node.attrs['base_type'] = b'list'
except RuntimeError as re:
raise OSError(re).with_traceback(re.__traceback__)
raise KeyError(re).with_traceback(re.__traceback__)

# verify that 'type' expands to tuple before running
# the remaining tests
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dill>=0.3.0
codecov
pytest>=4.6.0
pytest-cov
astropy>=1.3,<4.0
astropy
scipy>=1.0.0
pandas>=0.24.0
check-manifest
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,18 @@
'Operating System :: Unix',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'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',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities',
],
keywords=['pickle', 'hdf5', 'data storage', 'data export'],
install_requires=requirements,
tests_require=test_requirements,
python_requires='>=3.5',
python_requires='>=3.7',
packages=find_packages(),
zip_safe=False,
)
13 changes: 6 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
[tox]
# python 3.9 not added as astropy and numpy pose some problems on 3.9
# need further investigation
envlist = py{35,36,37,38}, py{35,36,37,38}-compress
envlist = py{37,38,39,310,311},py{37,38,39,310,311}-compress
skip_missing_interpreters=true
#do i need change here to trigger wf

[gh-actions]
# needed to match gh-action python version numbers with tox mnemonic
python =
3.5: py35
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[gh-actions:env]
PLATFORM =
Expand All @@ -20,7 +19,7 @@ PLATFORM =
windows-latest: windows

[testenv]
passenv = HOME USER
passenv = HOME,USER
deps =
!h5py3: -rrequirements{env:TOX_H5PY_REQIREMENTS:}.txt
h5py3: -rrequirements_h5py_3.txt
Expand All @@ -34,7 +33,7 @@ commands =
macos: pip install --upgrade pip virtualenv
windows: python -m pip install --upgrade pip virtualenv
check-manifest
py{35,36,37,38}-!compress: pytest -v -v --cov-report=term-missing --cov-report=xml:coverage.xml {posargs}
py{37,38,39,310,311}-!compress: pytest -v -v --cov-report=term-missing --cov-report=xml:coverage.xml {posargs}
compress: pytest --enable-compression -v -v --cov-report=term-missing --cov-report=xml:coverage.xml {posargs}

[testenv:h5py3]
Expand Down
Loading