diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 9d1d04c42..44c191816 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -30,7 +30,7 @@ jobs: - linux: py39-test - linux: py310-test-all - linux: py311-test - - linux: py311-test-all + - linux: py312-test-all # Documentation build - linux: py38-docs @@ -43,14 +43,21 @@ jobs: - macos: py39-test - macos: py310-test-all - macos: py311-test + - macos: py312-test-all # Test some configurations on Windows - windows: py38-test - - windows: py310-test + - windows: py39-test # Test against latest developer versions of some packages - linux: py310-test-dev-all - linux: py311-test-dev + - linux: py312-test-dev-all + + - macos: py311-test-dev-all + - macos: py312-test-dev + + - windows: py310-test-dev publish: needs: tests diff --git a/glue/utils/array.py b/glue/utils/array.py index 9213e993f..7da7baaa3 100644 --- a/glue/utils/array.py +++ b/glue/utils/array.py @@ -504,6 +504,8 @@ class categorical_ndarray(np.ndarray): def __new__(cls, value, dtype=None, copy=True, order=None, subok=False, ndmin=0, categories=None): + if not copy and np.lib.NumpyVersion(np.__version__) >= "2.0.0rc1": + copy = None result = np.array(value, dtype=dtype, copy=copy, order=order, subok=True, ndmin=ndmin).view(categorical_ndarray) if categories is not None: diff --git a/setup.cfg b/setup.cfg index 44e4f5bed..479fe963a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,6 +28,7 @@ install_requires = pandas>=1.2 echo>=0.6 astropy>=4.0 + fast_histogram>=0.12 setuptools>=30.3.0 ipython>=4.0 dill>=0.2 diff --git a/tox.ini b/tox.ini index 469416cda..16da8489c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{38,39,310,311}-{codestyle,test,docs}-all-{dev,legacy}{,-visual} + py{38,39,310,311,312}-{codestyle,test,docs}-all-{dev,legacy}{,-visual} requires = pip >= 18.0 setuptools >= 30.3.0 @@ -10,7 +10,7 @@ passenv = DISPLAY HOME setenv = - dev: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + dev: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple visual: MPLFLAGS = -m "mpl_image_compare" --mpl --mpl-generate-summary=html --mpl-results-path={toxinidir}/results --mpl-hash-library={toxinidir}/glue/tests/visual/{envname}.json --mpl-baseline-path=https://raw.githubusercontent.com/glue-viz/glue-core-visual-tests/images/{envname}/ whitelist_externals = find @@ -22,7 +22,9 @@ changedir = docs: doc deps = dev: numpy>=0.0.dev0 + dev: scipy>=0.0.dev0 dev: astropy>=0.0.dev0 + # LTS lts: astropy==5.0.* lts: matplotlib==3.5.* # Pin numpy-lts until permanent solution for #2353/#2428 @@ -46,6 +48,12 @@ extras = all: all docs: docs visual: visualtest +# Need `--pre` for packages like pandas having no released version supporting numpy>=2.0 yet, +# + `--no-deps` for casa-formats-io having no branch for numpy>=2.0 - +# for as long all test deps need to be manually pulled in above as well! +install_command = + !dev: python -I -m pip install + dev: python -I -m pip install -v commands = test: pip freeze test: pytest --pyargs glue --cov glue --cov-config={toxinidir}/setup.cfg {env:MPLFLAGS} {posargs}