Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stravalib dependency #357

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion qtile_extras/resources/stravadata/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@
import pickle
import time

from pint import Unit
from pint import Unit, set_application_registry
from stravalib import Client
from stravalib.model import Activity
from stravalib.unit_registry import ureg

from qtile_extras.resources.stravadata.locations import AUTH, CACHE, CREDS, TIMESTAMP

set_application_registry(ureg)


NUM_EVENTS = 5

APP_ID = AUTH.get("id", False)
Expand Down
9 changes: 4 additions & 5 deletions test/widget/test_strava.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import libqtile.confreader
import libqtile.layout
import pytest
from pint import Unit
from stravalib.model import Activity

from qtile_extras.widget.strava import StravaWidget
Expand All @@ -35,18 +34,18 @@
Activity(
name="Test Activity 1",
start_date_local=datetime(2021, 11, 20, 9, 0),
distance=Unit("m") * 10000,
distance=10000,
elapsed_time=45 * 60,
moving_time=45 * 60,
type=Activity.RUN,
type="Run",
),
Activity(
name="Test Activity 2",
start_date_local=datetime(2021, 11, 21, 7, 10),
distance=Unit("m") * 21100,
distance=21100,
elapsed_time=105 * 60,
moving_time=105 * 60,
type=Activity.RUN,
type="Run",
),
]

Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ deps =
PyGObject
requests
pint
stravalib <= 1.1.0
stravalib
iwlib
psutil
pulsectl-asyncio
Expand Down Expand Up @@ -78,7 +78,7 @@ deps =
dbus_next
requests
pint
stravalib <= 1.1.0
stravalib
commands =
pip install --force-reinstall --no-binary :all: cffi
pip install pywlroots==0.17.0
Expand Down
Loading