sportgems


Namesportgems JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://github.com/fgebhart/sportgems
SummaryFind valuable gems 💎 in your tracked sport 🚴 activity!
upload_time2023-07-26 20:22:57
maintainerNone
docs_urlNone
authorFabian Gebhart
requires_python>=3.8
licenseMIT
keywords sports activity parser rust sports-data
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sportgems

[![PyPI](https://badge.fury.io/py/sportgems.svg)](https://badge.fury.io/py/sportgems) [![Python](https://img.shields.io/pypi/pyversions/sportgems.svg?style=plastic)](https://badge.fury.io/py/sportgems) [![Build Status](https://github.com/fgebhart/sportgems/workflows/Test/badge.svg)](https://github.com/fgebhart/sportgems/actions?query=workflow%3ATest) [![Deploy Docs](https://github.com/fgebhart/sportgems/actions/workflows/deploy_docs.yml/badge.svg)](https://github.com/fgebhart/sportgems/actions/workflows/deploy_docs.yml)

Sportgems finds valuable gems 💎 in your activities 🚴


## What is it?
Sportgems lets you efficiently parse your activity data. It will search and find your
sections with either max velocity or max climb (see below). It will determine the start,
end and speed of whatever desired sections you are interested in, e.g. 1km, 2km, 10km
and others. 

Sportgems is used in [workoutizer](https://github.com/fgebhart/workoutizer) to find your
fastest 1km (and other 💎) in all your activities and visualize it. See for example this
screenshot of an activity in workoutizer, with the fastest 3km section being highlighted
in yellow:

<img src="https://i.imgur.com/nOYiFm6.png" width="800">

## Installation
Sportgems is written in rust and bundled in a python package using [pyo3](https://pyo3.rs/). Simply
install it using pip:
```
pip install sportgems
```

## Documentation
[sportgems.fgebhart.dev](https://sportgems.fgebhart.dev/)

## How to use it?

In order to search for gems 💎 in your activity, pass a path and desired distance to e.g.
`find_fastest_section_in_fit` like:

```python
from sportgems import find_fastest_section_in_fit

desired_distance = 1_000  # in meter
path_to_fit_file = "tests/data/2019-09-14-17-22-05.fit"
result = find_fastest_section_in_fit(desired_distance, path_to_fit_file)
```
The result will be a python object with the following attributes:
```python
print(f'Found fastest section, from {result.start=} to {result.end=} with {result.velocity=} m/s')
```

which prints:
```
Found fastest section, from result.start=635 to result.end=725 with result.velocity=2.898669803146783 m/s
```

## Changelog
https://fgebhart.github.io/sportgems/changelog.html

## Running the tests

In order to run the rust unit tests simply run
```
cargo test --no-default-features
```
To run the python tests, you first need to install the requirements
```
pip install -r requirements.txt
```
and build and install sportgems itself, by compiling it using
```
maturin build --interpreter python3.8 --compatibility manylinux2014 --skip-auditwheel
```
then installing the wheel with
```
pip install target/wheels/sportgems-*.whl
```
and subsequently run the tests
```
pytest tests/
```

## Contributing
Contributions are welcome!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fgebhart/sportgems",
    "name": "sportgems",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "sports activity parser rust sports-data",
    "author": "Fabian Gebhart",
    "author_email": null,
    "download_url": null,
    "platform": null,
    "description": "# sportgems\n\n[![PyPI](https://badge.fury.io/py/sportgems.svg)](https://badge.fury.io/py/sportgems) [![Python](https://img.shields.io/pypi/pyversions/sportgems.svg?style=plastic)](https://badge.fury.io/py/sportgems) [![Build Status](https://github.com/fgebhart/sportgems/workflows/Test/badge.svg)](https://github.com/fgebhart/sportgems/actions?query=workflow%3ATest) [![Deploy Docs](https://github.com/fgebhart/sportgems/actions/workflows/deploy_docs.yml/badge.svg)](https://github.com/fgebhart/sportgems/actions/workflows/deploy_docs.yml)\n\nSportgems finds valuable gems \ud83d\udc8e in your activities \ud83d\udeb4\n\n\n## What is it?\nSportgems lets you efficiently parse your activity data. It will search and find your\nsections with either max velocity or max climb (see below). It will determine the start,\nend and speed of whatever desired sections you are interested in, e.g. 1km, 2km, 10km\nand others. \n\nSportgems is used in [workoutizer](https://github.com/fgebhart/workoutizer) to find your\nfastest 1km (and other \ud83d\udc8e) in all your activities and visualize it. See for example this\nscreenshot of an activity in workoutizer, with the fastest 3km section being highlighted\nin yellow:\n\n<img src=\"https://i.imgur.com/nOYiFm6.png\" width=\"800\">\n\n## Installation\nSportgems is written in rust and bundled in a python package using [pyo3](https://pyo3.rs/). Simply\ninstall it using pip:\n```\npip install sportgems\n```\n\n## Documentation\n[sportgems.fgebhart.dev](https://sportgems.fgebhart.dev/)\n\n## How to use it?\n\nIn order to search for gems \ud83d\udc8e in your activity, pass a path and desired distance to e.g.\n`find_fastest_section_in_fit` like:\n\n```python\nfrom sportgems import find_fastest_section_in_fit\n\ndesired_distance = 1_000  # in meter\npath_to_fit_file = \"tests/data/2019-09-14-17-22-05.fit\"\nresult = find_fastest_section_in_fit(desired_distance, path_to_fit_file)\n```\nThe result will be a python object with the following attributes:\n```python\nprint(f'Found fastest section, from {result.start=} to {result.end=} with {result.velocity=} m/s')\n```\n\nwhich prints:\n```\nFound fastest section, from result.start=635 to result.end=725 with result.velocity=2.898669803146783 m/s\n```\n\n## Changelog\nhttps://fgebhart.github.io/sportgems/changelog.html\n\n## Running the tests\n\nIn order to run the rust unit tests simply run\n```\ncargo test --no-default-features\n```\nTo run the python tests, you first need to install the requirements\n```\npip install -r requirements.txt\n```\nand build and install sportgems itself, by compiling it using\n```\nmaturin build --interpreter python3.8 --compatibility manylinux2014 --skip-auditwheel\n```\nthen installing the wheel with\n```\npip install target/wheels/sportgems-*.whl\n```\nand subsequently run the tests\n```\npytest tests/\n```\n\n## Contributing\nContributions are welcome!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Find valuable gems \ud83d\udc8e in your tracked sport \ud83d\udeb4 activity!",
    "version": "0.8.0",
    "project_urls": {
        "Homepage": "https://github.com/fgebhart/sportgems"
    },
    "split_keywords": [
        "sports",
        "activity",
        "parser",
        "rust",
        "sports-data"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "434e590310fc901a889ebf99562ce14ff950effcaa52083c59cf55419594849b",
                "md5": "7bb5304b3026e6852e47f3ec2038d595",
                "sha256": "32685406441afd814444ff172452a10ccde29dd22b42a5de5e66224e6da95947"
            },
            "downloads": -1,
            "filename": "sportgems-0.8.0-cp310-cp310-macosx_10_7_x86_64.whl",
            "has_sig": false,
            "md5_digest": "7bb5304b3026e6852e47f3ec2038d595",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 222332,
            "upload_time": "2023-07-26T20:22:57",
            "upload_time_iso_8601": "2023-07-26T20:22:57.191030Z",
            "url": "https://files.pythonhosted.org/packages/43/4e/590310fc901a889ebf99562ce14ff950effcaa52083c59cf55419594849b/sportgems-0.8.0-cp310-cp310-macosx_10_7_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "220b37bcf4a8542ec56395d7ec45ee9661474a8b4bc08454555f52c2fe924418",
                "md5": "2832eb715cb39276f70a6462495f6f6e",
                "sha256": "e3a0d65f011d2fdd997329b8d0be73639c364c2f0e20a8bcaa260c820a48d424"
            },
            "downloads": -1,
            "filename": "sportgems-0.8.0-cp310-cp310-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "2832eb715cb39276f70a6462495f6f6e",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 246419,
            "upload_time": "2023-07-26T20:22:20",
            "upload_time_iso_8601": "2023-07-26T20:22:20.243036Z",
            "url": "https://files.pythonhosted.org/packages/22/0b/37bcf4a8542ec56395d7ec45ee9661474a8b4bc08454555f52c2fe924418/sportgems-0.8.0-cp310-cp310-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dad429a3d19e5686d4de10bec3ac2073120325e988456a28524402ef2b3d50fc",
                "md5": "39d6400d1802f49db3db7e2b7c83e84a",
                "sha256": "4f34452c71d7740388e9fb31f1e868f87f9ae6f4adef9b0b5216396bc114dabb"
            },
            "downloads": -1,
            "filename": "sportgems-0.8.0-cp311-cp311-macosx_10_7_x86_64.whl",
            "has_sig": false,
            "md5_digest": "39d6400d1802f49db3db7e2b7c83e84a",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 222332,
            "upload_time": "2023-07-26T20:23:20",
            "upload_time_iso_8601": "2023-07-26T20:23:20.646792Z",
            "url": "https://files.pythonhosted.org/packages/da/d4/29a3d19e5686d4de10bec3ac2073120325e988456a28524402ef2b3d50fc/sportgems-0.8.0-cp311-cp311-macosx_10_7_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "221c3a6a104063f23099606c95f980f8c980fb6a8436c04e391c535b1cf71a88",
                "md5": "d49d4096513d7622f588d2e8a632aff4",
                "sha256": "7a105d5999eb5cd408eb051adaca8f100b34aa60643d627147e9b3b91eefa959"
            },
            "downloads": -1,
            "filename": "sportgems-0.8.0-cp311-cp311-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "d49d4096513d7622f588d2e8a632aff4",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 246421,
            "upload_time": "2023-07-26T20:22:16",
            "upload_time_iso_8601": "2023-07-26T20:22:16.881845Z",
            "url": "https://files.pythonhosted.org/packages/22/1c/3a6a104063f23099606c95f980f8c980fb6a8436c04e391c535b1cf71a88/sportgems-0.8.0-cp311-cp311-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4be8e5ec56407c139c5088992b0043d542cb171ca298b77a71a1b6f0621a84b2",
                "md5": "6cb029a06801c9bb8eb2cbf79a083d5a",
                "sha256": "aad40f2df06c5ab17604c3f4207cbf0806b0dd91f4dbce52806b01b6f2421f05"
            },
            "downloads": -1,
            "filename": "sportgems-0.8.0-cp38-cp38-macosx_10_7_x86_64.whl",
            "has_sig": false,
            "md5_digest": "6cb029a06801c9bb8eb2cbf79a083d5a",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 221939,
            "upload_time": "2023-07-26T20:23:09",
            "upload_time_iso_8601": "2023-07-26T20:23:09.146471Z",
            "url": "https://files.pythonhosted.org/packages/4b/e8/e5ec56407c139c5088992b0043d542cb171ca298b77a71a1b6f0621a84b2/sportgems-0.8.0-cp38-cp38-macosx_10_7_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5846730d9b200099acd39098337eed511849ca6c7c97021f42b0d0a47480f952",
                "md5": "386d64515141c3f7e607e9e29ba5166d",
                "sha256": "06deaf699f8da5b611b472ebfaf1a2b2ab2e1538d24d02dfbf4a433796362bd1"
            },
            "downloads": -1,
            "filename": "sportgems-0.8.0-cp38-cp38-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "386d64515141c3f7e607e9e29ba5166d",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 245984,
            "upload_time": "2023-07-26T20:22:17",
            "upload_time_iso_8601": "2023-07-26T20:22:17.177202Z",
            "url": "https://files.pythonhosted.org/packages/58/46/730d9b200099acd39098337eed511849ca6c7c97021f42b0d0a47480f952/sportgems-0.8.0-cp38-cp38-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "14c841be5cf58c354a5c4d273cc1fc16f9c1bafe4fc239af53543a08540bc09d",
                "md5": "67c35a2269cf7a790263abd592a17a4b",
                "sha256": "f1bafba36d9ea004b46527dfbcba3429c26bcbe3ebcc0aef2f48ce1340f8e9e1"
            },
            "downloads": -1,
            "filename": "sportgems-0.8.0-cp39-cp39-macosx_10_7_x86_64.whl",
            "has_sig": false,
            "md5_digest": "67c35a2269cf7a790263abd592a17a4b",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 222334,
            "upload_time": "2023-07-26T20:23:08",
            "upload_time_iso_8601": "2023-07-26T20:23:08.057492Z",
            "url": "https://files.pythonhosted.org/packages/14/c8/41be5cf58c354a5c4d273cc1fc16f9c1bafe4fc239af53543a08540bc09d/sportgems-0.8.0-cp39-cp39-macosx_10_7_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f774b5da614adb6049bc4c1f880837be0df5bf69956f83371cff7afbab0fa0f3",
                "md5": "9bd795d86cbdd1d11cbfca3811fe4bb6",
                "sha256": "dce67ca50171d76200cadccdfaea13f228d91347344cf1c1df1a921456036309"
            },
            "downloads": -1,
            "filename": "sportgems-0.8.0-cp39-cp39-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "9bd795d86cbdd1d11cbfca3811fe4bb6",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 246440,
            "upload_time": "2023-07-26T20:22:25",
            "upload_time_iso_8601": "2023-07-26T20:22:25.263395Z",
            "url": "https://files.pythonhosted.org/packages/f7/74/b5da614adb6049bc4c1f880837be0df5bf69956f83371cff7afbab0fa0f3/sportgems-0.8.0-cp39-cp39-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-26 20:22:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fgebhart",
    "github_project": "sportgems",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "sportgems"
}
        
Elapsed time: 0.10054s