Skip to content

MAINT: update minimum required versions and CI maintanance #199

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

Merged
merged 4 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
13 changes: 9 additions & 4 deletions .github/workflows/ci_tests_run_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
6 changes: 3 additions & 3 deletions content/tutorial-ma.md
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand All @@ -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).

+++

Expand Down
24 changes: 15 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
[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

[testenv]

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
-rtest_requirements.txt
-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

Expand Down