sweatstack 0.40.0__tar.gz → 0.40.1__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 (27) hide show
  1. {sweatstack-0.40.0 → sweatstack-0.40.1}/PKG-INFO +1 -1
  2. {sweatstack-0.40.0 → sweatstack-0.40.1}/pyproject.toml +1 -1
  3. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/streamlit.py +5 -5
  4. {sweatstack-0.40.0 → sweatstack-0.40.1}/.gitignore +0 -0
  5. {sweatstack-0.40.0 → sweatstack-0.40.1}/.python-version +0 -0
  6. {sweatstack-0.40.0 → sweatstack-0.40.1}/DEVELOPMENT.md +0 -0
  7. {sweatstack-0.40.0 → sweatstack-0.40.1}/Makefile +0 -0
  8. {sweatstack-0.40.0 → sweatstack-0.40.1}/README.md +0 -0
  9. {sweatstack-0.40.0 → sweatstack-0.40.1}/playground/.ipynb_checkpoints/Untitled-checkpoint.ipynb +0 -0
  10. {sweatstack-0.40.0 → sweatstack-0.40.1}/playground/README.md +0 -0
  11. {sweatstack-0.40.0 → sweatstack-0.40.1}/playground/Sweat Stack examples/Getting started.ipynb +0 -0
  12. {sweatstack-0.40.0 → sweatstack-0.40.1}/playground/Untitled.ipynb +0 -0
  13. {sweatstack-0.40.0 → sweatstack-0.40.1}/playground/hello.py +0 -0
  14. {sweatstack-0.40.0 → sweatstack-0.40.1}/playground/pyproject.toml +0 -0
  15. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/Sweat Stack examples/Getting started.ipynb +0 -0
  16. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/__init__.py +0 -0
  17. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/cli.py +0 -0
  18. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/client.py +0 -0
  19. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/constants.py +0 -0
  20. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/ipython_init.py +0 -0
  21. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/jupyterlab_oauth2_startup.py +0 -0
  22. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/openapi_schemas.py +0 -0
  23. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/py.typed +0 -0
  24. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/schemas.py +0 -0
  25. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/sweatshell.py +0 -0
  26. {sweatstack-0.40.0 → sweatstack-0.40.1}/src/sweatstack/utils.py +0 -0
  27. {sweatstack-0.40.0 → sweatstack-0.40.1}/uv.lock +0 -0
@@ -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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sweatstack"
3
- version = "0.40.0"
3
+ version = "0.40.1"
4
4
  description = "The official Python client for SweatStack"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -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
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes