geo-activity-playground 0.26.2__py3-none-any.whl → 0.26.3__py3-none-any.whl

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.
@@ -47,7 +47,17 @@ def enrich_activities(kind_defaults: dict[dict[str, Any]]) -> None:
47
47
  or enriched_metadata_path.stat().st_mtime
48
48
  < extracted_metadata_path.stat().st_mtime
49
49
  ):
50
- new_extracted_metadata_paths.append(extracted_metadata_path)
50
+ extracted_time_series_path = (
51
+ activity_extracted_time_series_dir()
52
+ / f"{extracted_metadata_path.stem}.parquet"
53
+ )
54
+ if extracted_time_series_path.exists():
55
+ new_extracted_metadata_paths.append(extracted_metadata_path)
56
+ else:
57
+ logger.error(
58
+ f"Extracted activity metadata {extracted_metadata_path} is lacking the corresponding time series path {extracted_time_series_path}. Likely that is an activity without location data. Deleting this."
59
+ )
60
+ extracted_metadata_path.unlink()
51
61
 
52
62
  for extracted_metadata_path in tqdm(
53
63
  new_extracted_metadata_paths, desc="Enrich new activity data"
@@ -190,11 +190,10 @@ def import_from_strava_checkout() -> None:
190
190
  dateutil.parser.parse(row["Activity Date"], dayfirst=dayfirst)
191
191
  ),
192
192
  }
193
- meta_path = activity_extracted_meta_dir() / f"{activity_id}.pickle"
194
- with open(meta_path, "wb") as f:
195
- pickle.dump(table_activity_meta, f)
196
193
 
197
- time_series_path = activity_extracted_time_series_dir() / f"{activity_id}.parquet"
194
+ time_series_path = (
195
+ activity_extracted_time_series_dir() / f"{activity_id}.parquet"
196
+ )
198
197
  if time_series_path.exists():
199
198
  time_series = pd.read_parquet(time_series_path)
200
199
  else:
@@ -216,6 +215,9 @@ def import_from_strava_checkout() -> None:
216
215
  if "latitude" not in time_series.columns:
217
216
  continue
218
217
 
218
+ meta_path = activity_extracted_meta_dir() / f"{activity_id}.pickle"
219
+ with open(meta_path, "wb") as f:
220
+ pickle.dump(table_activity_meta, f)
219
221
  time_series.to_parquet(time_series_path)
220
222
  work_tracker.close()
221
223
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geo-activity-playground
3
- Version: 0.26.2
3
+ Version: 0.26.3
4
4
  Summary: Analysis of geo data activities like rides, runs or hikes.
5
5
  License: MIT
6
6
  Author: Martin Ueding
@@ -24,7 +24,7 @@ Requires-Dist: gpxpy (>=1.5.0,<2.0.0)
24
24
  Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
25
25
  Requires-Dist: matplotlib (>=3.6.3,<4.0.0)
26
26
  Requires-Dist: numpy (>=1.22.4,<2.0.0)
27
- Requires-Dist: pandas (>=2.0,<3.0)
27
+ Requires-Dist: pandas (>=2.2,<3.0)
28
28
  Requires-Dist: pyarrow (>=16.1.0,<17.0.0)
29
29
  Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
30
30
  Requires-Dist: requests (>=2.28.1,<3.0.0)
@@ -4,7 +4,7 @@ geo_activity_playground/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
4
4
  geo_activity_playground/core/activities.py,sha256=I1lsn1gO_P9eHbZCZlkCO6Lvi5sqXq_-c-1aDv6uKMs,8081
5
5
  geo_activity_playground/core/config.py,sha256=YjqCiEmIAa-GM1-JfBctMEsl8-I56pZyyDdTyPduOzw,477
6
6
  geo_activity_playground/core/coordinates.py,sha256=tDfr9mlXhK6E_MMIJ0vYWVCoH0Lq8uyuaqUgaa8i0jg,966
7
- geo_activity_playground/core/enrichment.py,sha256=wRVhrUCsvs2CcVhN-BQwxk_W_0E0AFp1_hncGzWNNvo,6435
7
+ geo_activity_playground/core/enrichment.py,sha256=CIkUS_wtLJ8ZLwtzxsZ8gRn8mkITLwIwq3AzTxZ-kzI,6994
8
8
  geo_activity_playground/core/heatmap.py,sha256=bRLQHzmTEsQbX8XWeg85x_lRGk272UoYRiCnoxZ5da0,4189
9
9
  geo_activity_playground/core/paths.py,sha256=ohJN_xNLh303uc0ATpL4iH01xANIE86pILRaQi4e-RQ,1893
10
10
  geo_activity_playground/core/privacy_zones.py,sha256=4TumHsVUN1uW6RG3ArqTXDykPVipF98DCxVBe7YNdO8,512
@@ -22,7 +22,7 @@ geo_activity_playground/importers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
22
22
  geo_activity_playground/importers/activity_parsers.py,sha256=m2SpvGlTZ8F3gG6YB24_ZFrlOAbtqbfWi-GIYspeUco,10593
23
23
  geo_activity_playground/importers/directory.py,sha256=YTYuroH-oYviL2a9B7No-6Fx4RrkhMqf60Yh-7dGats,5384
24
24
  geo_activity_playground/importers/strava_api.py,sha256=ihy_ezq_gYUy1V4jbtg41N6K0ilYVOEiPZE07lSiUHU,8444
25
- geo_activity_playground/importers/strava_checkout.py,sha256=6_t6AusNuPCOCfdG5KlfK0e4zMrVFM0sIRw7izQKOMg,8572
25
+ geo_activity_playground/importers/strava_checkout.py,sha256=gOmqwDJE2kP6KFwxJ8_zGn5kcEcRqnfOqw8jJ4eHcaU,8596
26
26
  geo_activity_playground/importers/test_directory.py,sha256=ljXokx7q0OgtHvEdHftcQYEmZJUDVv3OOF5opklxdT4,724
27
27
  geo_activity_playground/importers/test_strava_api.py,sha256=4vX7wDr1a9aRh8myxNrIq6RwDBbP8ZeoXXPc10CAbW4,431
28
28
  geo_activity_playground/webui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -93,8 +93,8 @@ geo_activity_playground/webui/upload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
93
93
  geo_activity_playground/webui/upload/blueprint.py,sha256=2l5q1LYtjgLF_3CAyPvCLx-wMebp14OJvgZBzGILdmQ,801
94
94
  geo_activity_playground/webui/upload/controller.py,sha256=BWcSlLy_fVAodDlnXkxE4eIotC_UHrjldACrToA-iAQ,3975
95
95
  geo_activity_playground/webui/upload/templates/upload/index.html.j2,sha256=hfXkEXaz_MkM46rU56423D6V6WtK-EAXPszSY-_-Tx8,1471
96
- geo_activity_playground-0.26.2.dist-info/LICENSE,sha256=4RpAwKO8bPkfXH2lnpeUW0eLkNWglyG4lbrLDU_MOwY,1070
97
- geo_activity_playground-0.26.2.dist-info/METADATA,sha256=Ot8-TBu04cUSoZHJPa3UuzX1-b2RwcN3kAfK4ykTaHw,1665
98
- geo_activity_playground-0.26.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
99
- geo_activity_playground-0.26.2.dist-info/entry_points.txt,sha256=pbNlLI6IIZIp7nPYCfAtiSiz2oxJSCl7DODD6SPkLKk,81
100
- geo_activity_playground-0.26.2.dist-info/RECORD,,
96
+ geo_activity_playground-0.26.3.dist-info/LICENSE,sha256=4RpAwKO8bPkfXH2lnpeUW0eLkNWglyG4lbrLDU_MOwY,1070
97
+ geo_activity_playground-0.26.3.dist-info/METADATA,sha256=9v9y9sR7bMNsUoFDrYQC9d-YQ0VL0UDVHhM6RY4I0iA,1665
98
+ geo_activity_playground-0.26.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
99
+ geo_activity_playground-0.26.3.dist-info/entry_points.txt,sha256=pbNlLI6IIZIp7nPYCfAtiSiz2oxJSCl7DODD6SPkLKk,81
100
+ geo_activity_playground-0.26.3.dist-info/RECORD,,