geo-activity-playground 0.33.2__tar.gz → 0.33.4__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.
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/PKG-INFO +5 -6
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/__main__.py +1 -1
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/explorer/video.py +2 -1
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/app.py +1 -1
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/entry_controller.py +1 -1
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/templates/home.html.j2 +3 -2
- geo_activity_playground-0.33.2/geo_activity_playground/webui/upload/controller.py → geo_activity_playground-0.33.4/geo_activity_playground/webui/upload_blueprint.py +40 -33
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/pyproject.toml +7 -8
- geo_activity_playground-0.33.2/geo_activity_playground/webui/upload/__init__.py +0 -0
- geo_activity_playground-0.33.2/geo_activity_playground/webui/upload/blueprint.py +0 -44
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/LICENSE +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/activities.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/config.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/coordinates.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/enrichment.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/heart_rate.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/heatmap.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/paths.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/privacy_zones.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/similarity.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/tasks.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/test_tiles.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/test_time_conversion.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/tiles.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/core/time_conversion.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/explorer/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/explorer/grid_file.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/explorer/tile_visits.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/importers/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/importers/activity_parsers.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/importers/csv_parser.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/importers/directory.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/importers/strava_api.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/importers/strava_checkout.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/importers/test_csv_parser.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/importers/test_directory.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/importers/test_strava_api.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/activity/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/activity/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/activity/controller.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/activity/templates/activity/day.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/activity/templates/activity/edit.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/activity/templates/activity/lines.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/activity/templates/activity/name.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/activity/templates/activity/show.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/auth/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/auth/templates/auth/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/authenticator.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/calendar/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/calendar/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/calendar/controller.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/calendar/templates/calendar/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/calendar/templates/calendar/month.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/eddington/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/eddington/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/eddington/controller.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/eddington/templates/eddington/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/equipment/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/equipment/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/equipment/controller.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/equipment/templates/equipment/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/explorer/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/explorer/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/explorer/controller.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/explorer/templates/explorer/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/heatmap/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/heatmap/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/heatmap/heatmap_controller.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/heatmap/templates/heatmap/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/plot_util.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/search/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/search/templates/search/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/controller.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/admin-password.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/color-schemes.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/equipment-offsets.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/heart-rate.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/kind-renames.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/kinds-without-achievements.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/metadata-extraction.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/privacy-zones.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/segmentation.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/sharepic.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/settings/templates/settings/strava.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/square_planner/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/square_planner/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/square_planner/controller.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/square_planner/templates/square_planner/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/android-chrome-192x192.png +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/android-chrome-512x512.png +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/apple-touch-icon.png +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/bootstrap-dark-mode.js +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/browserconfig.xml +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/favicon-16x16.png +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/favicon-32x32.png +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/favicon-48x48.png +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/favicon.ico +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/favicon.svg +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/mstile-150x150.png +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/site.webmanifest +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/web-app-manifest-192x192.png +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/static/web-app-manifest-512x512.png +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/summary/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/summary/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/summary/controller.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/summary/templates/summary/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/templates/page.html.j2 +0 -0
- {geo_activity_playground-0.33.2/geo_activity_playground/webui/upload → geo_activity_playground-0.33.4/geo_activity_playground/webui}/templates/upload/index.html.j2 +0 -0
- {geo_activity_playground-0.33.2/geo_activity_playground/webui/upload → geo_activity_playground-0.33.4/geo_activity_playground/webui}/templates/upload/reload.html.j2 +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/tile/__init__.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/tile/blueprint.py +0 -0
- {geo_activity_playground-0.33.2 → geo_activity_playground-0.33.4}/geo_activity_playground/webui/tile/controller.py +0 -0
@@ -1,17 +1,17 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: geo-activity-playground
|
3
|
-
Version: 0.33.
|
3
|
+
Version: 0.33.4
|
4
4
|
Summary: Analysis of geo data activities like rides, runs or hikes.
|
5
5
|
License: MIT
|
6
6
|
Author: Martin Ueding
|
7
7
|
Author-email: mu@martin-ueding.de
|
8
|
-
Requires-Python: >=3.10,<3.
|
8
|
+
Requires-Python: >=3.10,<3.14
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
11
|
Classifier: Programming Language :: Python :: 3.10
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
14
|
-
Requires-Dist: Pillow (>=
|
14
|
+
Requires-Dist: Pillow (>=11.0.0,<12.0.0)
|
15
15
|
Requires-Dist: altair (>=5.1.2,<6.0.0)
|
16
16
|
Requires-Dist: appdirs (>=1.4.4,<2.0.0)
|
17
17
|
Requires-Dist: charset-normalizer (>=3.3.2,<4.0.0)
|
@@ -22,12 +22,11 @@ Requires-Dist: geojson (>=3.0.1,<4.0.0)
|
|
22
22
|
Requires-Dist: gpxpy (>=1.5.0,<2.0.0)
|
23
23
|
Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
|
24
24
|
Requires-Dist: matplotlib (>=3.6.3,<4.0.0)
|
25
|
-
Requires-Dist: numpy (>=1.
|
25
|
+
Requires-Dist: numpy (>=2.1.3,<3.0.0)
|
26
26
|
Requires-Dist: pandas (>=2.2,<3.0)
|
27
|
-
Requires-Dist: pyarrow (>=
|
27
|
+
Requires-Dist: pyarrow (>=18.1.0,<19.0.0)
|
28
28
|
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
|
29
29
|
Requires-Dist: requests (>=2.28.1,<3.0.0)
|
30
|
-
Requires-Dist: scipy (>=1.8.1,<2.0.0)
|
31
30
|
Requires-Dist: shapely (>=2.0.5,<3.0.0)
|
32
31
|
Requires-Dist: stravalib (>=2.0,<3.0)
|
33
32
|
Requires-Dist: tcxreader (>=0.4.5,<0.5.0)
|
@@ -13,7 +13,7 @@ from geo_activity_playground.core.config import import_old_strava_config
|
|
13
13
|
from geo_activity_playground.explorer.tile_visits import TileVisitAccessor
|
14
14
|
from geo_activity_playground.explorer.video import explorer_video_main
|
15
15
|
from geo_activity_playground.webui.app import web_ui_main
|
16
|
-
from geo_activity_playground.webui.
|
16
|
+
from geo_activity_playground.webui.upload_blueprint import scan_for_activities
|
17
17
|
|
18
18
|
logger = logging.getLogger(__name__)
|
19
19
|
|
@@ -9,13 +9,14 @@ from typing import Tuple
|
|
9
9
|
|
10
10
|
import numpy as np
|
11
11
|
import pandas as pd
|
12
|
-
import scipy.interpolate
|
13
12
|
from PIL import Image
|
14
13
|
from PIL import ImageEnhance
|
15
14
|
from tqdm import tqdm
|
16
15
|
|
17
16
|
from ..core.tiles import get_tile
|
18
17
|
|
18
|
+
# import scipy.interpolate
|
19
|
+
|
19
20
|
|
20
21
|
def build_image(
|
21
22
|
center_x: float,
|
@@ -22,7 +22,7 @@ from .search.blueprint import make_search_blueprint
|
|
22
22
|
from .square_planner.blueprint import make_square_planner_blueprint
|
23
23
|
from .summary.blueprint import make_summary_blueprint
|
24
24
|
from .tile.blueprint import make_tile_blueprint
|
25
|
-
from .
|
25
|
+
from .upload_blueprint import make_upload_blueprint
|
26
26
|
from geo_activity_playground.core.config import Config
|
27
27
|
from geo_activity_playground.core.config import ConfigAccessor
|
28
28
|
from geo_activity_playground.webui.auth.blueprint import make_auth_blueprint
|
@@ -16,10 +16,10 @@ class EntryController:
|
|
16
16
|
self._config = config
|
17
17
|
|
18
18
|
def render(self) -> dict:
|
19
|
-
kind_scale = make_kind_scale(self._repository.meta, self._config)
|
20
19
|
result = {"latest_activities": []}
|
21
20
|
|
22
21
|
if len(self._repository):
|
22
|
+
kind_scale = make_kind_scale(self._repository.meta, self._config)
|
23
23
|
result["distance_last_30_days_plot"] = distance_last_30_days_meta_plot(
|
24
24
|
self._repository.meta, kind_scale
|
25
25
|
)
|
@@ -58,8 +58,9 @@
|
|
58
58
|
</div>
|
59
59
|
{% endfor %}
|
60
60
|
{% else %}
|
61
|
-
<p>You don't have activities yet. Either put some files into a directory <tt>Activities</tt
|
62
|
-
href="{{ url_for('settings.strava') }}">set up
|
61
|
+
<p>You don't have activities yet. Either put some files into a directory <tt>Activities</tt>, <a
|
62
|
+
href="{{ url_for('upload.index') }}">upload activities</a> or <a href="{{ url_for('settings.strava') }}">set up
|
63
|
+
Strava API</a>.</p>
|
63
64
|
{% endif %}
|
64
65
|
|
65
66
|
{% endblock %}
|
@@ -1,53 +1,51 @@
|
|
1
|
-
import logging
|
2
1
|
import os
|
3
2
|
import pathlib
|
4
3
|
|
4
|
+
from flask import Blueprint
|
5
5
|
from flask import flash
|
6
6
|
from flask import redirect
|
7
|
+
from flask import render_template
|
7
8
|
from flask import request
|
8
|
-
from flask import Response
|
9
9
|
from flask import url_for
|
10
|
-
from werkzeug.utils import secure_filename
|
11
10
|
|
12
|
-
from
|
13
|
-
from
|
11
|
+
from ..core.activities import ActivityRepository
|
12
|
+
from ..core.activities import build_activity_meta
|
13
|
+
from ..explorer.tile_visits import compute_tile_evolution
|
14
|
+
from ..explorer.tile_visits import compute_tile_visits_new
|
15
|
+
from ..explorer.tile_visits import TileVisitAccessor
|
14
16
|
from geo_activity_playground.core.config import Config
|
15
17
|
from geo_activity_playground.core.enrichment import enrich_activities
|
16
|
-
from geo_activity_playground.explorer.tile_visits import compute_tile_evolution
|
17
|
-
from geo_activity_playground.explorer.tile_visits import compute_tile_visits_new
|
18
|
-
from geo_activity_playground.explorer.tile_visits import TileVisitAccessor
|
19
18
|
from geo_activity_playground.importers.directory import get_file_hash
|
20
19
|
from geo_activity_playground.importers.directory import import_from_directory
|
21
20
|
from geo_activity_playground.importers.strava_api import import_from_strava_api
|
22
21
|
from geo_activity_playground.importers.strava_checkout import (
|
23
22
|
import_from_strava_checkout,
|
24
23
|
)
|
24
|
+
from geo_activity_playground.webui.authenticator import Authenticator
|
25
|
+
from geo_activity_playground.webui.authenticator import needs_authentication
|
25
26
|
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
tile_visit_accessor: TileVisitAccessor,
|
35
|
-
config: Config,
|
36
|
-
) -> None:
|
37
|
-
self._repository = repository
|
38
|
-
self._tile_visit_accessor = tile_visit_accessor
|
39
|
-
self._config = config
|
28
|
+
def make_upload_blueprint(
|
29
|
+
repository: ActivityRepository,
|
30
|
+
tile_visit_accessor: TileVisitAccessor,
|
31
|
+
config: Config,
|
32
|
+
authenticator: Authenticator,
|
33
|
+
) -> Blueprint:
|
34
|
+
blueprint = Blueprint("upload", __name__, template_folder="templates")
|
40
35
|
|
41
|
-
|
36
|
+
@blueprint.route("/")
|
37
|
+
@needs_authentication(authenticator)
|
38
|
+
def index():
|
39
|
+
pathlib.Path("Activities").mkdir(exist_ok=True, parents=True)
|
42
40
|
directories = []
|
43
41
|
for root, dirs, files in os.walk("Activities"):
|
44
42
|
directories.append(root)
|
45
43
|
directories.sort()
|
46
|
-
return
|
47
|
-
"directories": directories,
|
48
|
-
}
|
44
|
+
return render_template("upload/index.html.j2", directories=directories)
|
49
45
|
|
50
|
-
|
46
|
+
@blueprint.route("/receive", methods=["POST"])
|
47
|
+
@needs_authentication(authenticator)
|
48
|
+
def receive():
|
51
49
|
# check if the post request has the file part
|
52
50
|
if "file" not in request.files:
|
53
51
|
flash("No file could be found. Did you select a file?", "warning")
|
@@ -74,25 +72,34 @@ class UploadController:
|
|
74
72
|
assert target_path.is_relative_to("Activities")
|
75
73
|
file.save(target_path)
|
76
74
|
scan_for_activities(
|
77
|
-
|
78
|
-
|
79
|
-
|
75
|
+
repository,
|
76
|
+
tile_visit_accessor,
|
77
|
+
config,
|
80
78
|
skip_strava=True,
|
81
79
|
)
|
82
80
|
activity_id = get_file_hash(target_path)
|
83
81
|
flash(f"Activity was saved with ID {activity_id}.", "success")
|
84
82
|
return redirect(f"/activity/{activity_id}")
|
85
83
|
|
86
|
-
|
84
|
+
@blueprint.route("/refresh")
|
85
|
+
@needs_authentication(authenticator)
|
86
|
+
def reload():
|
87
|
+
return render_template("upload/reload.html.j2")
|
88
|
+
|
89
|
+
@blueprint.route("/execute-reload")
|
90
|
+
@needs_authentication(authenticator)
|
91
|
+
def execute_reload():
|
87
92
|
scan_for_activities(
|
88
|
-
|
89
|
-
|
90
|
-
|
93
|
+
repository,
|
94
|
+
tile_visit_accessor,
|
95
|
+
config,
|
91
96
|
skip_strava=True,
|
92
97
|
)
|
93
98
|
flash("Scanned for new activities.", category="success")
|
94
99
|
return redirect(url_for("index"))
|
95
100
|
|
101
|
+
return blueprint
|
102
|
+
|
96
103
|
|
97
104
|
def scan_for_activities(
|
98
105
|
repository: ActivityRepository,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "geo-activity-playground"
|
3
|
-
version = "0.33.
|
3
|
+
version = "0.33.4"
|
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"
|
@@ -9,7 +9,7 @@ license = "MIT"
|
|
9
9
|
geo-activity-playground = "geo_activity_playground.__main__:main"
|
10
10
|
|
11
11
|
[tool.poetry.dependencies]
|
12
|
-
python = "^3.10,<3.
|
12
|
+
python = "^3.10,<3.14"
|
13
13
|
|
14
14
|
altair = "^5.1.2"
|
15
15
|
appdirs = "^1.4.4"
|
@@ -21,13 +21,12 @@ geojson = "^3.0.1"
|
|
21
21
|
gpxpy = "^1.5.0"
|
22
22
|
jinja2 = "^3.1.2"
|
23
23
|
matplotlib = "^3.6.3"
|
24
|
-
numpy = "^1.
|
24
|
+
numpy = "^2.1.3"
|
25
25
|
pandas = "^2.2"
|
26
|
-
Pillow = "^
|
27
|
-
pyarrow = "^
|
26
|
+
Pillow = "^11.0.0"
|
27
|
+
pyarrow = "^18.1.0"
|
28
28
|
python-dateutil = "^2.8.2"
|
29
29
|
requests = "^2.28.1"
|
30
|
-
scipy = "^1.8.1"
|
31
30
|
stravalib = "^2.0"
|
32
31
|
tcxreader = "^0.4.5"
|
33
32
|
tomli = { version = "^2.0.1", python = "<3.11" }
|
@@ -39,12 +38,12 @@ xmltodict = "^0.13.0"
|
|
39
38
|
shapely = "^2.0.5"
|
40
39
|
|
41
40
|
[tool.poetry.group.dev.dependencies]
|
42
|
-
black = "^
|
41
|
+
black = "^24.0.0"
|
43
42
|
mkdocs-material = "^9.4.1"
|
44
43
|
mypy = "^1.10.0"
|
45
44
|
pandas-stubs = "^2.2.2.240603"
|
46
45
|
py-spy = "^0.3.14"
|
47
|
-
pytest = "^
|
46
|
+
pytest = "^8.0"
|
48
47
|
types-decorator = "^5.1.8.20240106"
|
49
48
|
types-paramiko = "^3.4.0.20240120"
|
50
49
|
types-pycurl = "^7.45.2.20240106"
|
File without changes
|
@@ -1,44 +0,0 @@
|
|
1
|
-
from flask import Blueprint
|
2
|
-
from flask import render_template
|
3
|
-
|
4
|
-
from ...core.activities import ActivityRepository
|
5
|
-
from ...explorer.tile_visits import TileVisitAccessor
|
6
|
-
from .controller import UploadController
|
7
|
-
from geo_activity_playground.core.config import Config
|
8
|
-
from geo_activity_playground.webui.authenticator import Authenticator
|
9
|
-
from geo_activity_playground.webui.authenticator import needs_authentication
|
10
|
-
|
11
|
-
|
12
|
-
def make_upload_blueprint(
|
13
|
-
repository: ActivityRepository,
|
14
|
-
tile_visit_accessor: TileVisitAccessor,
|
15
|
-
config: Config,
|
16
|
-
authenticator: Authenticator,
|
17
|
-
) -> Blueprint:
|
18
|
-
blueprint = Blueprint("upload", __name__, template_folder="templates")
|
19
|
-
|
20
|
-
upload_controller = UploadController(repository, tile_visit_accessor, config)
|
21
|
-
|
22
|
-
@blueprint.route("/")
|
23
|
-
@needs_authentication(authenticator)
|
24
|
-
def index():
|
25
|
-
return render_template(
|
26
|
-
"upload/index.html.j2", **upload_controller.render_form()
|
27
|
-
)
|
28
|
-
|
29
|
-
@blueprint.route("/receive", methods=["POST"])
|
30
|
-
@needs_authentication(authenticator)
|
31
|
-
def receive():
|
32
|
-
return upload_controller.receive()
|
33
|
-
|
34
|
-
@blueprint.route("/refresh")
|
35
|
-
@needs_authentication(authenticator)
|
36
|
-
def reload():
|
37
|
-
return render_template("upload/reload.html.j2")
|
38
|
-
|
39
|
-
@blueprint.route("/execute-reload")
|
40
|
-
@needs_authentication(authenticator)
|
41
|
-
def execute_reload():
|
42
|
-
return upload_controller.execute_reload()
|
43
|
-
|
44
|
-
return blueprint
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|