Skip to content

Commit 5645e64

Browse files
committed
update test matrix back to 3.11 and add windows and macOS
1 parent ca87285 commit 5645e64

File tree

6 files changed

+349
-74
lines changed

6 files changed

+349
-74
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111

1212
jobs:
1313
test:
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
python-version: ["pypy3.11", "3.11", "3.12", "3.13"]
1418
name: test
1519
runs-on: ubuntu-latest
1620
steps:
@@ -19,10 +23,13 @@ jobs:
1923
with:
2024
fetch-depth: 0
2125

22-
- name: Set up Python 3.13
26+
- name: Set up Python ${{ matrix.python-version }}
2327
uses: actions/setup-python@v4
2428
with:
25-
python-version: "3.13"
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Display Python version
32+
run: python -c "import sys; print(sys.version)"
2633

2734
- name: Install PDM
2835
run: |

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ _cov_html
6565
secrets.json
6666
tokens.json
6767
TODO.md
68-
68+
.tool-versions

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Python API Client for Fitbit™
22

3-
# Fitbit Client
4-
53
[![CI](https://github.com/jpstroop/fitbit-client-python/actions/workflows/ci.yml/badge.svg)](https://github.com/jpstroop/fitbit-client-python/actions/workflows/ci.yml)
64
[![codecov](https://codecov.io/gh/jpstroop/fitbit-client-python/graph/badge.svg?token=DM0JD8VKZ4)](https://codecov.io/gh/jpstroop/fitbit-client-python)
75

@@ -10,7 +8,14 @@
108
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
119
[![Doc style: MDformat](https://img.shields.io/badge/doc_style-mdformat-1c55ff?style=flat)](https://mdformat.readthedocs.io/en/stable/)
1210

13-
[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/release/python-3130/)
11+
[![PyPy 3.11](https://img.shields.io/badge/pypy-3.11-4bb2c5.svg)](https://doc.pypy.org/en/latest/release-v7.3.17.html)
12+
[![Python 3.11](https://img.shields.io/badge/python-3.11-1e405d.svg)](https://www.python.org/downloads/release/python-3110/)
13+
[![Python 3.12](https://img.shields.io/badge/python-3.12-1e405d.svg)](https://www.python.org/downloads/release/python-3120/)
14+
[![Python 3.13](https://img.shields.io/badge/python-3.13-1e405d.svg)](https://www.python.org/downloads/release/python-3130/)
15+
16+
[![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black)](#)
17+
[![macOS](https://img.shields.io/badge/macOS-000000?logo=apple&logoColor=F0F0F0)](#)
18+
[![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white)](#)
1419

1520
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
1621

@@ -19,7 +24,7 @@ OAuth2 PKCE authentication and resource-based API interactions.
1924

2025
## Installation
2126

22-
This package requires Python 3.13 (or later, when there is a later).
27+
Requires Python 3.11 or later
2328

2429
Once published, install like this:
2530

@@ -160,8 +165,8 @@ between sessions. If provided, the client will:
160165

161166
## Pagination
162167

163-
Some Fitbit API endpoints support pagination for large result sets. With this
164-
client, you can work with paginated endpoints in two ways:
168+
Some Fitbit API endpoints support pagination for large result sets. You can work
169+
with paginated endpoints in two ways:
165170

166171
```python
167172
# Standard way - get a single page of results

fitbit_client/resources/intraday.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def get_activity_intraday_by_interval(
374374
IntradayDetailLevel.FIVE_MINUTES,
375375
IntradayDetailLevel.FIFTEEN_MINUTES,
376376
]
377-
if detail_level not in IntradayDetailLevel:
377+
if detail_level not in valid_levels:
378378
raise IntradayValidationException(
379379
message="Invalid detail level",
380380
field_name="detail_level",
@@ -532,11 +532,12 @@ def get_heartrate_intraday_by_date(
532532
Personal applications automatically have access to intraday data.
533533
Other application types require special approval from Fitbit.
534534
"""
535-
if detail_level not in IntradayDetailLevel:
535+
valid_levels = list(IntradayDetailLevel)
536+
if detail_level not in valid_levels:
536537
raise IntradayValidationException(
537538
message="Invalid detail level",
538539
field_name="detail_level",
539-
allowed_values=[l.value for l in IntradayDetailLevel],
540+
allowed_values=[l.value for l in valid_levels],
540541
resource_name="heart rate",
541542
)
542543

0 commit comments

Comments
 (0)