datablob 0.9.1__tar.gz → 0.9.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datablob
3
- Version: 0.9.1
3
+ Version: 0.9.3
4
4
  Summary: Client for Updating a Simple Data Warehouse on Blob Storage
5
5
  Home-page: https://github.com/gocarta/datablob
6
6
  Download-URL: https://github.com/gocarta/datablob/tarball/download
@@ -11,7 +11,6 @@ import pandas as pd
11
11
  from shapely.geometry import shape
12
12
  import tempfile
13
13
  import tzdata
14
- from typing import Optional
15
14
  import zipfile
16
15
  from zoneinfo import ZoneInfo
17
16
 
@@ -417,17 +416,17 @@ class DataBlobClient:
417
416
  name: str,
418
417
  version: str,
419
418
  data: list[dict],
420
- column_names: Optional[list[str]] = None,
421
- description: Optional[str] = None,
422
- polygon_key: Optional[str] = None,
423
- latitude_key: Optional[str] = None,
424
- longitude_key: Optional[str] = None,
419
+ column_names: list[str] | None = None,
420
+ description: str | None = None,
421
+ polygon_key: str | None = None,
422
+ latitude_key: str | None = None,
423
+ longitude_key: str | None = None,
425
424
  json: bool = True,
426
425
  jsonl: bool = True,
427
426
  geojson: bool = True,
428
427
  parquet: bool = True,
429
428
  xlsx: bool = False,
430
- xlsx_data_types: Optional[list[str]] = None,
429
+ xlsx_data_types: list[str] | None = None,
431
430
  ):
432
431
  lastUpdated = dict(
433
432
  [(tz, datetime.now(ZoneInfo(tz)).isoformat()) for tz in self.timezones]
@@ -468,7 +467,7 @@ class DataBlobClient:
468
467
  crs="EPSG:4326",
469
468
  )
470
469
  # drops polygonal column that we don't use in shapefile output
471
- if polygon_key:
470
+ if polygon_key and polygon_key != "geometry":
472
471
  gdf.drop(columns=[polygon_key], inplace=True)
473
472
  buffer = io.BytesIO()
474
473
  gdf.to_parquet(buffer, engine="pyarrow")
@@ -492,8 +491,9 @@ class DataBlobClient:
492
491
  crs="EPSG:4326",
493
492
  )
494
493
 
495
- # can drop old polygon column, since we replaced with a geometry column
496
- gdf.drop(columns=[polygon_key], inplace=True)
494
+ if polygon_key != "geometry":
495
+ # can drop old polygon column, since we replaced with a geometry column
496
+ gdf.drop(columns=[polygon_key], inplace=True)
497
497
 
498
498
  buffer = io.BytesIO()
499
499
  gdf.to_parquet(buffer, engine="pyarrow")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datablob
3
- Version: 0.9.1
3
+ Version: 0.9.3
4
4
  Summary: Client for Updating a Simple Data Warehouse on Blob Storage
5
5
  Home-page: https://github.com/gocarta/datablob
6
6
  Download-URL: https://github.com/gocarta/datablob/tarball/download
@@ -15,7 +15,7 @@ setup(
15
15
  "__init__.py",
16
16
  ]
17
17
  },
18
- version="0.9.1",
18
+ version="0.9.3",
19
19
  description="Client for Updating a Simple Data Warehouse on Blob Storage",
20
20
  long_description=long_description,
21
21
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes