Skip to content

Commit

Permalink
GH-84: Convert sport types to string
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-ueding committed Jan 14, 2024
1 parent 5559827 commit d103f29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/reference/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ This is the pre-release series. Things haven't settled yet, so each minor versio

### Version 0.17

#### Version 0.17.5

- Convert FIT sport type enum to strings. [GH-84](https://github.com/martin-ueding/geo-activity-playground/issues/84)

#### Version 0.17.4

- Try to use charset-normalizer to figure out the strange encoding. [GH-83](https://github.com/martin-ueding/geo-activity-playground/issues/83)
Expand Down
4 changes: 2 additions & 2 deletions geo_activity_playground/core/activity_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ def read_fit_activity(path: pathlib.Path, open) -> tuple[ActivityMeta, pd.DataFr
if "wkt_name" in fields:
metadata["name"] = values["wkt_name"]
if "sport" in fields:
metadata["kind"] = values["sport"]
metadata["kind"] = str(values["sport"])
if "sub_sport" in values:
metadata["kind"] += " " + values["sub_sport"]
metadata["kind"] += " " + str(values["sub_sport"])

return metadata, pd.DataFrame(rows)

Expand Down

0 comments on commit d103f29

Please sign in to comment.