Enable more ruff rules #281
test.yaml
on: pull_request
Matrix: core_test_suite
Matrix: unit_test_suite
Annotations
10 errors
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 4
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 'cities_df' is not defined
|
unit:test-39:macos-latest:
examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 34
Notebook cell execution failed
Cell 34: Cell execution caused an exception
Input:
from spatialpandas import sjoin
sjoin(cities_df, world_df)
Traceback:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[1], line 2
1 from spatialpandas import sjoin
----> 2 sjoin(cities_df, world_df)
NameError: name 'cities_df' is not defined
|
unit:test-39:macos-latest:
examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 35
Notebook cell execution failed
Cell 35: Cell execution caused an exception
Input:
from geopandas import sjoin as gp_sjoin
gp_sjoin(cities_gp, world_gp)
Traceback:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[1], line 2
1 from geopandas import sjoin as gp_sjoin
----> 2 gp_sjoin(cities_gp, world_gp)
NameError: name 'cities_gp' is not defined
|
unit:test-39:macos-latest:
examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 37
Notebook cell execution failed
Cell 37: Cell execution caused an exception
Input:
import pandas as pd
import dask.dataframe as dd
reps = 10000
# Large geopandas GeoDataFrame
cities_large_gp = pd.concat([cities_gp] * reps, axis=0)
# Large spatialpandas GeoDataFrame
cities_large_df = pd.concat([cities_df] * reps, axis=0)
# Large spatialpandas DaskGeoDataFrame with 16 partitions
cities_large_ddf = dd.from_pandas(cities_large_df, npartitions=16).persist()
# Precompute the partition-level spatial index
cities_large_ddf.partition_sindex
Traceback:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[1], line 5
3 reps = 10000
4 # Large geopandas GeoDataFrame
----> 5 cities_large_gp = pd.concat([cities_gp] * reps, axis=0)
7 # Large spatialpandas GeoDataFrame
8 cities_large_df = pd.concat([cities_df] * reps, axis=0)
NameError: name 'cities_gp' is not defined
|
unit:test-39:macos-latest:
examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 38
Notebook cell execution failed
Cell 38: Cell execution caused an exception
Input:
print("Number of Point rows: %s" % len(cities_large_df))
print("Number of MultiPolygon rows: %s" % len(world_df))
Traceback:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[1], line 1
----> 1 print("Number of Point rows: %s" % len(cities_large_df))
2 print("Number of MultiPolygon rows: %s" % len(world_df))
NameError: name 'cities_large_df' is not defined
|
unit:test-39:macos-latest:
examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 39
Notebook cell execution failed
Cell 39: Cell execution caused an exception
Input:
%%timeit
len(gp_sjoin(cities_large_gp, world_gp))
Traceback:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[1], line 1
----> 1 get_ipython().run_cell_magic('timeit', '', 'len(gp_sjoin(cities_large_gp, world_gp))\n')
File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/IPython/core/interactiveshell.py:2517, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
2515 with self.builtin_trap:
2516 args = (magic_arg_s, cell)
-> 2517 result = fn(*args, **kwargs)
2519 # The code below prevents the output from being displayed
2520 # when using magics with decorator @output_can_be_silenced
2521 # when the last Python token in the expression is a ';'.
2522 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/IPython/core/magics/execution.py:1185, in ExecutionMagics.timeit(self, line, cell, local_ns)
1183 for index in range(0, 10):
1184 number = 10 ** index
-> 1185 time_number = timer.timeit(number)
1186 if time_number >= 0.2:
1187 break
File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/IPython/core/magics/execution.py:173, in Timer.timeit(self, number)
171 gc.disable()
172 try:
--> 173 timing = self.inner(it, self.timer)
174 finally:
175 if gcold:
File <magic-timeit>:1, in inner(_it, _timer)
NameError: name 'cities_large_gp' is not defined
|
unit:test-39:macos-latest:
examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 40
Notebook cell execution failed
Cell 40: Cell execution caused an exception
Input:
%%timeit
len(sjoin(cities_large_df, world_df))
Traceback:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[1], line 1
----> 1 get_ipython().run_cell_magic('timeit', '', 'len(sjoin(cities_large_df, world_df))\n')
File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/IPython/core/interactiveshell.py:2517, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
2515 with self.builtin_trap:
2516 args = (magic_arg_s, cell)
-> 2517 result = fn(*args, **kwargs)
2519 # The code below prevents the output from being displayed
2520 # when using magics with decorator @output_can_be_silenced
2521 # when the last Python token in the expression is a ';'.
2522 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/IPython/core/magics/execution.py:1185, in ExecutionMagics.timeit(self, line, cell, local_ns)
1183 for index in range(0, 10):
1184 number = 10 ** index
-> 1185 time_number = timer.timeit(number)
1186 if time_number >= 0.2:
1187 break
File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/IPython/core/magics/execution.py:173, in Timer.timeit(self, number)
171 gc.disable()
172 try:
--> 173 timing = self.inner(it, self.timer)
174 finally:
175 if gcold:
File <magic-timeit>:1, in inner(_it, _timer)
NameError: name 'cities_large_df' is not defined
|
unit:test-39:macos-latest:
examples/Overview.ipynb#L1
examples/Overview.ipynb::Cell 41
Notebook cell execution failed
Cell 41: Cell execution caused an exception
Input:
%%timeit
len(sjoin(cities_large_ddf, world_df))
Traceback:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[1], line 1
----> 1 get_ipython().run_cell_magic('timeit', '', 'len(sjoin(cities_large_ddf, world_df))\n')
File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/IPython/core/interactiveshell.py:2517, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
2515 with self.builtin_trap:
2516 args = (magic_arg_s, cell)
-> 2517 result = fn(*args, **kwargs)
2519 # The code below prevents the output from being displayed
2520 # when using magics with decorator @output_can_be_silenced
2521 # when the last Python token in the expression is a ';'.
2522 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/IPython/core/magics/execution.py:1185, in ExecutionMagics.timeit(self, line, cell, local_ns)
1183 for index in range(0, 10):
1184 number = 10 ** index
-> 1185 time_number = timer.timeit(number)
1186 if time_number >= 0.2:
1187 break
File ~/work/spatialpandas/spatialpandas/.pixi/envs/test-39/lib/python3.9/site-packages/IPython/core/magics/execution.py:173, in Timer.timeit(self, number)
171 gc.disable()
172 try:
--> 173 timing = self.inner(it, self.timer)
174 finally:
175 if gcold:
File <magic-timeit>:1, in inner(_it, _timer)
NameError: name 'cities_large_ddf' is not defined
|
unit:test-39:macos-latest
Process completed with exit code 1.
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
pixi-lock
Expired
|
249 KB |
|