Skip to content

Commit d0418f7

Browse files
authored
Merge pull request #136 from ianthomas23/remove_ci_warnings
Remove CI warnings
2 parents 588c8d0 + 9ccff2f commit d0418f7

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

.github/workflows/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
CONDA_ENV: [py310, py38, py39, upstream]
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020

2121
- name: Setup conda
22-
uses: mamba-org/provision-with-micromamba@main
22+
uses: mamba-org/setup-micromamba@v1
2323
with:
2424
environment-file: ci/environment-${{ matrix.CONDA_ENV }}.yml
2525

.github/workflows/pypipublish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212
- name: Set up Python
13-
uses: actions/setup-python@v2
13+
uses: actions/setup-python@v4
1414
with:
1515
python-version: "3.x"
1616
- name: Install dependencies

ci/environment-py38.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies:
1313
- pip
1414
- pydap
1515
- pytest
16-
- rasterio
16+
- rasterio <= 1.3.6
1717
- s3fs >= 2021.08.0
1818
- scikit-image
1919
- rangehttpserver

intake_xarray/tests/test_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def test_coerce_shape_array_non_int():
125125
expected = np.append(array[:2, :], [[0], [0]], axis=1)
126126
actual = _coerce_shape(array, shape)
127127
assert (expected == actual).all()
128-
assert expected.dtype == "float"
128+
assert expected.dtype == np.float64
129129

130130

131131
def test_read_image():

intake_xarray/tests/test_remote.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Tests for intake-server, local HTTP file server, local "S3" object server
22
import aiohttp
33
import intake
4+
import numpy as np
45
import os
56
import pytest
67
import requests
@@ -48,7 +49,7 @@ def data_server():
4849
def test_http_server_files(data_server):
4950
test_files = ['RGB.byte.tif', 'example_1.nc', 'example_2.nc', 'little_green.tif', 'little_red.tif']
5051
h = fsspec.filesystem("http")
51-
out = h.glob(data_server + '/')
52+
out = h.glob(data_server + '/*')
5253
assert len(out) > 0
5354
assert set([data_server+'/'+x for x in test_files]).issubset(set(out))
5455

@@ -68,7 +69,7 @@ def test_http_read_rasterio(data_server):
6869
assert ("+init" in da.attrs.get('crs', "") or "+proj" in da.attrs.get('crs', "") or
6970
"PROJCS" in da.spatial_ref.attrs["crs_wkt"])
7071
assert da.attrs['AREA_OR_POINT'] == 'Area'
71-
assert da.dtype == 'uint8'
72+
assert da.dtype == np.uint8
7273
assert da.isel(band=2,x=300,y=500).values == 129
7374

7475

@@ -122,7 +123,7 @@ def test_http_read_netcdf(data_server):
122123
url = f'{data_server}/example_1.nc'
123124
source = intake.open_netcdf(url)
124125
ds = source.read()
125-
assert ds['rh'].isel(lat=0,lon=0,time=0).values.dtype == 'float32'
126+
assert ds['rh'].isel(lat=0,lon=0,time=0).values.dtype == np.float32
126127
assert ds['rh'].isel(lat=0,lon=0,time=0).values == 0.5
127128

128129

@@ -235,7 +236,7 @@ def test_s3_read_rasterio(s3):
235236
assert ("+init" in da.attrs.get('crs', "") or "+proj" in da.attrs.get('crs', "") or
236237
"PROJCS" in da.spatial_ref.attrs["crs_wkt"])
237238
assert da.attrs['AREA_OR_POINT'] == 'Area'
238-
assert da.dtype == 'uint8'
239+
assert da.dtype == np.uint8
239240
assert da.isel(band=2,x=300,y=500).values == 129
240241

241242

@@ -245,7 +246,7 @@ def test_s3_read_netcdf(s3):
245246
source = intake.open_netcdf(url,
246247
storage_options=s3options)
247248
ds = source.read()
248-
assert ds['rh'].isel(lat=0,lon=0,time=0).values.dtype == 'float32'
249+
assert ds['rh'].isel(lat=0,lon=0,time=0).values.dtype == np.float32
249250
assert ds['rh'].isel(lat=0,lon=0,time=0).values == 0.5
250251

251252

0 commit comments

Comments
 (0)