sweatstack 0.40.0__py3-none-any.whl → 0.40.1__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.
sweatstack/streamlit.py CHANGED
@@ -15,7 +15,7 @@ import httpx
15
15
  from .client import Client
16
16
  from .constants import DEFAULT_URL
17
17
  from .schemas import Metric, Scope, Sport
18
- from .utils import format_sport
18
+
19
19
 
20
20
  class StreamlitAuth:
21
21
  def __init__(
@@ -253,7 +253,7 @@ class StreamlitAuth:
253
253
  selected_activity = st.selectbox(
254
254
  "Select an activity",
255
255
  activities,
256
- format_func=lambda activity: f"{activity.start.date().isoformat()} {format_sport(activity.sport)}",
256
+ format_func=lambda activity: f"{activity.start.date().isoformat()} {activity.sport.display_name()}",
257
257
  )
258
258
  return selected_activity
259
259
 
@@ -272,7 +272,7 @@ class StreamlitAuth:
272
272
  Sport or list[Sport]: The selected sport or list of sports, depending on allow_multiple.
273
273
 
274
274
  Note:
275
- Sports are displayed in a human-readable format using the format_sport function.
275
+ Sports are displayed in a human-readable format using the display_name function.
276
276
  """
277
277
  if only_available:
278
278
  sports = self.client.get_sports(only_root)
@@ -286,13 +286,13 @@ class StreamlitAuth:
286
286
  selected_sport = st.multiselect(
287
287
  "Select sports",
288
288
  sports,
289
- format_func=format_sport,
289
+ format_func=lambda sport: sport.display_name(),
290
290
  )
291
291
  else:
292
292
  selected_sport = st.selectbox(
293
293
  "Select a sport",
294
294
  sports,
295
- format_func=format_sport,
295
+ format_func=lambda sport: sport.display_name(),
296
296
  )
297
297
  return selected_sport
298
298
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sweatstack
3
- Version: 0.40.0
3
+ Version: 0.40.1
4
4
  Summary: The official Python client for SweatStack
5
5
  Author-email: Aart Goossens <aart@gssns.io>
6
6
  Requires-Python: >=3.9
@@ -7,11 +7,11 @@ sweatstack/jupyterlab_oauth2_startup.py,sha256=eZ6xi0Sa4hO4vUanimq0SqjduHtiywCUR
7
7
  sweatstack/openapi_schemas.py,sha256=sXjwCQ-LmMr9nbP9TBFDzwiIbW_f8aJjH4qdwdYgRHQ,13992
8
8
  sweatstack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  sweatstack/schemas.py,sha256=d6KRMJalaABO61CPm3afs-hM6zUcwbGrZ5mc6SVuc54,3370
10
- sweatstack/streamlit.py,sha256=dtli4RpBiS8cH4GAQ9lDI_ZRDMLoU7GnTc676nLV_4A,13008
10
+ sweatstack/streamlit.py,sha256=C5uAKFwLAUKIyQ7SRIyxMtQEdmRTY-jZsfGQzkYxg9c,13022
11
11
  sweatstack/sweatshell.py,sha256=MYLNcWbOdceqKJ3S0Pe8dwHXEeYsGJNjQoYUXpMTftA,333
12
12
  sweatstack/utils.py,sha256=AwHRdC1ziOZ5o9RBIB21Uxm-DoClVRAJSVvgsmSmvps,1801
13
13
  sweatstack/Sweat Stack examples/Getting started.ipynb,sha256=k2hiSffWecoQ0VxjdpDcgFzBXDQiYEebhnAYlu8cgX8,6335204
14
- sweatstack-0.40.0.dist-info/METADATA,sha256=z_ucY1E0rPGcDRvIeT2IeSM-_qUszWEc0JwmL22p5cc,779
15
- sweatstack-0.40.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
- sweatstack-0.40.0.dist-info/entry_points.txt,sha256=kCzOUQI3dqbTpEYqtgYDeiKFaqaA7BMlV6D24BMzCFU,208
17
- sweatstack-0.40.0.dist-info/RECORD,,
14
+ sweatstack-0.40.1.dist-info/METADATA,sha256=Q2GhOToeHNP3ibiP5vxpKpDrB5o83nfulvzr5l9itV4,779
15
+ sweatstack-0.40.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
+ sweatstack-0.40.1.dist-info/entry_points.txt,sha256=kCzOUQI3dqbTpEYqtgYDeiKFaqaA7BMlV6D24BMzCFU,208
17
+ sweatstack-0.40.1.dist-info/RECORD,,