Skip to main content

Extensions and unstable development modules for Kinetics Toolkit.

Project description

kineticstoolkit_extensions

Additional modules and development of new features for Kinetics Toolkit

This package provides modules that are not included straight into kineticstoolkit because either:

  1. Their use case is specific to one research area of human movement biomechanics (e.g., pushrimkinetics)
  2. They refer to unused or older hardware (e.g., n3d)
  3. They are in active development and their API is not stable enough to be distributed in their final form
  4. They are not neutral - for example, they may relate to assumptions on the human body, such as anthropometric tables or local coordinate systems based on bony landmarks.

Current list of extensions

Stable extensions

Extension Description
n3d Provide read_n3d() to read Optotrak 3d acquisitions.
pushrimkinetics Provide functions to process kinetic data from instrumented wheelchair wheels such as the SmartWheel.

Currently in development

Extension Description
video Will allow reading video files to synchronize and add events to TimeSeries.

Installing extensions

All extensions are included in the single kineticstoolkit_extensions package, which is installed like you installed kineticstoolkit, e.g., using pip or conda:

pip install kineticstoolkit_extensions

or

conda install -c conda-forge kineticstoolkit_extensions

⚠️ Warning: Individual extensions may require additional packages that are not installed by default. Consult the extension's documentation to know if such packages must be installed.

Using extensions

Whereas all extensions are distributed in the same kineticstoolkit_extensions package, each extension is imported separately, following your needs. For instance, to calculate the velocity of a wheelchair wheel using the pushrimkinetics extension:

import kineticstoolkit_extensions.pushrimkinetics as pk

pk.calculate_velocity(ts)

Developing extensions

If you wrote code that extends Kinetics Toolkit and you want to share it globally, consider sharing it as a Kinetics Toolkit extension. This is the best way to ensure that your code keeps functioning in the future, since extensions are tested automatically and continuously with each Kinetics Toolkit release.

Step 1. Fork kineticstoolkit_extensions

On GitHub, fork the kineticstoolkit_extensions repository.

Step 2. Create a folder for your extension

On your fork, add a new folder YOUR_EXTENSION_NAME in the kineticstoolkit_extensions folder.

Step 3. Add your code and documentation

On your fork, add:

  • your code in kineticstoolkit_extensions/YOUR_EXTENSION_NAME/__init__.py. Take [n3d/__init__.py](https://github.com/kineticstoolkit/kineticstoolkit_extensions/blob/main/kineticstoolkit_extensions/n3d/__init__.py) as an example.
  • your main documentation file in kineticstoolkit_extensions/YOUR_EXTENSION_NAME/README.md.
  • if needed, one or several tutorials that showcase your extension.

Step 4. Add your extension in this README

On your fork, edit this README.md and add your extension in the "Stable extensions" table above.

Step 5. Add unit tests

A unit test is a function that is regularly run automatically. Writing unit tests is a great way to ensure that your extension will keep running in the long term on future versions of kineticstoolkit, on all three main platforms (Windows, MacOS, Linux) and on new versions of Python, because we get a notification the minute it fails.

A unit test generally checks that running a function with a given input generates what we expect, using the assert command.

On your fork, add a nest file named kineticstoolkit_extensions/YOUR_EXTENSION_NAME/test_YOUR_EXTENSION_NAME.py. Take test_n3d.py as an example. Each test function must begin with "test_".

Your can include (small) data files in a subfolder such as kineticstoolkit_extensions/YOUR_EXTENSION_NAME/data.

Step 6. Run the unit tests

First, run your unit test locally. You will need to install pytest for it.

When all the unit tests run successfully on your machine, commit your files and push to GitHub, then wait for the unit tests to be executed. If your unit tests do not pass, inspect the output on GitHub using "Details" and search for the error message. Use this error message to correct your unit test (and maybe also your tutorial), then commit and push again.

Step 7. Create a Pull Request

If all tests run successfully in your fork, create a Pull Request explaining what you added, and confirming that you have added a README and a well-functioning unit test. You will eventually get notified if changes are needed or if your pull request (PR) has been merged to the main kineticstoolkit_extensions repository.

In any step, do not hesitate to ask for help, it will be a pleasure to guide you.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kineticstoolkit_extensions-0.16.0a0.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kineticstoolkit_extensions-0.16.0a0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file kineticstoolkit_extensions-0.16.0a0.tar.gz.

File metadata

File hashes

Hashes for kineticstoolkit_extensions-0.16.0a0.tar.gz
Algorithm Hash digest
SHA256 829891293e50d488f8b0f1efea67f097bbee9e635a5d2d2ac3c534fd0065db92
MD5 e6a082fe9c97d20012a0da29607f19ca
BLAKE2b-256 e37820a6cfb67908bf35bf721be679797315d80796a85180b607fe73dce3461e

See more details on using hashes here.

File details

Details for the file kineticstoolkit_extensions-0.16.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for kineticstoolkit_extensions-0.16.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cb9d0d8ca6b565a3cdfc6ec2d4c8b6f1d752d0ba2611d3574b57a02f5dea6ed
MD5 993a774771b4ab30fdc3eb4dcbaaa65d
BLAKE2b-256 b967794c570918c630df36a3c20d78e298e358472f91ef76e4bc3805e56053f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page