geo-activity-playground 0.43.1__py3-none-any.whl → 0.43.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.
@@ -212,7 +212,8 @@ def make_explorer_blueprint(
212
212
  width = 256 // factor
213
213
  for xo in range(factor):
214
214
  for yo in range(factor):
215
- if (x * factor + xo, y * factor + yo) not in tile_visits:
215
+ tile = (x * factor + xo, y * factor + yo)
216
+ if tile not in tile_visits:
216
217
  map_tile[
217
218
  yo * width : (yo + 1) * width, xo * width : (xo + 1) * width
218
219
  ] = grayscale[
@@ -95,16 +95,18 @@ def make_settings_blueprint(
95
95
  def index():
96
96
  return render_template("settings/index.html.j2")
97
97
 
98
- @blueprint.route("/admin-password")
98
+ @blueprint.route("/admin-password", methods=["GET", "POST"])
99
99
  @needs_authentication(authenticator)
100
100
  def admin_password() -> Response:
101
101
  if request.method == "POST":
102
102
  config_accessor().upload_password = request.form["password"]
103
103
  config_accessor.save()
104
104
  flasher.flash_message("Updated admin password.", FlashTypes.SUCCESS)
105
- return render_template(
106
- "settings/admin-password.html.j2",
107
- password=config_accessor().upload_password,
105
+ return Response(
106
+ render_template(
107
+ "settings/admin-password.html.j2",
108
+ password=config_accessor().upload_password,
109
+ )
108
110
  )
109
111
 
110
112
  @blueprint.route("/color-schemes", methods=["GET", "POST"])
@@ -158,11 +160,11 @@ def make_settings_blueprint(
158
160
  assert len(ids) == len(names) == len(offsets)
159
161
  for id, name, offset in zip(ids, names, offsets):
160
162
  if id:
161
- equipment = DB.session.get(Equipment, int(id))
163
+ equipment = DB.session.get_one(Equipment, int(id))
162
164
  equipment.name = name
163
165
  equipment.offset_km = int(float(offset))
164
166
  if not id and name:
165
- equipment = Equipment(name)
167
+ equipment = Equipment(name=name)
166
168
  if offset:
167
169
  equipment.offset_km = int(float(offset))
168
170
  DB.session.add(equipment)
@@ -191,11 +193,11 @@ def make_settings_blueprint(
191
193
  assert len(ids) == len(names)
192
194
  for id, name in zip(ids, names):
193
195
  if id:
194
- kind = DB.session.get(Kind, int(id))
196
+ kind = DB.session.get_one(Kind, int(id))
195
197
  kind.name = name
196
198
  kind.consider_for_achievements = id in consider_for_achievements
197
199
  if not id and name:
198
- kind = Kind(name)
200
+ kind = Kind(name=name)
199
201
  if consider_for_achievements:
200
202
  kind.consider_for_achievements = (
201
203
  "new" in consider_for_achievements
@@ -124,7 +124,7 @@ def scan_for_activities(
124
124
  kind.consider_for_achievements = True
125
125
  DB.session.commit()
126
126
  tile_visit_accessor.reset()
127
- work_tracker_path("tile-state").unlink()
127
+ work_tracker_path("tile-state").unlink(missing_ok=True)
128
128
  compute_tile_visits_new(repository, tile_visit_accessor)
129
129
  compute_tile_evolution(tile_visit_accessor.tile_state, config)
130
130
  tile_visit_accessor.save()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geo-activity-playground
3
- Version: 0.43.1
3
+ Version: 0.43.3
4
4
  Summary: Analysis of geo data activities like rides, runs or hikes.
5
5
  License: MIT
6
6
  Author: Martin Ueding
@@ -61,16 +61,16 @@ geo_activity_playground/webui/blueprints/calendar_blueprint.py,sha256=4EIBZ8rdXE
61
61
  geo_activity_playground/webui/blueprints/eddington_blueprints.py,sha256=Umb2wtKmAXuQZEXt0d985qMILtvqc3vxj_yXymnzmUs,8702
62
62
  geo_activity_playground/webui/blueprints/entry_views.py,sha256=9OuaxbA-J5D2Qn2OSSIjIb-eRTxXY8i1LhlfUk1W60Q,2910
63
63
  geo_activity_playground/webui/blueprints/equipment_blueprint.py,sha256=juQ5L2BlrECb00LBbiY2yc0b8W_B9Y3fPwtbiaRfgpo,5634
64
- geo_activity_playground/webui/blueprints/explorer_blueprint.py,sha256=6w6seOCVf7Z5y4BBtgVwoZ4t8qastnm7ViX8Bs_zj2w,15566
64
+ geo_activity_playground/webui/blueprints/explorer_blueprint.py,sha256=jMjLxmUhy9ip4Jjw9ABfkdD3CfqXqcE2C0VwQUBZ3WY,15598
65
65
  geo_activity_playground/webui/blueprints/heatmap_blueprint.py,sha256=iHI5YJYhX7ZOlzTgzl2efIRDzt3UMYCx7X4-LVd0MWk,8702
66
66
  geo_activity_playground/webui/blueprints/photo_blueprint.py,sha256=sYGp2XVGodkAifGHbEqpIY-7bBH5R7G7Dwg4HqgxMSY,7269
67
67
  geo_activity_playground/webui/blueprints/plot_builder_blueprint.py,sha256=7HrjpBM-608HSOh0i31Lmt7yDNMfWlEn6G7DlYqlV9w,3031
68
68
  geo_activity_playground/webui/blueprints/search_blueprint.py,sha256=Sv_KL1Cdai26y51qVfI-5jZLhtElREsEar1dbR_VAC4,2275
69
- geo_activity_playground/webui/blueprints/settings_blueprint.py,sha256=p_17BC2ZQyPu5VSl7evc5YyQmB3-L-WxgzOTv9UJsK0,17245
69
+ geo_activity_playground/webui/blueprints/settings_blueprint.py,sha256=788rbsIjbOrLU6kEl2EzxA6ZUwI-t8KR9VW5klS3i0c,17332
70
70
  geo_activity_playground/webui/blueprints/square_planner_blueprint.py,sha256=xVaxJxmt8Dysl3UL9f2y__LVLtTH2Np1Ust4OSXKRAk,4746
71
71
  geo_activity_playground/webui/blueprints/summary_blueprint.py,sha256=rK4LGR2Rpioy4wSqNYuyRn4WxaWeBLensJ3PmAd-ouY,11469
72
72
  geo_activity_playground/webui/blueprints/tile_blueprint.py,sha256=YzZf9OrNdjhc1_j4MtO1DMcw1uCv29ueNsYd-mWqgbg,837
73
- geo_activity_playground/webui/blueprints/upload_blueprint.py,sha256=4ZCPZiaO3zAMPeFHal-4mmMyDSW2a5amOXtYtKVpOxw,4592
73
+ geo_activity_playground/webui/blueprints/upload_blueprint.py,sha256=9IeaxS7ObqLhe8eju8nVXUt2FfEOw9mMz9qxFdWUJ3k,4607
74
74
  geo_activity_playground/webui/columns.py,sha256=hSW8bFVKRUMBlWZYAN-tZ_tfED3VDQK75e4Zzw7_jZ0,642
75
75
  geo_activity_playground/webui/flasher.py,sha256=Covc1D9cO_jjokRWnvyiXCc2tfp3aZ8XkNqFdA1AXtk,500
76
76
  geo_activity_playground/webui/plot_util.py,sha256=5Uesjj-xcMskQX2z9viDZYHSxLGrH2a5dHA1ogsJW9U,261
@@ -152,8 +152,8 @@ geo_activity_playground/webui/templates/square_planner/index.html.j2,sha256=-OnY
152
152
  geo_activity_playground/webui/templates/summary/index.html.j2,sha256=soGpTK-pD81YBlMWNWLnkWeEmVIbI5JwmGZQUN2c3DI,9151
153
153
  geo_activity_playground/webui/templates/upload/index.html.j2,sha256=I1Ix8tDS3YBdi-HdaNfjkzYXVVCjfUTe5PFTnap1ydc,775
154
154
  geo_activity_playground/webui/templates/upload/reload.html.j2,sha256=YZWX5eDeNyqKJdQAywDBcU8DZBm22rRBbZqFjrFrCvQ,556
155
- geo_activity_playground-0.43.1.dist-info/LICENSE,sha256=4RpAwKO8bPkfXH2lnpeUW0eLkNWglyG4lbrLDU_MOwY,1070
156
- geo_activity_playground-0.43.1.dist-info/METADATA,sha256=cD_X2yhW8FOAo1wI7PzNahmKhm2nCHE4LXDKH4eltVo,1850
157
- geo_activity_playground-0.43.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
158
- geo_activity_playground-0.43.1.dist-info/entry_points.txt,sha256=pbNlLI6IIZIp7nPYCfAtiSiz2oxJSCl7DODD6SPkLKk,81
159
- geo_activity_playground-0.43.1.dist-info/RECORD,,
155
+ geo_activity_playground-0.43.3.dist-info/LICENSE,sha256=4RpAwKO8bPkfXH2lnpeUW0eLkNWglyG4lbrLDU_MOwY,1070
156
+ geo_activity_playground-0.43.3.dist-info/METADATA,sha256=ax34y9rdLoVSrC7nWx7bNvudjfo1bQWkZ5VXJee1nMQ,1850
157
+ geo_activity_playground-0.43.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
158
+ geo_activity_playground-0.43.3.dist-info/entry_points.txt,sha256=pbNlLI6IIZIp7nPYCfAtiSiz2oxJSCl7DODD6SPkLKk,81
159
+ geo_activity_playground-0.43.3.dist-info/RECORD,,