Skip to content

Enable more ruff rules #280

Enable more ruff rules

Enable more ruff rules #280

Triggered via pull request August 14, 2024 07:01
@hoxbrohoxbro
synchronize #151
ruff
Status Cancelled
Total duration 10m 10s
Artifacts 1

test.yaml

on: pull_request
Run pre-commit
9s
Run pre-commit
Setup workflow
3s
Setup workflow
Pixi lock
1m 41s
Pixi lock
Matrix: core_test_suite
Matrix: unit_test_suite
Fit to window
Zoom out
Zoom in

Annotations

28 errors
unit:test-39:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 23 Notebook cell execution failed Cell 23: Cell execution caused an exception Input: import geopandas from download import download_map world_gp = geopandas.read_file( download_map('naturalearth_lowres') ) world_gp = world_gp.sort_values('name').reset_index(drop=True) world_gp = world_gp[['pop_est', 'continent', 'name', 'geometry']] world_gp Traceback: --------------------------------------------------------------------------- DataSourceError Traceback (most recent call last) Cell In[1], line 4 1 import geopandas 2 from download import download_map ----> 4 world_gp = geopandas.read_file( 5 download_map('naturalearth_lowres') 6 ) 7 world_gp = world_gp.sort_values('name').reset_index(drop=True) 8 world_gp = world_gp[['pop_est', 'continent', 'name', 'geometry']] File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/geopandas/io/file.py:294, in _read_file(filename, bbox, mask, columns, rows, engine, **kwargs) 291 from_bytes = True 293 if engine == "pyogrio": --> 294 return _read_file_pyogrio( 295 filename, bbox=bbox, mask=mask, columns=columns, rows=rows, **kwargs 296 ) 298 elif engine == "fiona": 299 if pd.api.types.is_file_like(filename): File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/geopandas/io/file.py:547, in _read_file_pyogrio(path_or_bytes, bbox, mask, rows, **kwargs) 538 warnings.warn( 539 "The 'include_fields' and 'ignore_fields' keywords are deprecated, and " 540 "will be removed in a future release. You can use the 'columns' keyword " (...) 543 stacklevel=3, 544 ) 545 kwargs["columns"] = kwargs.pop("include_fields") --> 547 return pyogrio.read_dataframe(�[4
unit:test-39:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 24 Notebook cell execution failed Cell 24: Cell execution caused an exception Input: world_df = GeoDataFrame(world_gp) world_df Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 world_df = GeoDataFrame(world_gp) 2 world_df NameError: name 'world_gp' is not defined
unit:test-39:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 25 Notebook cell execution failed Cell 25: Cell execution caused an exception Input: world_df.iloc[[4, 2, 0]].to_geopandas() Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 world_df.iloc[[4, 2, 0]].to_geopandas() NameError: name 'world_df' is not defined
unit:test-39:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 26 Notebook cell execution failed Cell 26: Cell execution caused an exception Input: world_df.geometry[0].to_shapely() Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 world_df.geometry[0].to_shapely() NameError: name 'world_df' is not defined
unit:test-39:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 27 Notebook cell execution failed Cell 27: Cell execution caused an exception Input: world_df.geometry.to_geopandas().plot() Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 world_df.geometry.to_geopandas().plot() NameError: name 'world_df' is not defined
unit:test-39:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 28 Notebook cell execution failed Cell 28: Cell execution caused an exception Input: import datashader as ds cvs = ds.Canvas(plot_width=650, plot_height=400) agg = cvs.polygons(world_df, geometry='geometry', agg=ds.mean('pop_est')) ds.transfer_functions.shade(agg) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 3 1 import datashader as ds 2 cvs = ds.Canvas(plot_width=650, plot_height=400) ----> 3 agg = cvs.polygons(world_df, geometry='geometry', agg=ds.mean('pop_est')) 4 ds.transfer_functions.shade(agg) NameError: name 'world_df' is not defined
unit:test-39:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 30 Notebook cell execution failed Cell 30: Cell execution caused an exception Input: def callback(x_range, y_range): cvs = ds.Canvas(plot_width=650, plot_height=400, x_range=x_range, y_range=y_range) agg = cvs.polygons(world_df, geometry='geometry', agg=ds.mean('pop_est')) return hv.Image(agg).opts(cmap="viridis").opts(width=650, height=400) hv.DynamicMap( callback, streams=[hv.streams.RangeXY()] ) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/IPython/core/formatters.py:974, in MimeBundleFormatter.__call__(self, obj, include, exclude) 971 method = get_real_method(obj, self.print_method) 973 if method is not None: --> 974 return method(include=include, exclude=exclude) 975 return None 976 else: File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/holoviews/core/dimension.py:1275, in Dimensioned._repr_mimebundle_(self, include, exclude) 1268 def _repr_mimebundle_(self, include=None, exclude=None): 1269 """ 1270 Resolves the class hierarchy for the class rendering the 1271 object using any display hooks registered on Store.display 1272 hooks. The output of all registered display_hooks is then 1273 combined and returned. 1274 """ -> 1275 return Store.render(self) File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/holoviews/core/options.py:1423, in Store.render(cls, obj) 1421 data, metadata = {}, {} 1422 for hook in hooks: -> 1423 ret = hook(obj) 1424 if ret is None: 1425 continue File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/holoviews/ipython/display_hooks.py:287, in pprint_display(obj) 285 if not ip.display_formatter.formatters['text/plain'].pprint: 286 return None --> 287 return display(obj, raw_output=True) File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/holoviews/ipython/display_hooks.py:261, in display(obj, raw_output, **kwargs) 259 elif isinstance(obj, (HoloMap, DynamicMap)): 260 �[38
unit:test-39:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 31 Notebook cell execution failed Cell 31: Cell execution caused an exception Input: selected_world_df = world_df.geometry.cx[:, :0] selected_world_df.to_geopandas().plot() Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 selected_world_df = world_df.geometry.cx[:, :0] 2 selected_world_df.to_geopandas().plot() NameError: name 'world_df' is not defined
unit:test-39:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 32 Notebook cell execution failed Cell 32: Cell execution caused an exception Input: cities_gp = geopandas.read_file( download_map('naturalearth_cities') ) cities_df = GeoDataFrame(cities_gp) cities_df.head() Traceback: --------------------------------------------------------------------------- DataSourceError Traceback (most recent call last) Cell In[1], line 1 ----> 1 cities_gp = geopandas.read_file( 2 download_map('naturalearth_cities') 3 ) 4 cities_df = GeoDataFrame(cities_gp) 5 cities_df.head() File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/geopandas/io/file.py:294, in _read_file(filename, bbox, mask, columns, rows, engine, **kwargs) 291 from_bytes = True 293 if engine == "pyogrio": --> 294 return _read_file_pyogrio( 295 filename, bbox=bbox, mask=mask, columns=columns, rows=rows, **kwargs 296 ) 298 elif engine == "fiona": 299 if pd.api.types.is_file_like(filename): File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/geopandas/io/file.py:547, in _read_file_pyogrio(path_or_bytes, bbox, mask, rows, **kwargs) 538 warnings.warn( 539 "The 'include_fields' and 'ignore_fields' keywords are deprecated, and " 540 "will be removed in a future release. You can use the 'columns' keyword " (...) 543 stacklevel=3, 544 ) 545 kwargs["columns"] = kwargs.pop("include_fields") --> 547 return pyogrio.read_dataframe(path_or_bytes, bbox=bbox, **kwargs) File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/pyogrio/geopandas.py:261, in read_dataframe(path_or_buffer, layer, encoding, columns, read_geometry, force_2d, skip_features, max_features, where, bbox, mask, fids, sql, sql_dialect, fid_as_index, use_arrow, on_invalid, arrow_to_pandas_kwargs, **kwargs) 256 if not use_arrow: 257 # For arrow, datetimes are read as is.
unit:test-39:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 33 Notebook cell execution failed Cell 33: Cell execution caused an exception Input: country_ind = 0 country_polygon = world_df.geometry.iloc[country_ind] print("Cities in %s" % world_df.name.iloc[country_ind]) cities_df[cities_df.geometry.intersects(country_polygon)] Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 2 1 country_ind = 0 ----> 2 country_polygon = world_df.geometry.iloc[country_ind] 3 print("Cities in %s" % world_df.name.iloc[country_ind]) 4 cities_df[cities_df.geometry.intersects(country_polygon)] NameError: name 'world_df' is not defined
unit:test-312:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 23 Notebook cell execution failed Cell 23: Cell execution caused an exception Input: import geopandas from download import download_map world_gp = geopandas.read_file( download_map('naturalearth_lowres') ) world_gp = world_gp.sort_values('name').reset_index(drop=True) world_gp = world_gp[['pop_est', 'continent', 'name', 'geometry']] world_gp Traceback: --------------------------------------------------------------------------- DataSourceError Traceback (most recent call last) Cell In[1], line 4 1 import geopandas 2 from download import download_map ----> 4 world_gp = geopandas.read_file( 5 download_map('naturalearth_lowres') 6 ) 7 world_gp = world_gp.sort_values('name').reset_index(drop=True) 8 world_gp = world_gp[['pop_est', 'continent', 'name', 'geometry']] File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-312/lib/python3.12/site-packages/geopandas/io/file.py:294, in _read_file(filename, bbox, mask, columns, rows, engine, **kwargs) 291 from_bytes = True 293 if engine == "pyogrio": --> 294 return _read_file_pyogrio( 295 filename, bbox=bbox, mask=mask, columns=columns, rows=rows, **kwargs 296 ) 298 elif engine == "fiona": 299 if pd.api.types.is_file_like(filename): File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-312/lib/python3.12/site-packages/geopandas/io/file.py:547, in _read_file_pyogrio(path_or_bytes, bbox, mask, rows, **kwargs) 538 warnings.warn( 539 "The 'include_fields' and 'ignore_fields' keywords are deprecated, and " 540 "will be removed in a future release. You can use the 'columns' keyword " (...) 543 stacklevel=3, 544 ) 545 kwargs["columns"] = kwargs.pop("include_fields") --> 547 return pyogrio.read_dataframe(�[49
unit:test-312:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 24 Notebook cell execution failed Cell 24: Cell execution caused an exception Input: world_df = GeoDataFrame(world_gp) world_df Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 world_df = GeoDataFrame(world_gp) 2 world_df NameError: name 'world_gp' is not defined
unit:test-312:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 25 Notebook cell execution failed Cell 25: Cell execution caused an exception Input: world_df.iloc[[4, 2, 0]].to_geopandas() Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 world_df.iloc[[4, 2, 0]].to_geopandas() NameError: name 'world_df' is not defined
unit:test-312:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 26 Notebook cell execution failed Cell 26: Cell execution caused an exception Input: world_df.geometry[0].to_shapely() Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 world_df.geometry[0].to_shapely() NameError: name 'world_df' is not defined
unit:test-312:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 27 Notebook cell execution failed Cell 27: Cell execution caused an exception Input: world_df.geometry.to_geopandas().plot() Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 world_df.geometry.to_geopandas().plot() NameError: name 'world_df' is not defined
unit:test-312:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 28 Notebook cell execution failed Cell 28: Cell execution caused an exception Input: import datashader as ds cvs = ds.Canvas(plot_width=650, plot_height=400) agg = cvs.polygons(world_df, geometry='geometry', agg=ds.mean('pop_est')) ds.transfer_functions.shade(agg) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 3 1 import datashader as ds 2 cvs = ds.Canvas(plot_width=650, plot_height=400) ----> 3 agg = cvs.polygons(world_df, geometry='geometry', agg=ds.mean('pop_est')) 4 ds.transfer_functions.shade(agg) NameError: name 'world_df' is not defined
unit:test-312:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 30 Notebook cell execution failed Cell 30: Cell execution caused an exception Input: def callback(x_range, y_range): cvs = ds.Canvas(plot_width=650, plot_height=400, x_range=x_range, y_range=y_range) agg = cvs.polygons(world_df, geometry='geometry', agg=ds.mean('pop_est')) return hv.Image(agg).opts(cmap="viridis").opts(width=650, height=400) hv.DynamicMap( callback, streams=[hv.streams.RangeXY()] ) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-312/lib/python3.12/site-packages/IPython/core/formatters.py:977, in MimeBundleFormatter.__call__(self, obj, include, exclude) 974 method = get_real_method(obj, self.print_method) 976 if method is not None: --> 977 return method(include=include, exclude=exclude) 978 return None 979 else: File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-312/lib/python3.12/site-packages/holoviews/core/dimension.py:1275, in Dimensioned._repr_mimebundle_(self, include, exclude) 1268 def _repr_mimebundle_(self, include=None, exclude=None): 1269 """ 1270 Resolves the class hierarchy for the class rendering the 1271 object using any display hooks registered on Store.display 1272 hooks. The output of all registered display_hooks is then 1273 combined and returned. 1274 """ -> 1275 return Store.render(self) File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-312/lib/python3.12/site-packages/holoviews/core/options.py:1423, in Store.render(cls, obj) 1421 data, metadata = {}, {} 1422 for hook in hooks: -> 1423 ret = hook(obj) 1424 if ret is None: 1425 continue File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-312/lib/python3.12/site-packages/holoviews/ipython/display_hooks.py:287, in pprint_display(obj) 285 if not ip.display_formatter.formatters['text/plain'].pprint: 286 return None --> 287 return display(obj, raw_output=True) File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-312/lib/python3.12/site-packages/holoviews/ipython/display_hooks.py:261, in display(obj, raw_output, **kwargs) 259 elif isinstance(obj, (HoloMap, DynamicMap)): 260�[0
unit:test-312:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 31 Notebook cell execution failed Cell 31: Cell execution caused an exception Input: selected_world_df = world_df.geometry.cx[:, :0] selected_world_df.to_geopandas().plot() Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 selected_world_df = world_df.geometry.cx[:, :0] 2 selected_world_df.to_geopandas().plot() NameError: name 'world_df' is not defined
unit:test-312:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 32 Notebook cell execution failed Cell 32: Cell execution caused an exception Input: cities_gp = geopandas.read_file( download_map('naturalearth_cities') ) cities_df = GeoDataFrame(cities_gp) cities_df.head() Traceback: --------------------------------------------------------------------------- DataSourceError Traceback (most recent call last) Cell In[1], line 1 ----> 1 cities_gp = geopandas.read_file( 2 download_map('naturalearth_cities') 3 ) 4 cities_df = GeoDataFrame(cities_gp) 5 cities_df.head() File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-312/lib/python3.12/site-packages/geopandas/io/file.py:294, in _read_file(filename, bbox, mask, columns, rows, engine, **kwargs) 291 from_bytes = True 293 if engine == "pyogrio": --> 294 return _read_file_pyogrio( 295 filename, bbox=bbox, mask=mask, columns=columns, rows=rows, **kwargs 296 ) 298 elif engine == "fiona": 299 if pd.api.types.is_file_like(filename): File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-312/lib/python3.12/site-packages/geopandas/io/file.py:547, in _read_file_pyogrio(path_or_bytes, bbox, mask, rows, **kwargs) 538 warnings.warn( 539 "The 'include_fields' and 'ignore_fields' keywords are deprecated, and " 540 "will be removed in a future release. You can use the 'columns' keyword " (...) 543 stacklevel=3, 544 ) 545 kwargs["columns"] = kwargs.pop("include_fields") --> 547 return pyogrio.read_dataframe(path_or_bytes, bbox=bbox, **kwargs) File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-312/lib/python3.12/site-packages/pyogrio/geopandas.py:261, in read_dataframe(path_or_buffer, layer, encoding, columns, read_geometry, force_2d, skip_features, max_features, where, bbox, mask, fids, sql, sql_dialect, fid_as_index, use_arrow, on_invalid, arrow_to_pandas_kwargs, **kwargs) 256 if not use_arrow: 257 # For arrow, datetimes are read
unit:test-312:macos-latest: examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 33 Notebook cell execution failed Cell 33: Cell execution caused an exception Input: country_ind = 0 country_polygon = world_df.geometry.iloc[country_ind] print("Cities in %s" % world_df.name.iloc[country_ind]) cities_df[cities_df.geometry.intersects(country_polygon)] Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 2 1 country_ind = 0 ----> 2 country_polygon = world_df.geometry.iloc[country_ind] 3 print("Cities in %s" % world_df.name.iloc[country_ind]) 4 cities_df[cities_df.geometry.intersects(country_polygon)] NameError: name 'world_df' is not defined
unit:test-312:ubuntu-latest
Canceling since a higher priority waiting request for 'tests-151' exists
unit:test-312:ubuntu-latest
The operation was canceled.
unit:test-39:ubuntu-latest
Canceling since a higher priority waiting request for 'tests-151' exists
unit:test-39:ubuntu-latest
The operation was canceled.
unit:test-312:windows-latest
Canceling since a higher priority waiting request for 'tests-151' exists
unit:test-312:windows-latest
The operation was canceled.
unit:test-39:windows-latest
Canceling since a higher priority waiting request for 'tests-151' exists
unit:test-39:windows-latest
The operation was canceled.

Artifacts

Produced during runtime
Name Size
pixi-lock Expired
249 KB