geo-activity-playground 0.26.1__tar.gz → 0.26.2__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.
Files changed (98) hide show
  1. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/PKG-INFO +1 -1
  2. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/app.py +9 -3
  3. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/summary/controller.py +7 -6
  4. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/templates/page.html.j2 +6 -2
  5. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/pyproject.toml +1 -1
  6. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/LICENSE +0 -0
  7. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/__init__.py +0 -0
  8. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/__main__.py +0 -0
  9. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/__init__.py +0 -0
  10. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/activities.py +0 -0
  11. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/config.py +0 -0
  12. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/coordinates.py +0 -0
  13. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/enrichment.py +0 -0
  14. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/heatmap.py +0 -0
  15. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/paths.py +0 -0
  16. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/privacy_zones.py +0 -0
  17. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/similarity.py +0 -0
  18. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/tasks.py +0 -0
  19. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/test_tiles.py +0 -0
  20. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/test_time_conversion.py +0 -0
  21. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/tiles.py +0 -0
  22. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/core/time_conversion.py +0 -0
  23. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/explorer/__init__.py +0 -0
  24. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/explorer/grid_file.py +0 -0
  25. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/explorer/tile_visits.py +0 -0
  26. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/explorer/video.py +0 -0
  27. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/importers/__init__.py +0 -0
  28. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/importers/activity_parsers.py +0 -0
  29. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/importers/directory.py +0 -0
  30. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/importers/strava_api.py +0 -0
  31. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/importers/strava_checkout.py +0 -0
  32. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/importers/test_directory.py +0 -0
  33. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/importers/test_strava_api.py +0 -0
  34. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/__init__.py +0 -0
  35. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/activity/__init__.py +0 -0
  36. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/activity/blueprint.py +0 -0
  37. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/activity/controller.py +0 -0
  38. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/activity/templates/activity/day.html.j2 +0 -0
  39. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/activity/templates/activity/lines.html.j2 +0 -0
  40. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/activity/templates/activity/name.html.j2 +0 -0
  41. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/activity/templates/activity/show.html.j2 +0 -0
  42. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/calendar/__init__.py +0 -0
  43. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/calendar/blueprint.py +0 -0
  44. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/calendar/controller.py +0 -0
  45. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/calendar/templates/calendar/index.html.j2 +0 -0
  46. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/calendar/templates/calendar/month.html.j2 +0 -0
  47. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/eddington/__init__.py +0 -0
  48. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/eddington/blueprint.py +0 -0
  49. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/eddington/controller.py +0 -0
  50. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/eddington/templates/eddington/index.html.j2 +0 -0
  51. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/entry_controller.py +0 -0
  52. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/equipment/__init__.py +0 -0
  53. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/equipment/blueprint.py +0 -0
  54. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/equipment/controller.py +0 -0
  55. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/equipment/templates/equipment/index.html.j2 +0 -0
  56. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/explorer/__init__.py +0 -0
  57. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/explorer/blueprint.py +0 -0
  58. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/explorer/controller.py +0 -0
  59. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/explorer/templates/explorer/index.html.j2 +0 -0
  60. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/heatmap/__init__.py +0 -0
  61. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/heatmap/blueprint.py +0 -0
  62. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/heatmap/heatmap_controller.py +0 -0
  63. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/heatmap/templates/heatmap/index.html.j2 +0 -0
  64. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/search_controller.py +0 -0
  65. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/square_planner/__init__.py +0 -0
  66. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/square_planner/blueprint.py +0 -0
  67. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/square_planner/controller.py +0 -0
  68. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/square_planner/templates/square_planner/index.html.j2 +0 -0
  69. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/android-chrome-192x192.png +0 -0
  70. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/android-chrome-384x384.png +0 -0
  71. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/android-chrome-512x512.png +0 -0
  72. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/apple-touch-icon.png +0 -0
  73. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/bootstrap-dark-mode.js +0 -0
  74. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/browserconfig.xml +0 -0
  75. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/favicon-16x16.png +0 -0
  76. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/favicon-32x32.png +0 -0
  77. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/favicon.ico +0 -0
  78. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/mstile-150x150.png +0 -0
  79. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/safari-pinned-tab.svg +0 -0
  80. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/static/site.webmanifest +0 -0
  81. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/strava/__init__.py +0 -0
  82. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/strava/blueprint.py +0 -0
  83. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/strava/controller.py +0 -0
  84. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/strava/templates/strava/client-id.html.j2 +0 -0
  85. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/strava/templates/strava/connected.html.j2 +0 -0
  86. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/summary/__init__.py +0 -0
  87. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/summary/blueprint.py +0 -0
  88. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/summary/templates/summary/index.html.j2 +0 -0
  89. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/templates/home.html.j2 +0 -0
  90. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/templates/search.html.j2 +0 -0
  91. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/templates/settings.html.j2 +0 -0
  92. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/tile/__init__.py +0 -0
  93. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/tile/blueprint.py +0 -0
  94. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/tile/controller.py +0 -0
  95. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/upload/__init__.py +0 -0
  96. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/upload/blueprint.py +0 -0
  97. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/upload/controller.py +0 -0
  98. {geo_activity_playground-0.26.1 → geo_activity_playground-0.26.2}/geo_activity_playground/webui/upload/templates/upload/index.html.j2 +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geo-activity-playground
3
- Version: 0.26.1
3
+ Version: 0.26.2
4
4
  Summary: Analysis of geo data activities like rides, runs or hikes.
5
5
  License: MIT
6
6
  Author: Martin Ueding
@@ -1,9 +1,9 @@
1
+ import importlib
1
2
  import json
2
3
  import pathlib
3
4
  import secrets
4
5
 
5
6
  from flask import Flask
6
- from flask import redirect
7
7
  from flask import render_template
8
8
  from flask import request
9
9
 
@@ -23,7 +23,6 @@ from .summary.blueprint import make_summary_blueprint
23
23
  from .tile.blueprint import make_tile_blueprint
24
24
  from .upload.blueprint import make_upload_blueprint
25
25
  from geo_activity_playground.core.privacy_zones import PrivacyZone
26
- from geo_activity_playground.webui.strava.controller import StravaController
27
26
 
28
27
 
29
28
  def route_search(app: Flask, repository: ActivityRepository) -> None:
@@ -47,7 +46,7 @@ def route_start(app: Flask, repository: ActivityRepository) -> None:
47
46
 
48
47
 
49
48
  def route_settings(app: Flask) -> None:
50
- @app.route("/settings")
49
+ @app.route("/settings/")
51
50
  def settings():
52
51
  return render_template("settings.html.j2")
53
52
 
@@ -122,4 +121,11 @@ def webui_main(
122
121
  url_prefix="/upload",
123
122
  )
124
123
 
124
+ @app.context_processor
125
+ def inject_global_variables() -> dict:
126
+ return {
127
+ "version": importlib.metadata.version("geo-activity-playground"),
128
+ "num_activities": len(repository),
129
+ }
130
+
125
131
  app.run(host=host, port=port)
@@ -61,11 +61,11 @@ def nominate_activities(meta: pd.DataFrame) -> dict[int, list[str]]:
61
61
  i = subset["elapsed_time"].idxmax()
62
62
  nominations[i].append(f"Longest elapsed time: {meta.loc[i].elapsed_time}")
63
63
 
64
- if "calories" in subset.columns:
64
+ if "calories" in subset.columns and not pd.isna(subset["calories"]).all():
65
65
  i = subset["calories"].idxmax()
66
66
  nominations[i].append(f"Most calories burnt: {meta.loc[i].calories:.0f} kcal")
67
67
 
68
- if "steps" in subset:
68
+ if "steps" in subset.columns and not pd.isna(subset["steps"]).all():
69
69
  i = subset["steps"].idxmax()
70
70
  nominations[i].append(f"Most steps: {meta.loc[i].steps:.0f}")
71
71
 
@@ -87,15 +87,16 @@ def nominate_activities(meta: pd.DataFrame) -> dict[int, list[str]]:
87
87
  ]:
88
88
  if key in group.columns:
89
89
  series = group[key]
90
- i = series.idxmax()
91
- if not pd.isna(i):
92
- nominations[i].append(text(meta.loc[i]))
90
+ if not pd.isna(series).all():
91
+ i = series.idxmax()
92
+ if not pd.isna(i):
93
+ nominations[i].append(text(meta.loc[i]))
93
94
 
94
95
  return nominations
95
96
 
96
97
 
97
98
  def embellished_activities(meta: pd.DataFrame) -> pd.DataFrame:
98
- df = meta.copy()
99
+ df = meta.loc[~pd.isna(meta["start"])].copy()
99
100
  df["year"] = [start.year for start in df["start"]]
100
101
  df["month"] = [start.month for start in df["start"]]
101
102
  df["day"] = [start.day for start in df["start"]]
@@ -60,7 +60,7 @@
60
60
  </button>
61
61
  <div class="collapse navbar-collapse" id="navbarSupportedContent">
62
62
  <ul class="navbar-nav me-auto mb-2 mb-lg-0">
63
-
63
+ {% if num_activities > 0 %}
64
64
  <li class="nav-item">
65
65
  <a class="nav-link" aria-current="page" href="{{ url_for('summary.index') }}">Summary</a>
66
66
  </li>
@@ -86,6 +86,7 @@
86
86
  <a class="nav-link" aria-current="page"
87
87
  href="{{ url_for('equipment.index') }}">Equipment</a>
88
88
  </li>
89
+ {% endif %}
89
90
  <li class="nav-item">
90
91
  <a class="nav-link" aria-current="page" href="{{ url_for('upload.index') }}">Upload</a>
91
92
  </li>
@@ -155,7 +156,10 @@
155
156
  {% endblock %}
156
157
 
157
158
  <div class="row border-top py-3 my-4">
158
- <ul class="nav col-12 justify-content-end">
159
+ <ul class="nav col-4">
160
+ <li class="nav-item text-muted px-2 nav-link">Version {{ version }}</li>
161
+ </ul>
162
+ <ul class="nav col-8 justify-content-end">
159
163
  <li class="nav-item"><a href="https://github.com/martin-ueding/geo-activity-playground"
160
164
  class="nav-link px-2 text-muted" target="_blank">GitHub</a></li>
161
165
  <li class="nav-item"><a href="https://martin-ueding.github.io/geo-activity-playground/"
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "geo-activity-playground"
3
- version = "0.26.1"
3
+ version = "0.26.2"
4
4
  description = "Analysis of geo data activities like rides, runs or hikes."
5
5
  authors = ["Martin Ueding <mu@martin-ueding.de>"]
6
6
  license = "MIT"