Skip to main content

Helper library for operations of spatial transformation

Project description

Spatial Transformation

Installation

TL;DR

python -m venv .venv
source .venv/bin/activate

git clone git@github.com:TrafoToolkit/spatial_transformation.git
cd spatial_transformation

pip install -e .

Usage

Basic example:

from transform.position_3d import Position3D
from transform.rotation_3d import Rotation3D
from transform.transform_3d import Transform3D

p_0 = Position3D.from_cartesian(30, 450, 20, Unit.MM_DEG)
o_0 = Rotation3D.from_EULER_INTRINSIC_XYZ(210, 120, 140, Unit.MM_DEG)

sys_R = Transform3D(p_0, o_0)


print(p_0)

Development

This project is structured according to the guidelines of hatchling 1.7.

Setup

In order to install the requirements for development, install the dependencies from the requirements.txt:

This project uses pre-commits. To setup this up, do the following:

# With activated virtual environment
pip install -r requirements.txt
pre-commit install

This will install the pre-commit hook. When trying the next commit, the tools for the code check will be installed. Further commits will not need this setup step.

This will apply the checks to all files in the repository. During a commit only the diff is style-checked, the commit is aborted, if style / format is not according to the configuration.

In order to run the files over all git-tracked files, invoke:

pre-commit run --all

Testing

Testing requires you to install pip packages pytest pytest-cov

Run bash tools/runtest.sh MARKERNAME for running the tests in test/ directory. MARKERNAME can be

  • randomized for randomized tests using a random number generator with seed 0
  • hardcoded for testcases that test if an operation generates a known error, so mathematical problems can be found
  • or omitted for running all testcases

Coverage reports will be generated into htmlcov/

Documentation

For building the documentation you need pip packages Sphinx sphinx-autoapi and you need to install Sphinx with apt-get install python3-sphinx.

Run bash tools/generate_classdiagrams.sh for generating classdiagrams in docs/classdiagrams/ using pyreverse.

[WIP] Run bash tools/build_docs.sh for auto-generating documentation in docs/build/ using sphinx.

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

spatial_transformation-1.0.1.tar.gz (457.6 kB view details)

Uploaded Source

Built Distribution

spatial_transformation-1.0.1-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file spatial_transformation-1.0.1.tar.gz.

File metadata

File hashes

Hashes for spatial_transformation-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c656162401144d1c1647a768daacc2b83e328b7aa46fe72982164b5df5fab80d
MD5 916d010c4f4418c96820e6a5898de58c
BLAKE2b-256 d443b1fa551aba3933b687870ea73eaa9504734387d76b0ff4142e8f95b0ce3a

See more details on using hashes here.

File details

Details for the file spatial_transformation-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spatial_transformation-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ca1f905e4363775bfa1585987e0e7d11430b27695281e354dae0a17900c98db
MD5 6585e31b77b11178d93b516b40fd5c88
BLAKE2b-256 396c9717259acfe2b090dd50dcb68e18e0ca91fe06745a22aaf826f9768200df

See more details on using hashes here.

Supported by

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