diff --git a/.github/workflows/ci_tests_run_notebooks.yml b/.github/workflows/ci_tests_run_notebooks.yml index 9b55c58f..31ddb5d8 100644 --- a/.github/workflows/ci_tests_run_notebooks.yml +++ b/.github/workflows/ci_tests_run_notebooks.yml @@ -31,14 +31,19 @@ jobs: os: ubuntu-latest - python-version: '3.11' - toxenv: py311-test-devdeps - name: with Python 3.11 and developer versioned dependencies + toxenv: py311-test + name: with Python 3.11 and latest released version of dependencies + os: ubuntu-latest + + - python-version: '3.12' + toxenv: py312-test-devdeps + name: with Python 3.12 and developer versioned dependencies os: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/content/tutorial-ma.md b/content/tutorial-ma.md index 90a7fa31..fcb69eb2 100644 --- a/content/tutorial-ma.md +++ b/content/tutorial-ma.md @@ -92,7 +92,7 @@ rows of this file, since they contain other data we are not interested in. Separ # Read just the dates for columns 4-18 from the first row dates = np.genfromtxt( filename, - dtype=np.unicode_, + dtype=np.str_, delimiter=",", max_rows=1, usecols=range(4, 18), @@ -102,7 +102,7 @@ dates = np.genfromtxt( # columns, skipping the first six rows locations = np.genfromtxt( filename, - dtype=np.unicode_, + dtype=np.str_, delimiter=",", skip_header=6, usecols=(0, 1), @@ -119,7 +119,7 @@ nbcases = np.genfromtxt( ) ``` -Included in the `numpy.genfromtxt` function call, we have selected the [numpy.dtype](https://numpy.org/devdocs/reference/generated/numpy.dtype.html#numpy.dtype) for each subset of the data (either an integer - `numpy.int_` - or a string of characters - `numpy.unicode_`). We have also used the `encoding` argument to select `utf-8-sig` as the encoding for the file (read more about encoding in the [official Python documentation](https://docs.python.org/3/library/codecs.html#encodings-and-unicode). You can read more about the `numpy.genfromtxt` function from the [Reference Documentation](https://numpy.org/devdocs/reference/generated/numpy.genfromtxt.html#numpy.genfromtxt) or from the [Basic IO tutorial](https://numpy.org/devdocs/user/basics.io.genfromtxt.html). +Included in the `numpy.genfromtxt` function call, we have selected the [numpy.dtype](https://numpy.org/devdocs/reference/generated/numpy.dtype.html#numpy.dtype) for each subset of the data (either an integer - `numpy.int_` - or a string of characters - `numpy.str_`). We have also used the `encoding` argument to select `utf-8-sig` as the encoding for the file (read more about encoding in the [official Python documentation](https://docs.python.org/3/library/codecs.html#encodings-and-unicode). You can read more about the `numpy.genfromtxt` function from the [Reference Documentation](https://numpy.org/devdocs/reference/generated/numpy.genfromtxt.html#numpy.genfromtxt) or from the [Basic IO tutorial](https://numpy.org/devdocs/user/basics.io.genfromtxt.html). +++ diff --git a/tox.ini b/tox.ini index e6f26ac8..4c3157e3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{39,310,311}-test{,-oldestdeps,-devdeps,-predeps}{,-buildhtml} + py{39,310,311,312}-test{,-oldestdeps,-devdeps,-predeps}{,-buildhtml} requires = pip >= 19.3.1 @@ -8,6 +8,9 @@ requires = description = run tests +setenv = + devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + deps = # We use these files to specify all the dependencies, and below we override # versions for specific testing schenarios @@ -15,18 +18,21 @@ deps = -rsite/requirements.txt -rrequirements.txt - oldestdeps: numpy==1.20 - oldestdeps: matplotlib==3.4 - oldestdeps: scipy==1.6 - oldestdeps: pandas==1.2 + oldestdeps: numpy==1.23 + oldestdeps: matplotlib==3.6 + oldestdeps: scipy==1.8 + oldestdeps: pandas==1.4 + + devdeps: numpy>=0.0.dev0 + devdeps: scipy>=0.0.dev0 + devdeps: matplotlib>=0.0.dev0 + devdeps: pandas>=0.0.dev0 allowlist_externals = bash commands = - devdeps: pip install -U --pre --only-binary :all: -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy - devdeps: pip install -U --pre --only-binary :all: -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy - devdeps: pip install -U --pre --only-binary :all: -i https://pypi.anaconda.org/scipy-wheels-nightly/simple matplotlib - devdeps: pip install -U --pre --only-binary :all: -i https://pypi.anaconda.org/scipy-wheels-nightly/simple pandas + # Force numpy reinstall to work around upper version limits in downstream dependencies (e.g. pandas) + devdeps: pip install -U --pre --no-deps --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy pip freeze