Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sportgems

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sportgems

Find valuable gems 💎 in your tracked sport 🚴 activity!

  • 0.8.0
  • PyPI
  • Socket score

Maintainers
1

sportgems

PyPI Python Build Status Deploy Docs

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 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:

Installation

Sportgems is written in rust and bundled in a python package using pyo3. Simply install it using pip:

pip install sportgems

Documentation

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:

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:

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!

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc